Skip to content

Conversation

@ChrHorn
Copy link
Contributor

@ChrHorn ChrHorn commented Oct 10, 2025

This should make querying these much easier.

closes #73

@clason
Copy link
Contributor

clason commented Oct 13, 2025

Can you update the queries to go with it? (And here, too, tree-sitter generate --abi=14 to appease CI.)

@ChrHorn
Copy link
Contributor Author

ChrHorn commented Oct 14, 2025

The queries should still work unchanged. It is mainly useful for things like textobjects.scm or advanced local tracking that are currently not implemented in this repo. It also makes gradual selection in the editor (select outer scope) a bit more convenient.

I'm currently in the process to rewrite the Helix queries but ran into some performance issues. Not sure if this grammar, the Helix implementation, or too much usage of locals is the issue.

@clason
Copy link
Contributor

clason commented Oct 14, 2025

Little bit of column A, little bit of column C. (The use of locals for highlighting is now considered to be a mistake; even upstream is no longer advocating it.)

@ChrHorn
Copy link
Contributor Author

ChrHorn commented Oct 14, 2025

Little bit of column A, little bit of column C. (The use of locals for highlighting is now considered to be a mistake; even upstream is no longer advocating it.)

Is there an upstream issue/discussion about the topic? I wasn't able to find anything.

They are quite nice when they work. I used them for constant and function argument tracking. But there are also issues, especially the queries are getting unwieldy very fast. Combination of low-level grammar and very flexible syntax of Julia.

Some sort of hybrid approach with LSP semantic highlighting would probably the best.

@clason
Copy link
Contributor

clason commented Oct 14, 2025

Some sort of hybrid approach with LSP semantic highlighting would probably the best.

Yes, that's exactly the thinking. (Too bad the LSP situation for Julia has the same problems -- at least the tree-sitter parser does not have to be written in Julia itself...)

@clason
Copy link
Contributor

clason commented Oct 24, 2025

@ChrHorn feel free to open this PR at https://github.com/tree-sitter-grammars/tree-sitter-julia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make _block a visible scope

2 participants