Add remaps for code actions
This commit is contained in:
@@ -49,6 +49,8 @@ nmap("gr", ":lua vim.lsp.buf.references()<CR>") -- g+r - Show references
|
|||||||
nmap("K", ":lua vim.lsp.buf.hover()<CR>") -- Shift+k - Show documentation in hover window
|
nmap("K", ":lua vim.lsp.buf.hover()<CR>") -- Shift+k - Show documentation in hover window
|
||||||
nmap("<F2>", ":lua vim.lsp.buf.rename()<CR>") -- F2 - Rename thing under the cursor
|
nmap("<F2>", ":lua vim.lsp.buf.rename()<CR>") -- F2 - Rename thing under the cursor
|
||||||
nmap("<leader>d", ':lua vim.diagnostic.open_float(nil, {focus = false, scope = "cursor"})<CR>') -- Leader+d - show diagnostics in float window
|
nmap("<leader>d", ':lua vim.diagnostic.open_float(nil, {focus = false, scope = "cursor"})<CR>') -- Leader+d - show diagnostics in float window
|
||||||
|
nmap("<leader>.", ":lua vim.lsp.buf.code_action()<CR>") -- Leader+. - show code actions to run
|
||||||
|
vmap("<leader>.", ":lua vim.lsp.buf.range_code_action()<CR>") -- same as above but for visual mode
|
||||||
|
|
||||||
-- Git
|
-- Git
|
||||||
nmap("<leader>gg", ":G<CR>") -- Leader+g+g - open vim-fugitive window
|
nmap("<leader>gg", ":G<CR>") -- Leader+g+g - open vim-fugitive window
|
||||||
|
|||||||
Reference in New Issue
Block a user