hadronized / kak-tree-sitter

tree-sitter meets Kakoune
Other
76 stars 13 forks source link

Rewrite highlighting with tree-sitter only #25

Open hadronized opened 1 year ago

hadronized commented 1 year ago

Currently, kak-tree-sitter uses tree-sitter-highlight to get the capture group for us. This was convenient for the first implementation but:

jdugan6240 commented 10 months ago

I have a PR open that implements the first bullet point at least: https://github.com/phaazon/kak-tree-sitter/pull/151

I do plan to work on the second bullet point at some point, but one step at a time :)

hadronized commented 10 months ago

Thanks for contributing. As I mentioned in your PR, this is not the direction I want the project to go to. We do not want to vendor dependencies, and design updates / choices should be made carefully to make it easier to add new things. Highlighter should only be about highlighting, not semantic selections, etc.

I know closing this current issue would be great because we would have (many) more features, but we’re going to have to go with a full tree-sitter approach.

jdugan6240 commented 10 months ago

Fair enough. The architecture of that crate would have made it difficult to expose the necessary state to make editing the parse tree possible, so that was probably a dead end regardless.

TBH I'm probably going to keep working on my implementation, as we seem to have slightly different philosophies on how this should function, judging by the Design Suggestions thread (which is totally fine!), plus I'm not the biggest fan of Rust in general. I'm happy to continue offering suggestions, though.

hadronized commented 6 months ago

The work in #212 is probably going to fix this current issue. I want to take the time to review the design to be sure it will be easy for me (or others) to maintain it, but from my first review, it looks solid.