nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.48k stars 213 forks source link

Concealer error with delimiters when using :Neorg gtd edit #661

Closed VPerrollaz closed 1 year ago

VPerrollaz commented 2 years ago

Prerequisites

Neovim Version

NVIM v0.8.0

Neorg setup

require("neorg").setup({ load = { ["core.defaults"] = {}, ["core.export"] = {}, ["core.keybinds"] = { config = { hook = function(keybinds) local leader = keybinds.leader keybinds.unmap("norg", "n", leader .. "tc") keybinds.unmap("norg", "n", leader .. "te") keybinds.unmap("norg", "n", leader .. "tv") keybinds.unmap("norg", "n", leader .. "mh") keybinds.unmap("norg", "n", leader .. "mn") keybinds.map_event_to_mode("norg", { n = { { "", "core.integrations.telescope.find_linkable" }, }, i = { { "iii", "core.integrations.telescope.insert_link" }, }, }, { silent = true, noremap = true, }) keybinds.map_event_to_mode("norg", { n = { { "nl", "core.looking-glass.magnify-code-block" }, }, }, { silent = true, noremap = true, }) end, }, }, ["core.norg.dirman"] = { config = { workspaces = { brainstorming = "/home/vincent/Seafile/Organisation/notes/brainstorming", documentation_installation = "/home/vincent/Seafile/Organisation/notes/documentation_installation", gtd = "/home/vincent/Seafile/Organisation/notes/gtd", journal = "/home/vincent/Seafile/Organisation/notes/journal", zettelkasten = "/home/vincent/Seafile/Organisation/notes/zk", }, }, }, ["core.norg.qol.toc"] = {}, ["core.norg.concealer"] = {}, ["core.integrations.telescope"] = {}, ["core.norg.completion"] = { config = { engine = "nvim-cmp", }, }, ["core.gtd.base"] = { config = { workspace = "gtd", }, }, ["core.presenter"] = { config = { zen_mode = "zen-mode", }, }, ["core.norg.journal"] = { config = { workspace = "journal", }, }, }, })

Actual behavior

With a minimal norg file

#time.start 2022-11-21
- [ ] task

* Section
  content
  ===

When using :Neorg gtd edit with cursor on task to change the date I get the following error

Error executing vim.schedule lua callback: ...t/neorg/lua/neorg/modules/core/norg/concealer/module.lua:1623: attempt to index local 'text' (a nil value)                                                          
stack traceback:                                                                                                                                                                                                  
        ...t/neorg/lua/neorg/modules/core/norg/concealer/module.lua:1623: in function 'render'                                                                                                                    
        ...t/neorg/lua/neorg/modules/core/norg/concealer/module.lua:220: in function 'func'                                                                                                                       
        ...t/neorg/lua/neorg/modules/core/norg/concealer/module.lua:67: in function <...t/neorg/lua/neorg/modules/core/norg/concealer/module.lua:56>

I confirmed by checking out the last commits that it was introduced by commit 992526cc01f5e399af1a38006434d9b2f52304fc (i.e. ref!: don't schedule Neorg events)

Expected behavior

No such error...

Steps to reproduce

See description above...

Potentially conflicting plugins

No response

Other information

No response

Help

No

Implementation help

No response

VPerrollaz commented 2 years ago

I also realize that the keybindings connected to core.norg.qol.todo_items.todo don't work either, starting from this particular commit

danymat commented 1 year ago

For reference: https://github.com/nvim-neorg/neorg/issues/695