(neovim) add git, yaml, ansible and helm support; minor fixes
This commit is contained in:
parent
79d83fd921
commit
a71684c7f0
9 changed files with 49 additions and 14 deletions
|
@ -2,6 +2,10 @@ vim.g.mapleader = " "
|
|||
vim.g.maplocalleader = "\\"
|
||||
|
||||
local map = vim.keymap.set
|
||||
local nomap = vim.keymap.del
|
||||
|
||||
nomap("n", "[D")
|
||||
nomap("n", "]D")
|
||||
|
||||
local diagnostic_goto = function(next, severity)
|
||||
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
|
||||
|
@ -19,12 +23,12 @@ end, { expr = true, desc = "Escape and Clear hlsearch" })
|
|||
map("i", "<C-a>", "<esc>I")
|
||||
map("i", "<C-e>", "<esc>A")
|
||||
|
||||
map("n", "]d", diagnostic_goto(true), { desc = "Next Diagnostic" })
|
||||
map("n", "[d", diagnostic_goto(false), { desc = "Prev Diagnostic" })
|
||||
map("n", "]e", diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
|
||||
map("n", "[e", diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
|
||||
map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
|
||||
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||
map("n", "]d", diagnostic_goto(true), { desc = "next diagnostic" })
|
||||
map("n", "[d", diagnostic_goto(false), { desc = "prev diagnostic" })
|
||||
map("n", "]e", diagnostic_goto(true, "ERROR"), { desc = "next error" })
|
||||
map("n", "[e", diagnostic_goto(false, "ERROR"), { desc = "prev error" })
|
||||
map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "next warning" })
|
||||
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "prev warning" })
|
||||
|
||||
map("v", "<leader>/", "gc", { desc = "toggle comments", remap = true })
|
||||
|
||||
|
@ -73,7 +77,7 @@ end, { desc = "grep", remap = true })
|
|||
map("n", "<leader>hc", function()
|
||||
Snacks.picker.command_history()
|
||||
end, { desc = "commands", remap = true })
|
||||
map("n", "<leader>hn", "<cmd>Noice<CR>", { desc = "notifications", remap = true })
|
||||
map("n", "<leader>hn", "<cmd>messages<CR>", { desc = "notifications", remap = true })
|
||||
map("n", "<leader>hs", function()
|
||||
Snacks.picker.search_history()
|
||||
end, { desc = "search", remap = true })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue