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
The current version of the tree-sitter RST parser does not process RST grammar embedded into directives like .. warning::, .. note::, etc. See here for an example of such a document and the parse tree shown in NVIM. Note the absent syntax highlighting of the reference.
Curiously, it works when the directive is further annotated:
PS: I am skeptical if the document element makes sense occurring within the tree in this way. When I try to add a custom tree-sitter rule that matches on this element to manually inject the RST grammar into document, I get an error message from NVIM saying that the following structure is impossible.
The text was updated successfully, but these errors were encountered:
PS: I am skeptical if the document element makes sense occurring within the tree in this way. When I try to add a custom tree-sitter rule that matches on this element to manually inject the RST grammar into document, I get an error message from NVIM saying that the following structure is impossible.
That's because document is part of the injected tree, not from the original one. Neovim basically injects rst inside rst.
Curiously, it works when the directive is further annotated:
That's probably a bug in the injection queries from nvim-treesitter, I'll look into that in following days/weeks.
The current version of the tree-sitter RST parser does not process RST grammar embedded into directives like
.. warning::
,.. note::
, etc. See here for an example of such a document and the parse tree shown in NVIM. Note the absent syntax highlighting of the reference.Curiously, it works when the directive is further annotated:
PS: I am skeptical if the
document
element makes sense occurring within the tree in this way. When I try to add a custom tree-sitter rule that matches on this element to manually inject the RST grammar intodocument
, I get an error message from NVIM saying that the following structure is impossible.The text was updated successfully, but these errors were encountered: