1
Fork 0

Keymap changes

This commit is contained in:
Hadeed 2023-09-01 06:50:28 +05:00
parent c1e2bb675d
commit 0b84f75537
2 changed files with 8 additions and 7 deletions

View file

@ -20,17 +20,18 @@ function M.harpoon()
vim.keymap.set("", "<leader>ha", require("harpoon.mark").add_file)
vim.keymap.set("", "<leader>ho", require("harpoon.ui").toggle_quick_menu)
vim.keymap.set("", "<leader>hn", function() require("harpoon.ui").nav_file(1) end)
vim.keymap.set("", "<leader>hk", function() require("harpoon.ui").nav_file(2) end)
vim.keymap.set("", "<leader>hi", function() require("harpoon.ui").nav_file(3) end)
vim.keymap.set("", "<leader>he", function() require("harpoon.ui").nav_file(1) end)
vim.keymap.set("", "<leader>hi", function() require("harpoon.ui").nav_file(2) end)
end
function M.lsp(env)
local opts = { buffer = env.buffer }
vim.keymap.set("", "<leader>en", vim.diagnostic.goto_next, opts)
vim.keymap.set("", "<leader>ep", vim.diagnostic.goto_prev, opts)
vim.keymap.set("", "<leader>ee", vim.diagnostic.open_float, opts)
vim.keymap.set("", "<leader>dn", vim.diagnostic.goto_next, opts)
vim.keymap.set("", "<leader>dp", vim.diagnostic.goto_prev, opts)
vim.keymap.set("", "<leader>de", vim.diagnostic.open_float, opts)
vim.keymap.set("", "<leader>df", vim.lsp.buf.code_action, opts)
vim.keymap.set("", "<leader>rn", vim.lsp.buf.rename, opts)
end
------------------------------------------------------------------------------

View file

@ -6,7 +6,7 @@ return {
config = function()
local lspconfig = require("lspconfig")
lspconfig.ccls.setup {}
lspconfig.clangd.setup {}
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),