cursorless-dev / cursorless

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

Community/Knausj conflicts #428

Open pokey opened 2 years ago

pokey commented 2 years ago

The problem

We have at least the following conflicts with stock knausj:

Possible solutions

cc/ @AndreasArvidsson @knausj85 have I missed any conflicts?

Discussed in https://github.com/pokey/cursorless-vscode/discussions/314

Originally posted by **codecat555** November 6, 2021 Loving cursorless! I just ran into a knausj_talon compatibility issue with cursorless, and @pokey invited me to share it here. I'd be interested in hearing about any other tweaks people have made to avoid conflicts. Cursorless placed an uncolored marker above the number 8 in my text and I wanted to clear that word, so I said 'clear 8'. Then, vscode jumped to line 8 (not the target line) and erased it - not what I expected. I found this command and just changed it so the '[line]' part is not optional - https://github.com/knausj85/knausj_talon/blob/65ccd94b8fe97056a34b858b2f1f261cc5269c3f/text/line_commands.talon#L16 .

@codecat555 fwiw we fixed the specific issue you raised by changing the default term for "clear" to "change", but that's certainly not the only knausj conflict, so let's leave this discussion open.

fidgetingbits commented 4 months ago

I'm finding this type of thing increasingly jarring now that I'm using cursorless in neovim because the cursorless commands (at least for now) don't work or manipulating text on the actual command line, just whatever is in the rest of the buffer. But I'm constantly trying to use the same cursorless terminology there especially chuck, paint, token, etc.

I recall andreas maybe has an existing fallback mechanism so that if a command doesn't actually do anything on cursorless side it falls back to an action? seems like this in combination with proposed solution 3 would solve a lot of these problems? I'm not sure what the status of doing something in community is, or maybe it already exists and I missed it.

I'll probably start slowly poking at solving this on my repo/community, but wanted to see what the state of things is already.

AndreasArvidsson commented 4 months ago

The fallback mechanism is already in Cursorless proper. You(The neovim implementation) just need to provide the command server interface which gives Cursorless the focused element type.

https://github.com/cursorless-dev/cursorless/blob/14291901a8d3a778e2dee47f2648fae4a69de068/packages/common/src/types/CommandServerApi.ts#L5

https://github.com/cursorless-dev/cursorless/blob/14291901a8d3a778e2dee47f2648fae4a69de068/cursorless-talon/src/fallback.py