1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 12:48:01 +00:00

[neovim] Move folding keymaps (ufo) to the keymaps file

This commit is contained in:
Daniel Carrillo 2023-10-14 14:17:52 +02:00
parent b2340e5ac8
commit ef5524d858
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 9 additions and 10 deletions

View File

@ -101,5 +101,12 @@ keymap("v", "<leader>64e", ":<c-u>lua require'b64'.encode()<cr>", opts)
keymap("v", "<leader>64d", ":<c-u>lua require'b64'.decode()<cr>", opts)
-- Illuminate
keymap("n", "<a-n>", '<cmd>lua require"illuminate".next_reference{wrap=true}<cr>', { noremap = true })
keymap("n", "<a-p>", '<cmd>lua require"illuminate".next_reference{reverse=true,wrap=true}<cr>', { noremap = true })
keymap("n", "<A-n>", "<cmd>lua require'illuminate'.next_reference{wrap=true}<cr>", { noremap = true })
keymap("n", "<A-p>", "<cmd>lua require'illuminate'.next_reference{reverse=true,wrap=true}<cr>", { noremap = true })
-- Folding
keymap("n", "zR", "<cmd>lua require'ufo'.openAllFolds()<cr>", { desc = "Open all folds" })
keymap("n", "zM", "<cmd>lua require'ufo'.closeAllFolds()<cr>", { desc = "Close all folds" })
keymap("n", "zr", "<cmd>lua require'ufo'.openFoldsExceptKinds()<cr>", { desc = "Fold less" })
keymap("n", "zm", "<cmd>lua require'ufo'.closeFoldsWith()<cr>", { desc = "Fold more" })
keymap("n", "zp", "<cmd>lua require'ufo'.peekFoldedLinesUnderCursor()<cr>", { desc = "Peek fold" })

View File

@ -5,11 +5,3 @@ ufo.setup({
return { "treesitter", "indent" }
end,
})
local keymap = vim.keymap.set
keymap("n", "zR", ufo.openAllFolds, { desc = "Open all folds" })
keymap("n", "zM", ufo.closeAllFolds, { desc = "Close all folds" })
keymap("n", "zr", ufo.openFoldsExceptKinds, { desc = "Fold less" })
keymap("n", "zm", ufo.closeFoldsWith, { desc = "Fold more" })
keymap("n", "zp", ufo.peekFoldedLinesUnderCursor, { desc = "Peek fold" })