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
I think there is another option to fix the bug. We could change the parser by introducing a new node for "field expression inside types".
For instance instead of having :
variable::MyModule.T
---- field expression ----
we could have :
variable::MyModule.T
---- scope expression ----
and it would make the highlight query much easier.
I would be very happy to contribute by either :
1- changing the highlight query to capture MyModule as a module and T as a type in the MyModule.T expression (see PR JuliaEditorSupport/zed-julia#28)
2- suggest a change in the parser to capture children of scope_expression as a type and avoid very large capture expressions.
Option 1 is a quick win for 80% of cases but quite verbose.
Option 2 requires more work (I'm not familiar with the tool).
Steps To Reproduce/Bad Parse Tree
This is not a bad parse tree. This is about highlighting.
Expected Behavior/Parse Tree
Capture MyModule.MySubModule.[...].T as a type.
Repro
No response
The text was updated successfully, but these errors were encountered:
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
Hi,
I mainly work with Zed and have quite an annoying highlight bug with types prefixed by modules.
I suggested a change in the julia-zed repo to fix the bug in 80% of cases with a full description and examples: JuliaEditorSupport/zed-julia#28 (comment)
I think there is another option to fix the bug. We could change the parser by introducing a new node for "field expression inside types".
For instance instead of having :
we could have :
and it would make the highlight query much easier.
I would be very happy to contribute by either :
1- changing the highlight query to capture
MyModule
as a module andT
as a type in theMyModule.T
expression (see PR JuliaEditorSupport/zed-julia#28)2- suggest a change in the parser to capture children of
scope_expression
as a type and avoid very large capture expressions.Option 1 is a quick win for 80% of cases but quite verbose.
Option 2 requires more work (I'm not familiar with the tool).
Steps To Reproduce/Bad Parse Tree
This is not a bad parse tree. This is about highlighting.
Expected Behavior/Parse Tree
Capture
MyModule.MySubModule.[...].T
as a type.Repro
No response
The text was updated successfully, but these errors were encountered: