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

fix(commonlisp): correctly highlight quotes #6565

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

johannesrld
Copy link
Contributor

the previous queries caused issues like highlighting (quoting_lit) and (format_directive_type "'") twice which made them really annoying to overwrite.

@ribru17
Copy link
Collaborator

ribru17 commented May 5, 2024

Would it work to only highlight anonymous nodes? With something like:

(let ((tmp (gensym)))
    ``(lambda (,tmp ,,tmp ,',tmp) ()))

I get many duplicate highlights with either change. But keeping the anonymous nodes and then removing the other @string.escape and @none highlights gives a cleaner result (but I don't know much about lisp so this may be unacceptable due to some edge cases)

@amaanq amaanq requested a review from theHamsta May 5, 2024 17:28
@johannesrld
Copy link
Contributor Author

Would it work to only highlight anonymous nodes? With something like:

(let ((tmp (gensym)))
    ``(lambda (,tmp ,,tmp ,',tmp) ()))

I get many duplicate highlights with either change. But keeping the anonymous nodes and then removing the other @string.escape and @none highlights gives a cleaner result (but I don't know much about lisp so this may be unacceptable due to some edge cases)

Thanks for bringing attention to this issue, I wasn't aware that the query "cascaded" (borrowing from css for lack of a better word) like that. I've updated it so that it specifically targets the actual quotation characters in the node instead of the entire node itself, this seems to fix the duplicate highlights in your example on my end

@ribru17 ribru17 merged commit 3b57044 into nvim-treesitter:master Jun 10, 2024
9 checks passed
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.

None yet

2 participants