A readme explaining how to make neovim work fast
simple foldexpr on comments
2 files changed, +9 -11
+0-10lua/config/autocmds/init.lua
| @@ -90,13 +90,3 @@ vim.api.nvim_create_user_command("SetTabs", function(opts) | ||
| 90 | 90 | vim.notify("Invalid number", vim.log.levels.ERROR) |
| 91 | 91 | end |
| 92 | 92 | 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 | ||
| 39 | 39 | -- disable animations |
| 40 | 40 | vim.g.snacks_animate = false |
| 41 | 41 | |
| 42 | +-- set normal numbers | |
| 43 | +vim.cmd("set norelativenumber") | |
| 44 | + | |
| 45 | +-- fold settings | |
| 46 | +-- fold settings | |
| 47 | +-- fold settings | |
| 48 | +-- fold settings | |
| 42 | 49 | -- fold settings |
| 43 | -vim.opt.foldmethod = "manual" | |
| 50 | +vim.opt.foldmethod = "expr" | |
| 44 | 51 | vim.opt.foldopen = "" |
| 52 | +vim.foldexpr = [[getline(v:lnum)=~'^\s*[--|#|//]']] |