Skip to content

Extract cursorless core into a node.js server #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #541
pokey opened this issue Jan 8, 2022 · 7 comments
Closed
Tracked by #541

Extract cursorless core into a node.js server #435

pokey opened this issue Jan 8, 2022 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@pokey
Copy link
Member

pokey commented Jan 8, 2022

The problem

Today, cursorless only works within VSCode. We'd like cursorless to be usable in other editors, as well as outside of editors, eg in web browsers, anywhere on screen using OCR, etc.

The solution

Because cursorless is written in Typescript, we can abstract away the VSCode-specific code and package its core engine into a node.js server. Then clients in other editors, in a web browser, or within Talon itself (eg for OCR-based cursorless), can talk to this server to enable cursorless commands to operate on everything.

Questions

  • Should VSCode talk to this server, or continue to use its own bundled cursorless engine? Would need to do some performance / reliability tests to see whether we lose anything by making it a server. It's not too different from a language server, and these seem to be fairly reliable / performant, so might be fine

Update (@pokey)

We will proceed by turning Cursorless into an lsp, as proposed in #946

@pokey pokey added the enhancement New feature or request label Jan 8, 2022
@pokey pokey added this to the On deck milestone Feb 3, 2022
@zmcgohan2
Copy link

Has there been any design on how this might look visually? How would hats be communicated across UIs in general?

@pokey
Copy link
Member Author

pokey commented Feb 9, 2022

We'll try our best to make the hats consistent across editors / other places, but it will likely end up varying from editor to editor. For example, emacs and vim are often run in a terminal, so rendering anything fancy will probably be difficult or impossible in that kind of scenario.

Not sure how helpful that is. I guess the best I can say is that we'll try to make it look just like the hats do in Cursorless VSCode

@ParetoOptimalDev
Copy link

For example, emacs and vim are often run in a terminal, so rendering anything fancy will probably be difficult or impossible in that kind of scenario.

91% emacs users use the GUI version FYI:

emacs poll

source

There are also frequent recommendations in #emacs and r/emacs to prefer the GUI version.

@pokey
Copy link
Member Author

pokey commented Feb 13, 2022

ah cool good to know

@dyamito
Copy link

dyamito commented Jan 3, 2023

Cross linking a neovim issue re hats - neovim/neovim#21603.

@saidelike
Copy link
Collaborator

Can we say that this is not needed anymore? For example, for neovim, i was just able to use the cursorless existing abstraction to run the existing code into a node process started by neovim.

@pokey
Copy link
Member Author

pokey commented Apr 23, 2024

Yeah I'm not sure how helpful this issue is. I don't think a generic standalone node server is going to be helpful. In some sense you have put Cursorless in a node server already, so one might argue you've started on this issue.

@pokey pokey closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants