nvim: clean up keybinds
also Telescope now has dynamic workspace symbols
This commit is contained in:
parent
4db9cc7a60
commit
ce5c5e87bb
@ -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
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user