-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cursorless in neovim / terminal (#2256)
![neovim_take](https://github.com/cursorless-dev/cursorless/assets/387346/e72acd0d-fee2-4bae-a8b1-0cf8644c0ecf) ![neovim_clone_cut_post_drink](https://github.com/cursorless-dev/cursorless/assets/387346/20041f0d-8ff1-41b8-a2bd-02bc353ad8c5) ![neovim_terminal](https://github.com/cursorless-dev/cursorless/assets/387346/423b6d29-a1e4-4910-8a4e-32acd5dd3c5b) # Repositories This currently relies on: * https://github.com/saidelike/cursorless/tree/nvim-talon (this PR) * compiled and pushed to https://github.com/hands-free-vim/cursorless.nvim (neovim cursorless plugin) * https://github.com/saidelike/command-server/tree/neovim * compiled and pushed to cursorless mono repo * https://github.com/hands-free-vim/talon.nvim (neovim talon plugin) * https://github.com/hands-free-vim/neovim-talon (talon commands for neovim: command-client, commands for navigating/editing/split/tabs in editor. Deprecates https://github.com/fidgetingbits/talon-vim) # Todo - [x] hands-free-vim/neovim-talon#20 - [x] hands-free-vim/neovim-talon#24 # 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\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 --------- Co-authored-by: Cedric Halbronn <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: fidgetingbits <[email protected]> Co-authored-by: Pokey Rule <[email protected]>
- Loading branch information
1 parent
f040681
commit 0ec5e3c
Showing
101 changed files
with
5,191 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
* @pokey @AndreasArvidsson @phillco | ||
* @cursorless-dev/code-owners | ||
|
||
*keyboard* @pokey @AndreasArvidsson @phillco @josharian | ||
*Keyboard* @pokey @AndreasArvidsson @phillco @josharian | ||
*keyboard* @cursorless-dev/code-owners @josharian | ||
*Keyboard* @cursorless-dev/code-owners @josharian | ||
|
||
*neovim* @cursorless-dev/code-owners @saidelike @fidgetingbits | ||
*Neovim* @cursorless-dev/code-owners @saidelike @fidgetingbits | ||
*nvim* @cursorless-dev/code-owners @saidelike @fidgetingbits | ||
*Nvim* @cursorless-dev/code-owners @saidelike @fidgetingbits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Neovim Lua Tests" | ||
description: "Set up Neovim Lua environment and run Busted tests" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: "luajit-2.1.0-beta3" | ||
- uses: leafo/gh-actions-luarocks@v4 | ||
- shell: bash | ||
run: | | ||
luarocks install busted | ||
luarocks install luafilesystem | ||
- shell: bash | ||
run: | | ||
cd cursorless.nvim | ||
busted --run unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,41 @@ jobs: | |
registryUrl: https://marketplace.visualstudio.com | ||
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} | ||
|
||
publish-neovim-extension: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
environment: production | ||
env: | ||
CURSORLESS_REPO_ROOT: ${{ github.workspace }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.CURSORLESS_BOT_TOKEN }} | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
- run: pnpm --color install | ||
- run: pnpm --color compile | ||
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build | ||
env: | ||
CURSORLESS_DEPLOY: true | ||
- name: Configure GPG Key | ||
run: | | ||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }} | ||
- name: git config | ||
run: | | ||
git config user.name cursorless-bot | ||
git config user.email [email protected] | ||
git config user.signingkey A9387720AFC62221 | ||
git config commit.gpgsign true | ||
- name: Push compiled files to cursorless.nvim plugin repo | ||
run: bash -x scripts/deploy-cursorless-nvim.sh | ||
|
||
push-cursorless-talon: | ||
name: Push cursorless-talon subrepo | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ jobs: | |
node-version-file: .nvmrc | ||
cache: pnpm | ||
- run: pnpm --color install | ||
- uses: leafo/gh-actions-lua@v9 | ||
- uses: leafo/gh-actions-luarocks@v4 | ||
- uses: pre-commit/[email protected] | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
std = luajit | ||
cache = true | ||
codes = true | ||
ignore = { "432" } | ||
|
||
globals = { | ||
"vim", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.