You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
treesitter is a very exciting development of neovim but it is not quite mature yet and I do end up disabling it more than I would like, mainly because of all the error messages it displays along the text buffer, such as invalid node type at position 1366 (which can appear on almost every line in certain scenario).
As I doubt this kind of warning disappears anytime soon, I wonder if we could somehow reuse the lsp machinery and catch these errors and instead of displaying them rightaway, reexport them as lsp diagnostics ? so one could control how they are displayed ? (as virtual text, error/warnings etc)
Note to others: this issue is not about the actual error (which is a downstream (nvim-treesitter) issue at the moment) but about how Neovim displays such errors.
I don't think using diagnostics is the right avenue for this: these are about issues with the actual code, while the error here is an internal Neovim (or plugin, or config) error and should be reported using the standard way for such errors: the message area (so either via vim.notify or emsg, depending on where in the code stack these appear). Any context from the current buffer should be part of the stack trace.
nvim --version
: mastertreesitter is a very exciting development of neovim but it is not quite mature yet and I do end up disabling it more than I would like, mainly because of all the error messages it displays along the text buffer, such as
invalid node type at position 1366
(which can appear on almost every line in certain scenario).As I doubt this kind of warning disappears anytime soon, I wonder if we could somehow reuse the lsp machinery and catch these errors and instead of displaying them rightaway, reexport them as lsp diagnostics ? so one could control how they are displayed ? (as virtual text, error/warnings etc)
cc @vigoux
The text was updated successfully, but these errors were encountered: