helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.65k stars 2.5k forks source link

Bracket pair colourization / Rainbow parenthesis #695

Open kirawi opened 3 years ago

kirawi commented 3 years ago

https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2 https://github.com/microsoft/vscode/pull/129231

Th3Whit3Wolf commented 3 years ago

This was just moved into core

archseer commented 3 years ago

With tree-sitter we can likely do this in a much easier way: simply scan the start and end of each named node. VSCode still relies on textmate grammars so it has to parse the whole file by hand to determine matching pairs.

ttys3 commented 3 years ago

here's a nvim plugin based on tree-sitter

https://github.com/p00f/nvim-ts-rainbow

maybe the queries can be re-used

kirawi commented 3 years ago

Looks pretty easy to implement.

Th3Whit3Wolf commented 3 years ago

The plug in has issues with performance. I'm not sure if this is an implementation issue or not though.

SoraTenshi commented 2 years ago

i might want to have a look at that. I can not promise that i will be successful though. Seems to be too difficult for me as of right now. As this task requires a bit more understanding of the editor + tree-sitter

the-mikedavis commented 2 years ago

I think I have a clever idea of how to do this efficiently. I'll make a PR

HealsCodes commented 5 months ago

good to see this pseudo-PR pick back up, the feature would be very nice to have.

Is there any rough idea if / when it might actually become a real PR?