feat: better signature help, symbolmap mappings

This commit is contained in:
əlemi 2024-12-04 01:38:36 +01:00
parent 26c0af4040
commit a6630c6eb0
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -44,6 +44,7 @@ function KEYBINDS:set_global_keys(opts)
vim.keymap.set('n', '<M-t>', ':tabnew<CR>', opts) -- fallback for windows vim.keymap.set('n', '<M-t>', ':tabnew<CR>', opts) -- fallback for windows
vim.keymap.set('n', '<C-t>', ':Neotree toggle<CR>', {noremap=true}) vim.keymap.set('n', '<C-t>', ':Neotree toggle<CR>', {noremap=true})
vim.keymap.set('n', '<C-S-t>', ':Neotree toggle source=symbolmap right<CR>', {noremap=true}) vim.keymap.set('n', '<C-S-t>', ':Neotree toggle source=symbolmap right<CR>', {noremap=true})
vim.keymap.set('n', '<M-S-t>', ':Neotree toggle source=symbolmap right<CR>', {noremap=true})
vim.keymap.set('n', '<C-PageUp>', ':Neotree toggle source=diagnostics bottom<CR>', opts) vim.keymap.set('n', '<C-PageUp>', ':Neotree toggle source=diagnostics bottom<CR>', opts)
-- vim.keymap.set('n', '<C-h>', vim.cmd.UndotreeToggle, {noremap=true}) -- vim.keymap.set('n', '<C-h>', vim.cmd.UndotreeToggle, {noremap=true})
-- Esc goes back to normal mode in terminal -- Esc goes back to normal mode in terminal
@ -84,6 +85,7 @@ function KEYBINDS:set_lsp_keys(opts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.references, opts) vim.keymap.set('n', '<leader>r', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<leader>h', vim.lsp.buf.hover, opts) vim.keymap.set('n', '<leader>h', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<leader>f', vim.lsp.buf.signature_help, opts) vim.keymap.set('n', '<leader>f', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<M-q>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<C-Space>', vim.lsp.buf.hover, opts) vim.keymap.set('n', '<C-Space>', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<C-x>', vim.lsp.buf.hover, opts) vim.keymap.set('n', '<C-x>', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<leader>H', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end) vim.keymap.set('n', '<leader>H', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end)