Mon, 06 Mar 2023 23:43:39 -0500
use current format function
.config/nvim/lua/config/lsp.lua | file | annotate | diff | comparison | revisions |
--- a/.config/nvim/lua/config/lsp.lua +++ b/.config/nvim/lua/config/lsp.lua @@ -48,7 +48,7 @@ vim.api.nvim_create_autocmd("BufWritePre group = vim.api.nvim_create_augroup("lsp_autoformat", { clear = true }), callback = function(opts, bufnr) if autoformat_filetypes[vim.bo.filetype] then - vim.lsp.buf.formatting_seq_sync(nil, 100) + vim.lsp.buf.format({ timeout_ms = 100 }) end end, })