Skip to content

Commit

Permalink
fix(concealer): ensure backwards compatibility for `vim.treesitter.fo…
Browse files Browse the repository at this point in the history
…ldexpr`
  • Loading branch information
vhyrro committed Dec 28, 2023
1 parent 53cbffb commit 5921cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neorg/modules/core/concealer/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ local function handle_init_event(event)
if module.config.public.folds and vim.api.nvim_win_is_valid(event.window) then
local wo = vim.wo[event.window]
wo.foldmethod = "expr"
wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
wo.foldexpr = vim.treesitter.foldexpr and "v:lua.vim.treesitter.foldexpr()" or "nvim_treesitter#foldexpr()"
wo.foldtext = "v:lua.require'neorg'.modules.get_module('core.concealer').foldtext()"

local init_open_folds = module.config.public.init_open_folds
Expand Down

0 comments on commit 5921cc4

Please sign in to comment.