fix typo (vim.keymap)

This commit is contained in:
Vladan Popovic 2024-06-10 15:49:21 +02:00
parent fd32c079c9
commit e42d6245a5

View file

@ -3,15 +3,15 @@ local on_attach = function(client, bufnr)
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
-- Mappings.
vim.keymaps.set("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
vim.keymaps.set("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>")
vim.keymaps.set("n", "<M-k>", "<cmd>lua vim.lsp.buf.type_definition()<CR>")
vim.keymaps.set("n", "<M-r>", "<cmd>lua vim.lsp.buf.rename()()<CR>")
vim.keymaps.set("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>")
vim.keymaps.set("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>")
vim.keymaps.set("n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>")
vim.keymaps.set("n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
vim.keymaps.set("n", "<leader>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>")
vim.keymap.set("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
vim.keymap.set("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>")
vim.keymap.set("n", "<M-k>", "<cmd>lua vim.lsp.buf.type_definition()<CR>")
vim.keymap.set("n", "<M-r>", "<cmd>lua vim.lsp.buf.rename()()<CR>")
vim.keymap.set("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>")
vim.keymap.set("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>")
vim.keymap.set("n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>")
vim.keymap.set("n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
vim.keymap.set("n", "<leader>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>")
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })