VSCodeVim / VSCodeVim/Vim

Add default neovim lsp keymaps

Open
#9,995 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
I would like default neovim lsp commands to work ootb. The gr* commands. Context, nvim-lsp-defaults

Describe the solution you'd like
Include the keymaps by default.

Describe alternatives you've considered
I can for now add these keymaps in settings.json.


  "vim.normalModeKeyBindingsNonRecursive": [
    { "before": [ "g", "r", "a" ], "commands": [ "editor.action.codeAction" ] },
    { "before": [ "g", "r", "n" ], "commands": [ "editor.action.rename" ] },
    { "before": [ "g", "r", "i" ], "commands": [ "editor.action.goToImplementation" ] },
    { "before": [ "g", "r", "x" ], "commands": [ "codelens.showLensesInCurrentLine" ] },
    { "before": [ "g", "r", "r" ], "commands": [ "editor.action.goToReferences" ] },
    { "before": [ "g", "r", "t" ], "commands": [ "editor.action.goToTypeDefinition" ] },
  ]

Additional context

Vscodevim ships an opt-in ReplaceWithRegister plugin, which use the gr{motion}.

Proposed solution: remap ReplaceWithRegister's default keymap from gr{motion} to gR{motion}, freeing up gr for the LSP defaults above. This is a breaking change for any existing ReplaceWithRegister users relying on the gr default, but:

  • ReplaceWithRegister is opt-in (not enabled by default)
  • Utility of lsp-default are far greater

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the default keybinding configuration and the opt-in ReplaceWithRegister plugin. Compare the requested gr* mappings with the existing gr{motion} bindings and the nvim-lsp-defaults reference. Done means the LSP mappings work by default and ReplaceWithRegister uses the proposed gR{motion} mapping without conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
neovim, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.