cursorless-dev / cursorless

Don't let the cursor slow you down
https://www.cursorless.org/
MIT License
1.14k stars 80 forks source link

Consider parsing Cursorless commands extension side #790

Open pokey opened 2 years ago

pokey commented 2 years ago

I wonder if we should just send a sequence of terms to cursorless and then have a full-blown parser there (tree-sitter?). Then we could define precedence rules, etc. Ie "head inside every funk air past bat" would be split into a sequence of seven tokens: [head, inside, every, funk, air, past, bat], and then cursorless VSCode would figure out how to parse it.

AndreasArvidsson commented 2 years ago

I'm worried that this means that we need to implement the same grammar logic both talon and extension side.

pokey commented 2 years ago

Def worth a conversation. We'd basically make Talon side as simple as possible. I'm just not sure it's possible to do what we want with Talon's simple grammar model, ie precedence rules etc