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

Wrong highlighting of field declarations in c/c++ #67

Closed
xzz53 opened this issue Nov 1, 2020 · 3 comments
Closed

Wrong highlighting of field declarations in c/c++ #67

xzz53 opened this issue Nov 1, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@xzz53
Copy link

xzz53 commented Nov 1, 2020

Hi!
In field declarations within structs/classes only the first field in comma separated lists of fields having common type gets assigned correct face (tree-sitter-hl-face:property.definition). The rest fields are assigned only (tree-sitter-hl-face:property). Also see screenshot below. I use f5065c8 with Emacs 27.1.

image

@ubolonton
Copy link
Collaborator

This seems to be an upstream issue: tree-sitter/tree-sitter#790.

@ubolonton ubolonton added the bug Something isn't working label Nov 2, 2020
@xzz53
Copy link
Author

xzz53 commented Nov 2, 2020

Thanks for forwarding this to the right place!

By the way, at least https://github.com/ubolonton/emacs-tree-sitter/blob/f5065c86b067577d162850af21598921128bd33b/langs/queries/python/highlights.scm#L27 seems to be affected by the same kind of issue.

@xzz53
Copy link
Author

xzz53 commented Nov 3, 2020

I confirm that after updating to the most recent release of tree-sitter rust bindings the issue is gone.

diff --git a/core/Cargo.toml b/core/Cargo.toml
index a2a3c5a..10f41f3 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -13,5 +13,5 @@ crate-type = ["cdylib"]
 [dependencies]
 emacs = "0.14.1"
 libloading = "0.6.2"
-tree-sitter = "0.17.0"
+tree-sitter = "0.17.1"
 once_cell = "1.2.0"

@xzz53 xzz53 closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants