treesitter folding with space x :)

This commit is contained in:
Oliver Hartmann 2022-04-20 22:18:18 +02:00
parent 5dde3be206
commit 2c4617f462
2 changed files with 12 additions and 0 deletions

View File

@ -48,3 +48,8 @@ opt.smartindent= true
-- disable nvim intro
opt.shortmess:append('sI')
-- Treesitter based folding
opt.foldlevel = 20
opt.foldmethod = 'expr'
opt.foldexpr = 'nvim_treesitter#foldexpr()'

View File

@ -167,4 +167,11 @@ command_center.add({
{ 'n', '<leader>a', silent_noremap },
},
},
{
description = 'Toggle fold',
cmd = 'za',
keybindings = {
{ 'n', '<space>x', silent_noremap },
},
},
})