Skip to content

Conversation

theopn
Copy link
Contributor

@theopn theopn commented Mar 29, 2025

                                          *grr* *gra* *grn* *gri* *i_CTRL-S*
Some keymaps are created unconditionally when Nvim starts:
- "grn" is mapped in Normal mode to |vim.lsp.buf.rename()|
- "gra" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()|
- "grr" is mapped in Normal mode to |vim.lsp.buf.references()|
- "gri" is mapped in Normal mode to |vim.lsp.buf.implementation()|
- "gO" is mapped in Normal mode to |vim.lsp.buf.document_symbol()|
- CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()|

Neovim 0.11 introduced many default LSP keybindings prefixed with gr, and this PR changes the Telescope keybindings defined in LspAttach autocmds to match the default ones.

I think changing other keybindings (<leader>D for type definition and <leader>ws for workspace symbols) to have g prefix should also be considered.

@arerossehaug
Copy link

Any reason to choose gca over gra for code actions?
While the [G]oto [C]ode [A]ction makes more sense than [G]oto [R]? [A]ction, the gra is a smoother key combination in my opinion

Semi related, but should it be considered that gd (goto definition) should become grd?

@theopn
Copy link
Contributor Author

theopn commented Mar 31, 2025

@arerossehaug 😅 just a typo, I amended it to be gra. My idea was to follow the default keybindings provided by Neovim to minimize the confusion.

I have also added a commit for changing the other keybindings, prefixing gr for "Goto" and g for opening a list of symbols:

  • gd -> grd for goto definition
  • gD -> grD for goto declaration
  • <leader>D -> grt for type definition
  • <leader>w -> gW for workspace symbols

@feoh
Copy link
Collaborator

feoh commented Apr 9, 2025

I have no feelings about this, but making changes to key bindings always ends up with a million angry WHY DID YOU MOVE MY CHEESE? comments.

Thoughts from everyone?

@theopn
Copy link
Contributor Author

theopn commented Apr 9, 2025

@feoh I agree that changing keybindings can cause confusion, but I have two arguments for this particular changes:

  1. some existing keybindings (e.g., gr for LSP references) conflicts with the new default keybindings in 0.11, so we need to either delete the default keybindings or change our keybindings; see [Suggestion] default lsp key mappings in neovim v0.11.0 will interfere existing key mappings in lspconfig #1436
  2. these are the default keybindings that Neovim will use moving forward, and considering the demographics of people using Kickstart (lots of beginners and new to configuring Neovim) and how they use Kickstart (use to build their own config), I think it is important to let them know that default keybindings for such and such actions exist.

Thoughts?

@chrstief
Copy link

chrstief commented Apr 9, 2025

If the kickstart project was started today, they would go with the default nvim keybinds. I’m in support of this change, instead of sticking to non default keybinds for historic reasons.

@feoh
Copy link
Collaborator

feoh commented Apr 9, 2025

Two people voting yay is enough for me :) Thanks all! merging.

@feoh feoh merged commit 1a5787b into nvim-lua:master Apr 9, 2025
1 check passed
dribic pushed a commit to dribic/nvim-files that referenced this pull request Apr 9, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
fluxth added a commit to fluxth/nvim-config that referenced this pull request Apr 10, 2025
…roduced in Neovim 0.11 (nvim-lua#1427)"

This reverts commit 1a5787b.

I'm not in the mood to learn new keybindings right now.
Will do it in my own time.
fluxth added a commit to fluxth/nvim-config that referenced this pull request Apr 10, 2025
…roduced in Neovim 0.11 (nvim-lua#1427)"

This reverts commit 1a5787b.

I'm not in the mood to learn new keybindings right now.
Will do it in my own time.
dimitrov-anasoft pushed a commit to dimitrov-anasoft/kickstart.nvim that referenced this pull request Apr 10, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
@5brian
Copy link

5brian commented Apr 11, 2025

Sorry to necro this, would a pr to add the few leader key bindings back in comments be accepted?

For example:


-- If you prefer the legacy <leader> keymaps,
-- you can uncomment the following lines

faizfrhn added a commit to faizfrhn/kickstart.nvim that referenced this pull request Apr 11, 2025
* Change LSP Keybindings to Match the Default gr Bindings Introduced in Neovim 0.11 (nvim-lua#1427)
* Remove Telescope 0.1 branch lock (nvim-lua#1448)
vencronys pushed a commit to vencronys/kickstart.nvim that referenced this pull request Apr 12, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
DerFrZocker pushed a commit to DerFrZocker/.dotfiles-nvim that referenced this pull request Apr 12, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
vizzersrc pushed a commit to vizzersrc/vizzer.nvim that referenced this pull request Apr 13, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
Jidou pushed a commit to Jidou/kickstart.nvim that referenced this pull request Apr 14, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
mascanio pushed a commit to mascanio/kickstart.nvim that referenced this pull request Apr 17, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
chrisBosse pushed a commit to chrisBosse/kickstart.nvim that referenced this pull request Apr 17, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
tsaeger added a commit to tsaeger/dotvim that referenced this pull request Apr 18, 2025
nickgnd added a commit to nickgnd/kickstart.nvim that referenced this pull request Apr 21, 2025
mirite pushed a commit to mirite/kickstart.nvim that referenced this pull request Apr 22, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
vantmet pushed a commit to vantmet/kickstart.nvim that referenced this pull request Apr 24, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
Shadowmeister pushed a commit to Shadowmeister/nvim that referenced this pull request Apr 27, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
nogurenn pushed a commit to nogurenn/kickstart.nvim that referenced this pull request Apr 27, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
GabrielTorland pushed a commit to GabrielTorland/kickstart.nvim that referenced this pull request Apr 27, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
melito00 pushed a commit to melito00/kickstart.nvim that referenced this pull request May 25, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
audunhov pushed a commit to audunhov/kickstart.nvim that referenced this pull request May 30, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
ruolis pushed a commit to ruolis/kickstart.nvim that referenced this pull request Jun 10, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
rsandtner pushed a commit to rsandtner/kickstart.nvim that referenced this pull request Jun 11, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
invalidoperation pushed a commit to invalidoperation/kickstart.nvim that referenced this pull request Jun 14, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
invalidoperation pushed a commit to invalidoperation/kickstart.nvim that referenced this pull request Jun 14, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
screwage pushed a commit to screwage/kickstart.nvim that referenced this pull request Jun 17, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
cameroncc added a commit to cameroncc/kickstart.nvim that referenced this pull request Jun 19, 2025
…roduced in Neovim 0.11 (nvim-lua#1427)"

Keep legacy keymaps for now

This reverts commit 1a5787b.
Kilo-Loco pushed a commit to Kilo-Loco/kickstart.nvim that referenced this pull request Jun 24, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
julianbopp pushed a commit to julianbopp/kickstart.nvim that referenced this pull request Jun 26, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
knguyen-66 pushed a commit to knguyen-66/kickstart.nvim that referenced this pull request Jun 28, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
DannyHo15 pushed a commit to DannyHo15/kickstart.nvim that referenced this pull request Jun 29, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
codemedic added a commit to codemedic/kickstart.nvim that referenced this pull request Jul 10, 2025
* master:
  Update remaining Mason's old address (nvim-lua#1530)
  fix: rename vim.highlight.on_yank to vim.hl.on_yank (nvim-lua#1482)
  README: mention fd-find in requirements (nvim-lua#1477)
  don't lazy-load neo-tree so netrw hijacking on startup works (nvim-lua#1489)
  Replace vim.opt with vim.o (nvim-lua#1495)
  feat: switch vim-sleuth for guess-indent.nvim (nvim-lua#1512)
  Change to Mason's new address (nvim-lua#1516)
  feat: switch nvim-cmp for blink.cmp (nvim-lua#1426)
  Remove Telescope `0.1` branch lock (nvim-lua#1448)
  Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (nvim-lua#1427)
  fix: minor misspellings (nvim-lua#1450)
  feat(keymap): move windows without `<C-w>` (nvim-lua#1368)
  changed Conform's format_on_save lambda so that buffers that match disable_filetypes return nil. This allows you to enable a formatter for langages in the disable_filetypes table to have a formatter that can be run manually with Leader-f but doesnt enable format_on_save for them (nvim-lua#1395)
  fix: use correct github abmonition syntax (nvim-lua#1414)
  feat: add `vim.opt.confirm = true` (nvim-lua#1384)
cameroncc added a commit to cameroncc/kickstart.nvim that referenced this pull request Jul 12, 2025
…roduced in Neovim 0.11 (nvim-lua#1427)"

Keep legacy keymaps for now

This reverts commit 1a5787b.
louislouist pushed a commit to louislouist/kickstart-modular.nvim that referenced this pull request Jul 15, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
rexfordessilfie pushed a commit to rexfordessilfie/kickstart.nvim that referenced this pull request Jul 22, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
adityaravichandran6 added a commit to adityaravichandran6/mazov.nvim that referenced this pull request Aug 5, 2025
* fix: minor misspellings (nvim-lua#1450)

* fix: minor misspellings

* revert change for `-Bbuild`

* Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention

* Remove Telescope `0.1` branch lock (nvim-lua#1448)

* feat: switch nvim-cmp for blink.cmp (nvim-lua#1426)

* Change to Mason's new address (nvim-lua#1516)

* feat: switch vim-sleuth for guess-indent.nvim (nvim-lua#1512)

* Replace vim.opt with vim.o (nvim-lua#1495)

* Replace vim.opt with vim.o

Because it offers a nicer interface and info on hover.
For now leave vim.opt when using the table interface (until vim.o
with tables is implemented)

* Add type hint for vim.opt.rtp

* Add a comment about using vim.opt instead of vim.o

* don't lazy-load neo-tree so netrw hijacking on startup works (nvim-lua#1489)

* README: mention fd-find in requirements (nvim-lua#1477)

Fixes nvim-lua#1476

* fix: rename vim.highlight.on_yank to vim.hl.on_yank (nvim-lua#1482)

The functions of vim.highlight were renamed to vim.hl on commit
18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied
with the release of nvim version 0.11.

Now, the use of vim.highlight is deprecated, and instead, one should
use vim.hl functions.
In practice, vim.highlight is still working, however, asking for help
for vim.highlight.on_yank fails (E149), while asking for help for
vim.hl.on_yank works as expected. So, by updating the used function, a
new user will have easier time looking getting the relevant help.

Co-authored-by: Omri Sarig <[email protected]>

* Update remaining Mason's old address (nvim-lua#1530)

* Initial plugin setup (#1)

This adds a basic layer of plugins. But more language and workflow specific plugins are to follow possibly.

---------

Co-authored-by: dasvh <[email protected]>
Co-authored-by: Theo P. <[email protected]>
Co-authored-by: Dmytro Onypko <[email protected]>
Co-authored-by: Liam Dyer <[email protected]>
Co-authored-by: guru245 <[email protected]>
Co-authored-by: Ori Perry <[email protected]>
Co-authored-by: pynappo <[email protected]>
Co-authored-by: Damjan 9000 <[email protected]>
Co-authored-by: Omri Sarig <[email protected]>
Co-authored-by: Omri Sarig <[email protected]>
Co-authored-by: Carlos Calla Alarcón <[email protected]>
eduardofuncao pushed a commit to eduardofuncao/config.nvim that referenced this pull request Aug 5, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
adityaravichandran6 added a commit to adityaravichandran6/mazov.nvim that referenced this pull request Aug 7, 2025
* fix: minor misspellings (nvim-lua#1450)

* fix: minor misspellings

* revert change for `-Bbuild`

* Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention

* Remove Telescope `0.1` branch lock (nvim-lua#1448)

* feat: switch nvim-cmp for blink.cmp (nvim-lua#1426)

* Change to Mason's new address (nvim-lua#1516)

* feat: switch vim-sleuth for guess-indent.nvim (nvim-lua#1512)

* Replace vim.opt with vim.o (nvim-lua#1495)

* Replace vim.opt with vim.o

Because it offers a nicer interface and info on hover.
For now leave vim.opt when using the table interface (until vim.o
with tables is implemented)

* Add type hint for vim.opt.rtp

* Add a comment about using vim.opt instead of vim.o

* don't lazy-load neo-tree so netrw hijacking on startup works (nvim-lua#1489)

* README: mention fd-find in requirements (nvim-lua#1477)

Fixes nvim-lua#1476

* fix: rename vim.highlight.on_yank to vim.hl.on_yank (nvim-lua#1482)

The functions of vim.highlight were renamed to vim.hl on commit
18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied
with the release of nvim version 0.11.

Now, the use of vim.highlight is deprecated, and instead, one should
use vim.hl functions.
In practice, vim.highlight is still working, however, asking for help
for vim.highlight.on_yank fails (E149), while asking for help for
vim.hl.on_yank works as expected. So, by updating the used function, a
new user will have easier time looking getting the relevant help.

Co-authored-by: Omri Sarig <[email protected]>

* Update remaining Mason's old address (nvim-lua#1530)

* Initial plugin setup (#1)

This adds a basic layer of plugins. But more language and workflow specific plugins are to follow possibly.

---------

Co-authored-by: dasvh <[email protected]>
Co-authored-by: Theo P. <[email protected]>
Co-authored-by: Dmytro Onypko <[email protected]>
Co-authored-by: Liam Dyer <[email protected]>
Co-authored-by: guru245 <[email protected]>
Co-authored-by: Ori Perry <[email protected]>
Co-authored-by: pynappo <[email protected]>
Co-authored-by: Damjan 9000 <[email protected]>
Co-authored-by: Omri Sarig <[email protected]>
Co-authored-by: Omri Sarig <[email protected]>
Co-authored-by: Carlos Calla Alarcón <[email protected]>
thiago-negri added a commit to thiago-negri/kickstart.nvim that referenced this pull request Aug 11, 2025
Adds 'gr' to which-keys documentation, so users can see that LSP actions are grouped after 'gr' key binds.

It used to be directly under 'g', which required no additional grouping info on which-keys. See nvim-lua#1427 for further explanation on the key binds change.
devloglogan pushed a commit to devloglogan/kickstart.nvim that referenced this pull request Aug 11, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
alex-rieger pushed a commit to alex-rieger/kickstart.nvim that referenced this pull request Aug 17, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
k7o pushed a commit to k7o/kickstart.nvim that referenced this pull request Aug 18, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
benfleuty pushed a commit to benfleuty/kickstart.nvim that referenced this pull request Aug 19, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
LoganSchmalz pushed a commit to LoganSchmalz/kickstart.nvim that referenced this pull request Aug 21, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
ncason pushed a commit to ncason/kickstart.nvim that referenced this pull request Aug 23, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
nrhooks17 pushed a commit to nrhooks17/central-nvim that referenced this pull request Aug 26, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
sooren-ghodsi pushed a commit to sooren-ghodsi/kickstart.nvim that referenced this pull request Aug 26, 2025
…in Neovim 0.11 (nvim-lua#1427)

* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
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.

5 participants