tree-sitter-nu icon indicating copy to clipboard operation
tree-sitter-nu copied to clipboard

add queries for different tree-sitter-based editors

Open 1Kinoti opened this issue 2 years ago • 6 comments

i think queries should be written for tree-sitter-based editors to enable syntax highlighting

resources:

1Kinoti avatar Apr 26 '23 18:04 1Kinoti

on neovim i followed the instructions from @zioroboco but i still had to run

mkdir ~/.local/share/nvim/lazy/nvim-treesitter/queries/nu/
http get https://raw.githubusercontent.com/1Kinoti/_tree-sitter-nu/main/queries/helix/highlights.scm | save ~/.local/share/nvim/lazy/nvim-treesitter/queries/nu/highlights.scm

to install the queries from your fork @1Kinoti to neovim :open_mouth:

it would be very cool to have that automated :yum:

amtoine avatar Apr 27 '23 13:04 amtoine

@amtoine I believe the queries need to be in this tree-sitter-nu repo once we've developed them. We can start with @1Kinoti's if we want to but if you look at the helix queries from LhKipp's tree-sitter, you'll notice there are more than just one query file. I think this is all part of creating the tree-sitter part and it's just not finished yet. We added this repository in the hopes that people would jump in and add what's missing. Maybe I'm preaching to the choir here. Sorry if I am.

fdncred avatar Apr 27 '23 13:04 fdncred

oooh yeah you are absolutely right here :yum:

can we start now with the highlights.csm file above? it adds a lot to the experience i think

amtoine avatar Apr 27 '23 14:04 amtoine

@amtoine We can I think. @1Kinoti is it ok to add that file? Since it existed in your repo after the merge, I just want to ask to be sure it's ok.

fdncred avatar Apr 27 '23 14:04 fdncred

the file is not tested, that is why i did not include it. i was just using it to learn how to write queries. but if @amtoine tests it then it can be added

1Kinoti avatar Apr 27 '23 19:04 1Kinoti

Lapce appears to use queries that look very similar to nvim/helix queries. Does anyone use Lapce and has tried them?

mrdgo avatar Sep 20 '24 06:09 mrdgo