Add default neovim lsp keymaps
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:
ReplaceWithRegisteris opt-in (not enabled by default)- Utility of lsp-default are far greater
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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