feat: enhance Neovim configuration with NetRW disabling, auto number toggling, and code folding setup

This commit is contained in:
Satya Prakash 2025-08-03 18:53:36 +05:30
parent 3338d39206
commit dfaacbb0e1
No known key found for this signature in database
GPG key ID: 0C22F9018516C980
3 changed files with 104 additions and 4 deletions

26
notes.md Normal file
View file

@ -0,0 +1,26 @@
## Code folding
To see the code fold in left gutter.
set foldcolumn=1
### Creating fold
#### Set coding folding mode
:set foldmethod=manual
#### Creating a manual fold
1. First select a section of lines in visual mode.
2. Press `zf` to create fold, it is `zd` to delete the same fold.
3. `zo` to open fold, `zc` to close fold, `za` to toggle open/close fold
#### Creating indent fold
:set foldmethod=indent
#### Creating expr fold using nvim-treesitter
:set foldlevel=2
:set foldmethod=expr
:set foldexpr=nvim_treesitter#foldexpr()
vim.wo.foldmethod = 'expr'