c++ struct array member identifier not highlighted
ville-h opened this issue · comments
c++ struct array member identifier not highlighted:
int xs[2]; // <-- identifier is highlighted
struct aa {
int x; // <-- identifier is highlighted
int xs[2]; // <-- identifier does not get highlighted
};
auto main() -> int {
int xs[2]; // <-- identifier is highlighted
(void)xs;
return 0;
}
Feel free to pass it on to whatever project is responsible in case this is the wrong one. It's rather opaque to an outsider which project is responsible for what functionality.
Here are the steps that can help troubleshooting this:
- Check whether
tree-sitter-mode
is on. - Check whether there's an error node in the syntax tree:
M-x tree-sitter-debug
. - Check whether
tree-sitter-hl-mode
is on. - Check what faces are being used to highlight a piece of text, by putting the cursor on the text and evaluate
(get-text-property (point) 'face)
, orC-u M-x what-cursor-position
.
To determine where the unexpected behavior lies:
- If the minor modes are not on, it can be an issue this package (
tree-sitter
). - If there are errors in the syntax tree, the issue can be:
- An outdated grammar binary (from
tree-sitter-langs
, or another distribution mechanism). - A grammar bug, which should be reported to the grammar project itself (usually beloning to the org https://github.com/tree-sitter).
- An outdated grammar binary (from
- Otherwise, it can be an issue with highlighting queries, which usually come from the package
tree-sitter-langs
, but can also come from elsewhere.
Feel free to pass it on to whatever project is responsible in case this is the wrong one.
It's rather opaque to an outsider which project is responsible for what functionality.
Please study the docs. If it's still not clear after that, please open a discussion on https://github.com/emacs-tree-sitter/elisp-tree-sitter/discussions.