Closed pandysong closed 6 months ago
Helix uses treesitter grammars for syntax highlighting which can currently not display semantic information. This might theoretically be implemented with stackgraphs #1252 but the problem in practice is that most defines either come from CLI compiler flags or header files (and the include directories are once again defined by compiler flags) that makes this pretty hard to implement.
Other editors achieve this using LSP semantic highlighting (see #814) but that is not supported in helix (and there is hesitancy about supporting it for performance reasons).
Summary
The code inside "#if 0" is not greyed out.
Reproduction Steps
"""
include
include
int main() {
if 0
endif
} """
Open above code in hx
I expected this to happen (what happened in vim)
Instead, this happened:
Helix log
No response
Platform
macOS/Linux
Terminal Emulator
tmux
Helix Version
helix 22.08.1 (590a6284)