···11+# tree-sitter-confindent
22+33+Extremely basic tree-sitter grammar for the [confindent](https://github.com/gennyble/confindent) configuration language.
44+This grammar does not consider the fundamental point of confindent, namely indentation-sensitive nesting.
55+It does distinguish between keys and values at a basic level, though, and should be sufficient for syntax highlighting.
66+77+### Notes
88+99+tree-sitter is rather hostile to indentation-sensitive (i.e. context-sensitive) grammars, such as confindent.
1010+If I were to add full parsing support, I apparently would have to write my own partial lexer in C.
1111+This does not especially appeal to me, but if you are interested, feel free to file a change request.
1212+1313+### How to use
1414+1515+To get syntax highlighting in the `helix` editor, clone this repository somewhere
1616+and use the provided example config in the `helix` subdirectory. Replace the example path with
1717+the path to this repository, and copy the config to your helix config folder (typically ./config/helix/).
1818+You may have to run `hx --grammar fetch` and/or `hx --grammar build`, which will need a C compiler.
1919+If you use nix, the devshell defined in the flake in this project should be sufficient.
2020+2121+Instead of cloning this repo, you could instead just use `source.git` and link to this git repository on the web.
2222+2323+At some point, I may make a vscode extension. Probably there already exists a tree-sitter compatible extension you could use.
2424+Maybe I'll make a TextMate grammar, as vscode's syntax highlighting API seems to prefer this.