From 94ce2cb1c56c5cc252bb5bca2e3534fc9c79e340 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 14 May 2023 12:31:28 -0500 Subject: nvim: update lsp config for API changes in new nvim version --- nvim/.config/nvim/lua/lsp_config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nvim/.config') diff --git a/nvim/.config/nvim/lua/lsp_config.lua b/nvim/.config/nvim/lua/lsp_config.lua index 555a70a..804d7dc 100644 --- a/nvim/.config/nvim/lua/lsp_config.lua +++ b/nvim/.config/nvim/lua/lsp_config.lua @@ -12,7 +12,7 @@ end local on_attach = function(client, bufnr) vim.cmd("command! LspDef lua vim.lsp.buf.definition()") vim.cmd("command! LspDeclaration lua vim.lsp.buf.declaration()") - vim.cmd("command! LspFormatting lua vim.lsp.buf.formatting()") + vim.cmd("command! LspFormat lua vim.lsp.buf.format()") vim.cmd("command! LspCodeAction lua vim.lsp.buf.code_action()") vim.cmd("command! LspHover lua vim.lsp.buf.hover()") vim.cmd("command! LspRename lua vim.lsp.buf.rename()") @@ -43,10 +43,10 @@ local on_attach = function(client, bufnr) buf_map(bufnr, 'n', 'wl', ':lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))') buf_map(bufnr, 'n', 'rn', ':LspRename') buf_map(bufnr, 'n', 'ca', ':LspCodeAction') - buf_map(bufnr, 'n', 'f', ':LspFormatting') + buf_map(bufnr, 'n', 'f', ':LspFormat') if client.server_capabilities.documentFormattingProvider then - vim.cmd("autocmd BufWritePre lua vim.lsp.buf.formatting_sync()") + vim.cmd("autocmd BufWritePre lua vim.lsp.buf.format()") end end -- cgit v1.2.3