nvim: clean up keybinds

also Telescope now has dynamic workspace symbols
This commit is contained in:
dogeystamp 2024-03-31 21:30:35 -04:00
parent 4db9cc7a60
commit ce5c5e87bb
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 17 additions and 18 deletions

View File

@ -94,20 +94,20 @@ local on_attach = function(client, bufnr)
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
local opts = { noremap=true, silent=true }
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'gK', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<space>ss', '<cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts)
keymap('gD', vim.lsp.buf.declaration, opts)
keymap('gd', vim.lsp.buf.definition, opts)
keymap('gK', vim.lsp.buf.hover, opts)
keymap('gi', vim.lsp.buf.implementation, opts)
keymap('gs', vim.lsp.buf.signature_help, opts)
keymap('gt', vim.lsp.buf.type_definition, opts)
keymap('<space>rn', vim.lsp.buf.rename, opts)
keymap('<space>ss', vim.lsp.buf.workspace_symbol, opts)
keymap('gr', vim.lsp.buf.references, opts)
keymap('<space>e', vim.lsp.diagnostic.show_line_diagnostics, opts)
keymap('[d', vim.lsp.diagnostic.goto_prev, opts)
keymap(']d', vim.lsp.diagnostic.goto_next, opts)
keymap('<space>ca', vim.lsp.buf.code_action, opts)
keymap('<space>f', vim.lsp.buf.format, opts)
end
-- table declares LSPs to be set up

View File

@ -23,22 +23,21 @@ require('dressing').setup({
insert_only = false,
}
})
keymap("<leader>ef", "<cmd>Telescope find_files<cr>")
keymap("<leader>eg", "<cmd>Telescope live_grep<cr>")
keymap("<leader>em", "<cmd>Telescope buffers<cr>")
keymap("<leader>eh", "<cmd>Telescope help_tags<cr>")
keymap("<leader>es", "<cmd>Telescope lsp_document_symbols<cr>")
keymap("<leader>es", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>")
keymap("<leader>eb", "<cmd>Telescope keymaps<cr>")
require("theme")
--------------------------------
--------------------------------
-- imports (see .config/nvim/lua/)
--------------------------------
--------------------------------
require("theme")
if dotprofile >= profile_table.DEFAULT then
require("coding")
require("debugging")