File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ opt.shiftwidth = 2 -- 2 spaces for indent width
1313opt .expandtab = true -- expand tab to spaces
1414opt .autoindent = true -- copy indent from current line when starting new one
1515
16+ -- folding
17+ opt .foldmethod = ' manual' -- only fold when manually created
18+ opt .foldlevelstart = 99 -- open all folds when file is opened
19+
1620-- buffers
1721opt .splitright = true
1822
@@ -102,8 +106,10 @@ vim.api.nvim_create_autocmd('FileType', {
102106 pattern = { ' c_sharp' , ' lua' },
103107 callback = function ()
104108 vim .treesitter .start ()
105- vim .wo .foldexpr = ' v:lua.vim.treesitter.foldexpr()'
106- vim .wo .foldmethod = ' expr'
109+ vim .wo .foldmethod = ' manual' -- disable expression folding
110+ vim .wo .foldlevelstart = 99
111+ -- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
112+ -- vim.wo.foldmethod = 'expr'
107113 vim .bo .indentexpr = " v:lua.require'nvim-treesitter'.indentexpr()"
108114 end ,
109115})
You can’t perform that action at this time.
0 commit comments