Key bindings for buffer nav and m-Enter for code actions
This commit is contained in:
parent
1bb84ebd6d
commit
6e92e847a3
2 changed files with 4 additions and 0 deletions
3
init.lua
3
init.lua
|
@ -152,3 +152,6 @@ key("n", "Y", "y$")
|
||||||
key("i", "<C-Space>", "<C-x><C-o>", { desc = "completion" })
|
key("i", "<C-Space>", "<C-x><C-o>", { desc = "completion" })
|
||||||
key("n", "<C-l>", "<cmd>noh<CR><cmd>redraw!<CR>", { desc = "clear search highlight" })
|
key("n", "<C-l>", "<cmd>noh<CR><cmd>redraw!<CR>", { desc = "clear search highlight" })
|
||||||
key("v", "gs", "<cmd>'<,'>sort<CR>", { desc = "sort selection" })
|
key("v", "gs", "<cmd>'<,'>sort<CR>", { desc = "sort selection" })
|
||||||
|
|
||||||
|
key("n", "<M-b>", "<cmd>bnext<cr>", { desc = "next buffer" })
|
||||||
|
key("n", "<M-S-b>", "<cmd>bprevious<cr>", { desc = "previous buffer" })
|
||||||
|
|
|
@ -25,6 +25,7 @@ local on_attach = function(args)
|
||||||
{ '<Leader>D', vim.lsp.buf.type_definition, "Go to type definition" },
|
{ '<Leader>D', vim.lsp.buf.type_definition, "Go to type definition" },
|
||||||
{ '<Leader>rn', vim.lsp.buf.rename, "Rename" },
|
{ '<Leader>rn', vim.lsp.buf.rename, "Rename" },
|
||||||
{ '<M-x>', vim.lsp.buf.code_action, "Code action" },
|
{ '<M-x>', vim.lsp.buf.code_action, "Code action" },
|
||||||
|
{ '<M-return>', vim.lsp.buf.code_action, "Code action" },
|
||||||
{ '<M-s>', vim.lsp.codelens.run, "Run code lens" },
|
{ '<M-s>', vim.lsp.codelens.run, "Run code lens" },
|
||||||
{ 'gr', function() require('telescope.builtin').lsp_references() end,"Go to references" },
|
{ 'gr', function() require('telescope.builtin').lsp_references() end,"Go to references" },
|
||||||
{ '<M-e>', vim.diagnostic.open_float, "Open diagnostics" },
|
{ '<M-e>', vim.diagnostic.open_float, "Open diagnostics" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue