vim/lsp: fix mappings
This commit is contained in:
parent
986e801a1a
commit
d504ca3ffe
1 changed files with 4 additions and 4 deletions
|
@ -15,14 +15,14 @@ local config = function()
|
||||||
on_attach = function(--[[client]]_, bufnr)
|
on_attach = function(--[[client]]_, bufnr)
|
||||||
vim.bo.omnifunc = 'v:lua.vim.lsp.omnifunc' -- do completion with <c-x><c-o>
|
vim.bo.omnifunc = 'v:lua.vim.lsp.omnifunc' -- do completion with <c-x><c-o>
|
||||||
local map, opts = vim.keymap.set, { buffer = bufnr }
|
local map, opts = vim.keymap.set, { buffer = bufnr }
|
||||||
map('n', '<space>ca', vim.lsp.buf.code_action, opts)
|
map('n', '<leader>cc', vim.lsp.buf.code_action, opts)
|
||||||
map('n', '<space>cf', vim.lsp.buf.format, opts)
|
map('n', '<leader>cf', vim.lsp.buf.format, opts)
|
||||||
map('n', 'gD', vim.lsp.buf.declaration, opts)
|
|
||||||
map('n', 'gd', vim.lsp.buf.definition, opts)
|
map('n', 'gd', vim.lsp.buf.definition, opts)
|
||||||
map('n', 'K', vim.lsp.buf.hover, opts)
|
map('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
map('n', 'gi', vim.lsp.buf.implementation, opts)
|
map('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||||
map('n', 'grr', vim.lsp.buf.rename, opts)
|
map('n', 'grr', vim.lsp.buf.rename, opts)
|
||||||
map('n', 'gt', vim.lsp.buf.type_definition, opts)
|
map('n', 'gt', vim.lsp.buf.type_definition, opts)
|
||||||
|
map('n', 'K', vim.lsp.buf.hover, opts)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_init = function(client, --[[init_result]]_)
|
on_init = function(client, --[[init_result]]_)
|
||||||
|
|
Loading…
Add table
Reference in a new issue