diff options
Diffstat (limited to 'nvim/.config')
-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 |