.config/nvim/lua/config/lsp.lua

changeset 1069
0e871a1b59e3
parent 1064
fcfa295076a8
child 1083
cc48b040ddbb
equal deleted inserted replaced
1068:537a428597b5 1069:0e871a1b59e3
46 46
47 vim.api.nvim_create_autocmd("BufWritePre", { 47 vim.api.nvim_create_autocmd("BufWritePre", {
48 group = vim.api.nvim_create_augroup("lsp_autoformat", { clear = true }), 48 group = vim.api.nvim_create_augroup("lsp_autoformat", { clear = true }),
49 callback = function(opts, bufnr) 49 callback = function(opts, bufnr)
50 if autoformat_filetypes[vim.bo.filetype] then 50 if autoformat_filetypes[vim.bo.filetype] then
51 vim.lsp.buf.formatting_seq_sync(nil, 100) 51 vim.lsp.buf.format({ timeout_ms = 100 })
52 end 52 end
53 end, 53 end,
54 }) 54 })
55 55
56 -- This can be removed when mason-lspconfig gets support for standardrb 56 -- This can be removed when mason-lspconfig gets support for standardrb

mercurial