irongit

A readme explaining how to make neovim work fast

simple foldexpr on comments

huncholanehuncholaneauthored
parent cbc72cfcommit 7d295169d01e91c608f903cd043c7f4d9d89dbe0Browse files

2 files changed, +9 -11

+0-10lua/config/autocmds/init.lua
@@ -90,13 +90,3 @@ vim.api.nvim_create_user_command("SetTabs", function(opts)
9090 vim.notify("Invalid number", vim.log.levels.ERROR)
9191 end
9292 end, { desc = "Set tab width for current buffer.", nargs = 1 })
93-
94--- persistent folds
95-vim.api.nvim_create_autocmd("BufWinLeave", {
96- pattern = "*",
97- command = "silent! mkview",
98-})
99-vim.api.nvim_create_autocmd("BufWinEnter", {
100- pattern = "*",
101- command = "silent! loadview",
102-})
+9-1lua/config/options.lua
@@ -39,6 +39,14 @@ end
3939 -- disable animations
4040 vim.g.snacks_animate = false
4141
42+-- set normal numbers
43+vim.cmd("set norelativenumber")
44+
45+-- fold settings
46+-- fold settings
47+-- fold settings
48+-- fold settings
4249 -- fold settings
43-vim.opt.foldmethod = "manual"
50+vim.opt.foldmethod = "expr"
4451 vim.opt.foldopen = ""
52+vim.foldexpr = [[getline(v:lnum)=~'^\s*[--|#|//]']]