diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2023-05-14 12:31:28 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2023-05-14 12:31:28 -0500 |
commit | 94ce2cb1c56c5cc252bb5bca2e3534fc9c79e340 (patch) | |
tree | 5042183e47b00331f9a775b4826476d924ebf224 | |
parent | f9ea9ae5b35e4e7118f1d8f5bf9ef833fd87073a (diff) |
nvim: update lsp config for API changes in new nvim version
-rw-r--r-- | nvim/.config/nvim/lua/lsp_config.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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', '<space>wl', ':lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<cr>') buf_map(bufnr, 'n', '<space>rn', ':LspRename<cr>') buf_map(bufnr, 'n', '<space>ca', ':LspCodeAction<cr>') - buf_map(bufnr, 'n', '<space>f', ':LspFormatting<cr>') + buf_map(bufnr, 'n', '<space>f', ':LspFormat<cr>') if client.server_capabilities.documentFormattingProvider then - vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()") + vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.format()") end end |