neorg
neorg copied to clipboard
Conceal Module breaks Treesitter highlighting on Session Load
Prerequisites
- [X] I have read contribution guidelines
- [X] I am using the latest version of the plugin
- [X] I am using either 0.6 stable or the latest compiled neovim version
Neovim Version
0.7
Neorg setup
require("neorg").setup({
load = {
["core.defaults"] = {},
["core.norg.dirman"] = {
config = {
autochdir = true,
autodetect = true,
workspaces = {
home = "~/notes/",
},
},
},
["core.norg.concealer"] = {},
["core.norg.completion"] = {
config = { engine = "nvim-cmp" },
},
["core.gtd.base"] = {
config = {
workspace = "home",
},
},
["core.integrations.telescope"] = {},
},
})
Actual behavior
Before, with foldlevel=2:

After, with foldlevel set to 0:

Expected behavior
Treesitter highlighting doesn't break when setting foldlevel=0

Steps to reproduce
- Have some custom Treesitter conceal rule in
~/.config/nvim/after/queries/lua/highlights.scm, something like:
(("local" @keyword) (#set! conceal "~"))
((function_call name: (identifier) @TSNote (#eq? @TSNote "require")) (#set! conceal ""))
- Open a
luafile on the left split, open anorgfile, withconcealer moduleturned on. - Set
foldlevel=2 - Save the session
:makesession Session.vim - Quit nvim
- Open nvim,
:source Session.vim - Set
foldlevel=0
Potentially conflicting plugins
No response
Other information
No response
Help
No
Implementation help
No response