.
This commit is contained in:
parent
7740706330
commit
9885f851ab
2 changed files with 15 additions and 16 deletions
|
|
@ -4,8 +4,8 @@ map({ "n", "v" }, "<C-s>", ":w ++p<CR>", { desc = "save file" })
|
||||||
map({ "i" }, "<C-s>", "<ESC>:w ++p<CR>a", { desc = "save file" })
|
map({ "i" }, "<C-s>", "<ESC>:w ++p<CR>a", { desc = "save file" })
|
||||||
map("n", "<leader>;", ":", { desc = "command with ;" })
|
map("n", "<leader>;", ":", { desc = "command with ;" })
|
||||||
map("v", "<leader>;", ":", { desc = "command with ;" })
|
map("v", "<leader>;", ":", { desc = "command with ;" })
|
||||||
map("n", "q", ":bd<cr>", { desc = "close buffer" })
|
map("n", "q", ":bd!<cr>", { desc = "close buffer" })
|
||||||
map("n", "Q", ":%bd<cr>", { desc = "close all buffers" })
|
map("n", "Q", ":%bd!<cr>", { desc = "close all buffers" })
|
||||||
map({ "n", "v" }, "d", '"_d', { desc = "delete without cut" })
|
map({ "n", "v" }, "d", '"_d', { desc = "delete without cut" })
|
||||||
map({ "n", "v" }, "c", '"_c', { desc = "delete without cut" })
|
map({ "n", "v" }, "c", '"_c', { desc = "delete without cut" })
|
||||||
map({ "v", "n" }, "vv", "<C-v>", { desc = "vv for visual block" })
|
map({ "v", "n" }, "vv", "<C-v>", { desc = "vv for visual block" })
|
||||||
|
|
@ -97,6 +97,18 @@ map("n", "K", function()
|
||||||
vim.lsp.buf.hover({ border = "rounded" })
|
vim.lsp.buf.hover({ border = "rounded" })
|
||||||
end, { desc = "vim.lsp.buf.hover()" })
|
end, { desc = "vim.lsp.buf.hover()" })
|
||||||
|
|
||||||
|
map("n", "<leader>ca", function()
|
||||||
|
vim.lsp.buf.code_action({ apply = true })
|
||||||
|
end, { desc = "Code actions" })
|
||||||
|
|
||||||
|
-- https://github.com/neovim/neovim/issues/28004
|
||||||
|
map("n", "<leader>rn", function()
|
||||||
|
vim.lsp.buf.rename()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd("wa")
|
||||||
|
end, 100)
|
||||||
|
end, { desc = "Rename symbols" })
|
||||||
|
|
||||||
-- Move lines
|
-- Move lines
|
||||||
map("n", "<A-k>", ":execute 'move .-' . (v:count1 + 1)<cr>==", { desc = "Move Up" })
|
map("n", "<A-k>", ":execute 'move .-' . (v:count1 + 1)<cr>==", { desc = "Move Up" })
|
||||||
map("n", "<A-j>", ":execute 'move .+' . v:count1<cr>==", { desc = "Move Down" })
|
map("n", "<A-j>", ":execute 'move .+' . v:count1<cr>==", { desc = "Move Down" })
|
||||||
|
|
|
||||||
|
|
@ -285,20 +285,7 @@ local keys = {
|
||||||
end,
|
end,
|
||||||
desc = "Goto T[y]pe Definition",
|
desc = "Goto T[y]pe Definition",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"<leader>ca",
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.code_action({ apply = true })
|
|
||||||
end,
|
|
||||||
desc = "Code actions",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>rn",
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.rename()
|
|
||||||
end,
|
|
||||||
desc = "Rename symbols",
|
|
||||||
},
|
|
||||||
-- Other
|
-- Other
|
||||||
{
|
{
|
||||||
"<leader>z",
|
"<leader>z",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue