Neovim version (nvim -v)
0.12.2
Neovim distribution
LazyVim
Operating system
MacOs
Terminal emulator / GUI
WezTerm
Describe the bug
After upgrading to Neovim 0.12.2, I started receiving attempt to call method 'range' (a nil value) errors from vim/treesitter.lua when opening markdown files. The stack trace points to nvim-treesitter/query_predicates.lua being triggered during injection parsing initiated by render-markdown.
Unknown to me before upgrading but, nvim-treesitter is now archived and nvim >= 0.12.0 natively handles highlighting/parsing. Looks like this dep now calls directives that are out of sync. Removing the 'nvim-treesitter/nvim-treesitter' dependency from my render-markdown config solved the issue. Less of a bug and more of a callout in case you want to update your docs
vim.schedule callback: .../neovim/0.12.2/share/nvim/runtime/lua/vim/treesitter.lua:196: attempt to call method 'range' (a nil value)
stack traceback:
.../neovim/0.12.2/share/nvim/runtime/lua/vim/treesitter.lua:196: in function 'get_range'
.../neovim/0.12.2/share/nvim/runtime/lua/vim/treesitter.lua:231: in function 'get_node_text'
...nvim-treesitter/lua/nvim-treesitter/query_predicates.lua:141: in function 'handler'
...m/0.12.2/share/nvim/runtime/lua/vim/treesitter/query.lua:868: in function '_apply_directives'
...m/0.12.2/share/nvim/runtime/lua/vim/treesitter/query.lua:1089: in function '(for generator)'
...2/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:1123: in function '_get_injections'
...2/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:690: in function '_parse'
...2/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:639: in function 'parse'
...ender-markdown.nvim/lua/render-markdown/request/view.lua:62: in function 'parse'
...azy/render-markdown.nvim/lua/render-markdown/core/ui.lua:156: in function 'parse'
...azy/render-markdown.nvim/lua/render-markdown/core/ui.lua:129: in function 'render'
...azy/render-markdown.nvim/lua/render-markdown/core/ui.lua:112: in function 'run'
...azy/render-markdown.nvim/lua/render-markdown/core/ui.lua:78: in function <...azy/render-markdown.nvim/lua/render-markdown/core/ui.lua:77>
Expected behavior
No nvim exception when opening markdown files.
Healthcheck output
Plugin configuration
// actual output was `default configuration`
return {
"MeanderingProgrammer/render-markdown.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-mini/mini.nvim" },
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
}
Plugin error log
Confirmations
Additional information
No response
Neovim version (nvim -v)
0.12.2
Neovim distribution
LazyVim
Operating system
MacOs
Terminal emulator / GUI
WezTerm
Describe the bug
After upgrading to Neovim 0.12.2, I started receiving
attempt to call method 'range' (a nil value)errors from vim/treesitter.lua when opening markdown files. The stack trace points to nvim-treesitter/query_predicates.lua being triggered during injection parsing initiated by render-markdown.Unknown to me before upgrading but, nvim-treesitter is now archived and nvim >= 0.12.0 natively handles highlighting/parsing. Looks like this dep now calls directives that are out of sync. Removing the 'nvim-treesitter/nvim-treesitter' dependency from my render-markdown config solved the issue. Less of a bug and more of a callout in case you want to update your docs
Expected behavior
No nvim exception when opening markdown files.
Healthcheck output
Plugin configuration
Plugin error log
Confirmations
Additional information
No response