Skip to content
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

Cursorless in neovim / terminal #2256

Open
wants to merge 579 commits into
base: main
Choose a base branch
from

Conversation

saidelike
Copy link
Collaborator

@saidelike saidelike commented Feb 27, 2024

neovim_take
neovim_clone_cut_post_drink
neovim_terminal

Repositories

This currently relies on:

Checklist for pokey

The below list can be useful to review the code since some files are based on vscode similar files.

  • packages\cursorless-neovim-e2e\src\suite\recorded.neovim.test.ts versus packages\cursorless-vscode-e2e\src\suite\recorded.vscode.test.ts
  • packages\cursorless-neovim-e2e\src\endToEndTestSetup.ts versus packages\cursorless-vscode-e2e\src\endToEndTestSetup.ts
  • packages\cursorless-neovim\src\constructTestHelpers.ts versus packages\cursorless-vscode\src\constructTestHelpers.ts
  • packages\cursorless-neovim\src\extension.ts versus packages\cursorless-vscode\src\extension.ts
  • packages/cursorless-neovim/src/NeovimCommandServerApi.ts versus https://github.com/pokey/command-server/blob/main/src/extension.ts#L32
  • packages/cursorless-neovim/src/registerCommands.ts versus packages/cursorless-vscode/src/registerCommands.ts
  • packages/cursorless-neovim-e2e/src/suite/recorded.neovim.test.ts versus packages/cursorless-vscode-e2e/src/suite/recorded.vscode.test.ts
  • packages\neovim-common\src\TestHelpers.ts versus packages\vscode-common\src\TestHelpers.ts
  • packages\neovim-common\src\getExtensionApi.ts versus packages\vscode-common\src\getExtensionApi.ts
  • packages\neovim-common\src\ide\neovim\NeovimCapabilities.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeCapabilities.ts
  • packages/neovim-common/src/ide/neovim/NeovimClipboard.ts
    vs packages\cursorless-vscode\src\ide\vscode\VscodeClipboard.ts
  • packages\neovim-common\src\ide\neovim\NeovimEdit.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeEdit.ts
  • packages\neovim-common\src\ide\neovim\NeovimEvents.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeEvents.ts
  • packages\neovim-common\src\ide\neovim\NeovimFileSystem.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeFileSystem.ts
  • packages\neovim-common\src\ide\neovim\NeovimGlobalState.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeGlobalState.ts
  • packages\neovim-common\src\ide\neovim\NeovimIDE.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeIDE.ts
  • packages\neovim-common\src\ide\neovim\NeovimMessages.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeMessages.ts
  • packages\neovim-common\src\ide\neovim\NeovimTextDocumentImpl.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeTextDocumentImpl.ts
  • packages\neovim-common\src\ide\neovim\NeovimTextEditorImpl.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeTextEditorImpl.ts
  • packages\neovim-common\src\ide\neovim\NeovimTextLineImpl.ts vs packages\cursorless-vscode\src\ide\vscode\VscodeTextLineImpl.ts
  • packages\neovim-common\src\ide\neovim\hats\NeovimHats.ts vs
  • packages\neovim-common\src{neovimApi,neovimHelpers}.ts vs https://code.visualstudio.com/api/references/vscode-api
  • packages\neovim-common\src\runCommand.ts vs packages\vscode-common\src\runCommand.ts
  • packages\neovim-common\src\testUtil\openNewEditor.ts vs packages\vscode-common\src\testUtil\openNewEditor.ts
  • packages\test-harness\src\index.ts vs packages\test-harness\src\runners\extensionTestsVscode.ts
  • packages/test-harness/src/launchNeovimAndRunTests.ts vs packages/test-harness/src/launchVscodeAndRunTests.ts
  • packages/test-harness/src/scripts/runNeovimTestsCI.ts vs packages/test-harness/src/scripts/runVscodeTestsCI.ts
  • docs\contributing\cursorless-in-neovim.md vs docs\contributing\CONTRIBUTING.md

@pokey pokey marked this pull request as draft February 27, 2024 18:49
@jaresty
Copy link

jaresty commented Mar 1, 2024

I'm really curious about this support - are you really building a neovim / cursorless integration? That would be cool!

@pokey
Copy link
Member

pokey commented Mar 11, 2024

@saidelike lmk when you want me to take a preliminary look; looks like you've been busy! 🙌

@saidelike
Copy link
Collaborator Author

I have updated the list of repos in the initial message.

@C-Loftus
Copy link
Contributor

Super excited about this. If you need testers please ping me! Would love to see screenshots/gifs of how things are going, no matter what stage that might be (no pressure though!)

@saidelike
Copy link
Collaborator Author

@saidelike lmk when you want me to take a preliminary look; looks like you've been busy! 🙌

@pokey A few moments later... This is ready for review :)

@saidelike saidelike marked this pull request as ready for review May 3, 2024 21:15
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I did some initial review; I still have to look through the rest of the PR but figured I'd leave these comments for now

.github/workflows/deploy.yaml Outdated Show resolved Hide resolved
.vscode/launch.json Outdated Show resolved Hide resolved
.vscode/tasks.json Outdated Show resolved Hide resolved
.vscode/tasks.json Show resolved Hide resolved
.vscode/tasks.json Show resolved Hide resolved
cursorless.nvim/lua/cursorless/init.lua Outdated Show resolved Hide resolved
cursorless.nvim/lua/cursorless/init.lua Show resolved Hide resolved
cursorless.nvim/lua/cursorless/init.lua Outdated Show resolved Hide resolved
data/fixtures/recorded/actions/copySecondToken.yml Outdated Show resolved Hide resolved
@saidelike saidelike mentioned this pull request May 14, 2024
Cedric Halbronn and others added 9 commits May 14, 2024 21:33
I tried to not call the `TestHarnessRun()` mocha tests from neovim config file, and instead I changed it to be synchronous and I called it manually using the `:call TestHarnessRun()` command. The result is that it hangs every ten minutes. This is really weird because it shouldn't have any fail test because when I do it asynchronously there is no fail test, but instead I skip the ones I don't want to execute.

```
2024-05-15 10:43:07 INF   recorded test cases
2024-05-15 10:43:07 INF     - recorded/actions/alternateHighlightHarp
2024-05-15 10:43:07 INF     - recorded/actions/breakBat
2024-05-15 10:43:07 INF     - recorded/actions/breakCommentSit
2024-05-15 10:43:07 INF     - recorded/actions/breakJustThis
2024-05-15 10:43:07 INF     - recorded/actions/breakJustThis2
2024-05-15 10:43:07 INF     - recorded/actions/bringAirAfterAir
2024-05-15 10:43:07 INF     - recorded/actions/bringAirAndBatAndCap
2024-05-15 10:43:07 INF     - recorded/actions/bringAirAndBatAndCapToAfterDrum
2024-05-15 10:43:07 INF     - recorded/actions/bringAirAndBatAndCapToAfterItemEach
2024-05-15 10:43:07 INF     - recorded/actions/bringAirAndBatAndCapToBeforeDrum
2024-05-15 10:43:07 INF     - recorded/actions/bringAirAndBatAndCapToBeforeItemEach
2024-05-15 10:43:07 INF     - recorded/actions/bringAirBeforeAir
2024-05-15 10:43:07 INF     - recorded/actions/bringAirToEndOfAir
2024-05-15 10:43:07 INF     - recorded/actions/bringAirToStartOfAir
2024-05-15 10:43:07 INF     - recorded/actions/bringArgMadeAfterLook
2024-05-15 10:43:07 INF     - recorded/actions/bringArgMadeAfterVest
2024-05-15 10:43:07 INF     - recorded/actions/bringArgueFineAndZip
2024-05-15 10:43:07 INF     - recorded/actions/bringArgueOxAndZipToAfterJustLeper
2024-05-15 10:43:07 INF     - recorded/actions/bringArgWhaleBeforeLook
2024-05-15 10:43:07 INF     - recorded/actions/bringFineAfterLineVest
2024-05-15 10:43:07 INF     - recorded/actions/bringFineBeforeLineVest
2024-05-15 10:43:07 INF     - recorded/actions/bringItemAirAfterCap
2024-05-15 10:43:07 INF     - recorded/actions/bringLineAirAndBatAndCapToAfterDrum
2024-05-15 10:43:07 INF     - recorded/actions/bringLineAirAndBatAndCapToBeforeDrum
2024-05-15 10:43:07 INF     - recorded/actions/bringVest
2024-05-15 10:43:07 INF     - recorded/actions/bringVestToCap
2024-05-15 10:43:07 INF     - recorded/actions/callFine
2024-05-15 10:43:07 INF     - recorded/actions/callFineOnBatt
2024-05-15 10:43:07 INF     - recorded/actions/callVest
2024-05-15 10:43:07 INF     - recorded/actions/callVestOnCap
2024-05-15 10:43:07 INF     - recorded/actions/carveVest
2024-05-15 10:53:07 INF     1) recorded/actions/changeNextInstanceChar
2024-05-15 10:53:07 INF     - recorded/actions/chuckArgMadeAndAir
2024-05-15 10:53:07 INF     - recorded/actions/chuckArgMadeAndAirAndJustSoon
2024-05-15 10:53:07 INF     - recorded/actions/chuckEveryArgMade
2024-05-15 10:53:07 INF     - recorded/actions/chuckVest
2024-05-15 10:53:07 INF     - recorded/actions/clearVest
2024-05-15 10:53:07 INF     - recorded/actions/cloneArgue
2024-05-15 10:53:07 INF     - recorded/actions/cloneArgue2
2024-05-15 10:53:07 INF     - recorded/actions/cloneEveryArg
2024-05-15 10:53:07 INF     - recorded/actions/cloneHarp
2024-05-15 10:53:07 INF     - recorded/actions/cloneHarp2
2024-05-15 10:53:07 INF     - recorded/actions/cloneToken
2024-05-15 10:53:07 INF     - recorded/actions/cloneToken2
2024-05-15 10:53:07 INF     - recorded/actions/cloneToken3
2024-05-15 10:53:07 INF     - recorded/actions/cloneToken4
2024-05-15 10:53:07 INF     - recorded/actions/cloneToken5
2024-05-15 10:53:07 INF     - recorded/actions/cloneUpArgue
2024-05-15 10:53:07 INF     - recorded/actions/cloneUpArgue2
2024-05-15 10:53:07 INF     - recorded/actions/cloneUpEveryArg
2024-05-15 10:53:07 INF     - recorded/actions/cloneUpHarp
2024-05-15 10:53:07 INF     - recorded/actions/cloneUpHarp2
2024-05-15 11:03:07 INF     2) recorded/actions/cloneUpToken
```
@fidgetingbits
Copy link
Contributor

Just saw the gifs and was curious if the take second paint example in the first one has a bug? It looks like it also highlights the space after the actual token? I haven't quite got it setup yet to test, so just asking so I don't forget.

@saidelike
Copy link
Collaborator Author

@saidelike would you be opposed to squashing this into one commit? I was going to pull it but that's a lot of commits 😅. Happy to help if you're not sure how to do that

Of course feel free to do so.

@saidelike
Copy link
Collaborator Author

Just saw the gifs and was curious if the take second paint example in the first one has a bug? It looks like it also highlights the space after the actual token? I haven't quite got it setup yet to test, so just asking so I don't forget.

Yes it is a known bug. More info in #2322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants