diff --git a/plugin/mappings.lua b/plugin/mappings.lua index 5d90e91..ba654dc 100644 --- a/plugin/mappings.lua +++ b/plugin/mappings.lua @@ -57,3 +57,9 @@ vim.keymap.set('n', 'gw', function() vim.cmd('normal! gggwG') vim.fn.winrestview(view) end, { desc = 'Format whole file with gw' }) + +vim.keymap.set('n', 'fm', function() + if vim.o.foldexpr == 'nvim_treesitter#foldexpr()' then + vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' + end +end)