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
Since the large overhaul to the parser, I have noticed that when using Treesitter queries in Neovim, that the range output in block scoped namespaces, include the entire contents of the enclosed block (i.e. The entire namespace).
This used to be the case for file scoped namespaces too, but after the overhaul, the range of file_scoped_namespace_declaration only includes the line that the namespace declaration is on.
This has altered the behaviour of a plugin that I maintain (https://github.com/Issafalcon/neotest-dotnet). It hasn't broken it in any major way, but the tests all started to fail because the tree of nodes that are formulated based on whether a class is nested in the range of the namespace have changed. The file scoped namespaces are ignored, and not included in the tree, because the range doesn't include the range position of the nested class itself.
I'm not sure if this is a deliberate breaking change, or if it's a regression defect, but thought I'd raise it anyway.
The text was updated successfully, but these errors were encountered:
The same issue after using file scoped namespace, now tree-sitter can't find the namespace content block, and it just shows me the scoped namespace line.
Hi,
Since the large overhaul to the parser, I have noticed that when using Treesitter queries in Neovim, that the range output in block scoped namespaces, include the entire contents of the enclosed block (i.e. The entire namespace).
This used to be the case for file scoped namespaces too, but after the overhaul, the range of
file_scoped_namespace_declaration
only includes the line that the namespace declaration is on.This has altered the behaviour of a plugin that I maintain (https://github.com/Issafalcon/neotest-dotnet). It hasn't broken it in any major way, but the tests all started to fail because the tree of nodes that are formulated based on whether a
class
is nested in the range of thenamespace
have changed. The file scoped namespaces are ignored, and not included in the tree, because the range doesn't include the range position of the nested class itself.I'm not sure if this is a deliberate breaking change, or if it's a regression defect, but thought I'd raise it anyway.
The text was updated successfully, but these errors were encountered: