nvim: add some keymaps
This commit is contained in:
parent
24ed54a9f2
commit
283c35a5a2
@ -83,4 +83,6 @@ end
|
||||
|
||||
map('n', '<F9>', ':Lexplore 20<cr>') -- file explorer, 20% wide
|
||||
map('i', '<F9>', '<Esc>:Lexplore 20<cr>')
|
||||
map('n', '<Leader><cr>', '<C-]>') -- follow links in help
|
||||
map('n', '<M-.>', '<C-]>') -- follow symbol
|
||||
map('n', '<M-,>', '<C-T>') -- go back to previous pos
|
||||
map('v', '<Leader>f', 'gq') -- format text
|
||||
|
@ -15,22 +15,23 @@ local on_attach = function(client, bufnr)
|
||||
noremap = true, silent = true, buffer=bufnr })
|
||||
end
|
||||
|
||||
map('n', '<f5>', vim.diagnostic.goto_prev)
|
||||
map('n', '<f6>', vim.diagnostic.goto_next)
|
||||
map('n', 'gD', vim.lsp.buf.declaration)
|
||||
map('n', 'gd', vim.lsp.buf.definition)
|
||||
map('n', 'gi', vim.lsp.buf.implementation)
|
||||
map('n', 'gr', vim.lsp.buf.references)
|
||||
map('n', 'K', vim.lsp.buf.hover)
|
||||
map('n', '<C-k>', vim.lsp.buf.signature_help)
|
||||
map('n', '<f5>', vim.diagnostic.goto_prev)
|
||||
map('n', '<f6>', vim.diagnostic.goto_next)
|
||||
map('n', 'gD', vim.lsp.buf.declaration)
|
||||
map('n', 'gd', vim.lsp.buf.definition)
|
||||
map('n', '<M-.>', vim.lsp.buf.definition)
|
||||
map('n', 'gi', vim.lsp.buf.implementation)
|
||||
map('n', 'gr', vim.lsp.buf.references)
|
||||
map('n', 'K', vim.lsp.buf.hover)
|
||||
map('n', '<C-k>', vim.lsp.buf.signature_help)
|
||||
map('n', '<Leader>lwa', vim.lsp.buf.add_workspace_folder)
|
||||
map('n', '<Leader>lwr', vim.lsp.buf.remove_workspace_folder)
|
||||
map('n', '<Leader>lwl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end)
|
||||
map('n', '<Leader>lr', vim.lsp.buf.rename)
|
||||
map('n', '<Leader>la', vim.lsp.buf.code_action)
|
||||
map('n', '<Leader>lf', vim.lsp.buf.formatting)
|
||||
map('n', '<Leader>lr', vim.lsp.buf.rename)
|
||||
map('n', '<Leader>la', vim.lsp.buf.code_action)
|
||||
map('n', '<Leader>lf', vim.lsp.buf.formatting)
|
||||
|
||||
-- highlight symbol under cursor
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
|
Loading…
x
Reference in New Issue
Block a user