[neovim] Lspsaga keymaps

This commit is contained in:
Adam Cooper 2023-12-15 09:03:39 -05:00
parent 5b85d400f0
commit 7153792ade

View file

@ -45,12 +45,13 @@ vim.keymap.set("n", "<c-k>", "<c-w>k", { noremap = true, desc = 'Go to window ab
vim.keymap.set("n", "<c-h>", "<c-w>h", { noremap = true, desc = 'Go to window to the left' })
-- N.B. This conflicts with the NetRW directory refresh command.
vim.keymap.set("n", "<c-l>", "<c-w>l", { noremap = true, desc = 'Go to window to the right' })
-- vim.keymap.set("n", "<c-l>", "<c-w>l", { noremap = true, desc = 'Go to window to the right' })
vim.keymap.set("t", "<c-j>", "<c-\\><c-n><c-w>j", { noremap = true, desc = 'Go to window below' })
vim.keymap.set("t", "<c-k>", "<c-\\><c-n><c-w>k", { noremap = true, desc = 'Go to window above' })
vim.keymap.set("t", "<c-h>", "<c-\\><c-n><c-w>h", { noremap = true, desc = 'Go to window to the left' })
vim.keymap.set("t", "<c-l>", "<c-\\><c-n><c-w>l", { noremap = true, desc = 'Go to window to the right' })
--[[
vim.keymap.set(
{"i", "n", "t", "v"},
"<F10>",
@ -59,6 +60,7 @@ vim.keymap.set(
end,
{ desc = ":nohlsearch" }
)
--]]
vim.keymap.set(
{"n", "t"},
@ -417,7 +419,27 @@ require('gitsigns').setup({
--[[
-- LSPSaga : provides a diverse basket of utilities
--]]
require('lspsaga').setup()
require('lspsaga').setup({
beacon = {
enable = true,
frequency = 7,
}
})
vim.keymap.set('n', '<leader>si', '<cmd>Lspsaga incoming_calls<CR>')
vim.keymap.set('n', '<leader>so', '<cmd>Lspsaga outgoing_calls<CR>')
vim.keymap.set('n', '<leader>ca', '<cmd>Lspsaga code_action<CR>')
vim.keymap.set('n', '<leader>sd', '<cmd>Lspsaga peek_definition<CR>')
vim.keymap.set('n', '<leader>sp', '<cmd>Lspsaga peek_type_definition<CR>')
vim.keymap.set('n', '<leader>sx', '<cmd>Lspsaga goto_definition<CR>')
vim.keymap.set('n', '<leader>sg', '<cmd>Lspsaga goto_type_definition<CR>')
vim.keymap.set('n', '[e', '<cmd>Lspsaga diagnostic_jump_prev<CR>')
vim.keymap.set('n', ']e', '<cmd>Lspsaga diagnostic_jump_next<CR>')
vim.keymap.set('n', '<leader>sK', '<cmd>Lspsaga hover_doc<CR>')
vim.keymap.set('n', '<leader>sm', '<cmd>Lspsaga finder imp<CR>')
vim.keymap.set('n', '<leader>sf', '<cmd>Lspsaga finder<CR>')
vim.keymap.set('n', '<leader>sl', '<cmd>Lspsaga outline<CR>')
vim.keymap.set('n', '<leader>rn', '<cmd>Lspsaga rename<CR>')
vim.keymap.set('n', '<leader>st', '<cmd>Lspsaga term_toggle<CR>')
-- Tweak GitSigns blame color
-- This differentiates the cursorline from the git blame text