use current format function

Mon, 06 Mar 2023 23:43:39 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 06 Mar 2023 23:43:39 -0500
changeset 1069
0e871a1b59e3
parent 1068
537a428597b5
child 1070
72b613de1102

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,
 })

mercurial