#14776·helix

Improve KDL syntax highlighting

Author: selvmayaCreated Nov 12, 2025Updated Sep 11, 2026
LabelsC-enhancement

I could not find any issue tracking support for KDL outside of the initial support issue and the associated implementation PR, both of which are closed as completed/merged.

Description

As far as I understand it, kdl is supposed to treat nodes starting with /- as commented out, but helix does not highlight it this way.

Example of syntax highlighting from https://kdl.dev/

Reading nontrivial kdl files, like my niri configuration file, can be quite unintuitive because regular comments and strings get syntax highlighted correctly, but "Slashdash" comments appear just like regular non-commented nodes.

Example of `config.kdl` for `niri` Imagine being in the middle of nested nodes that are actually completely commented out, with no syntax highlight indication:

Further info

There was a 2.0 release nearly a year ago, but as far as I can tell, this "Slashdash" comment feature was present before this.

Reading the initial support implementation PR and going to the underlying treesitter grammar, I assume the underlying grammar is just kind of incomplete: https://github.com/tree-sitter-grammars/tree-sitter-kdl/issues/11