irongit

A readme explaining how to make neovim work fast

force fold comments with zk

huncholanehuncholaneauthored
parent fd74eaecommit d75f994b18250f52f12c662b5de7bca6f4a30e61Browse files

3 files changed, +8 -1

+7-0lua/config/keymaps/init.lua
@@ -49,3 +49,10 @@ end, { desc = "Telescope Treesitter" })
4949 vim.keymap.set("n", "<leader>fi", function()
5050 vim.cmd("Telescope find_files no_ignore=true")
5151 end, { desc = "Telescope Hidden" })
52+
53+-- Force comment folding
54+vim.keymap.set("n", "zk", function()
55+ vim.cmd("UseFoldComment")
56+ vim.cmd("normal zx")
57+ vim.cmd("normal zM")
58+end, { desc = "Forcefully fold comments" })
+1-0lua/config/options.lua
@@ -45,3 +45,4 @@ vim.cmd("set norelativenumber")
4545 -- fold basic comments
4646 vim.opt.foldmethod = "expr"
4747 vim.opt.foldopen = ""
48+vim.opt.foldexpr = "v:lua.CommentFoldExpr()"
+0-1tmux.conf
@@ -72,6 +72,5 @@ set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
7272 set -g @plugin 'huncholane/tmux-fzf-keys'
7373 set -g @plugin 'huncholane/tmux-env-menu'
7474
75-
7675 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
7776 run '~/.tmux/plugins/tpm/tpm'