Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby: identifiers mis-highlighted as "function.method" #76

Open
muirdm opened this issue Dec 6, 2020 · 3 comments
Open

ruby: identifiers mis-highlighted as "function.method" #76

muirdm opened this issue Dec 6, 2020 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@muirdm
Copy link

muirdm commented Dec 6, 2020

The below ruby code:

foo = 123

Gives foo a face of tree-sitter-hl-face:function.method which isn't correct (it should be variable or similar). I poked around a bit and my guess would be the ((identifier) @function.method (#is-not? local)) highlight rule is matching too much suggesting the locals stuff isn't working (?).

I'm guessing it is an issue here vs tree-sitter-ruby, but I'm really not sure.

@shackra shackra added the bug Something isn't working label Dec 7, 2020
@ubolonton
Copy link
Collaborator

Yeah, .is-not? predicate is not yet supported by emacs-tree-sitter. The highlighting queries for Ruby need to be rewritten to take that into account.

Currently, they are still just a copy of upstream's. Since I don't use Ruby myself, I would like some Ruby users to own and maintain the queries.

@ubolonton ubolonton added good first issue Good for newcomers help wanted Extra attention is needed labels Dec 11, 2020
@jspawar
Copy link

jspawar commented Jul 14, 2021

To clarify, is it the lack of support for the .is-not? predicate or the lack of support for local as mentioned in #94?

Also, again to clarify, you are suggesting we could mitigate this lack of support by rewriting the highlighting rules to not rely on .is-not? and local?

@ubolonton
Copy link
Collaborator

To clarify, is it the lack of support for the .is-not? predicate or the lack of support for local as mentioned in #94?

Both: additional predicates in general, and local information to support a particular type of predicate. The former is relatively straightforward. The latter is difficult to make efficient.

Also, again to clarify, you are suggesting we could mitigate this lack of support by rewriting the highlighting rules to not rely on .is-not? and local?

Yeah, until these are implemented.

@ubolonton ubolonton removed the good first issue Good for newcomers label Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants