Skip to content

Commit 106f39f

Browse files
committed
Merge upstream kickstart.nvim changes
* 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)
1 parent 4745132 commit 106f39f

File tree

3 files changed

+23
-27
lines changed

3 files changed

+23
-27
lines changed

lua/kickstart/plugins/lspconfig.lua

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,42 +73,42 @@ return {
7373
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
7474
end
7575

76-
-- Jump to the definition of the word under your cursor.
77-
-- This is where a variable was first declared, or where a function is defined, etc.
78-
-- To jump back, press <C-t>.
79-
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
76+
-- Rename the variable under your cursor.
77+
-- Most Language Servers support renaming across files, etc.
78+
map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
79+
80+
-- Execute a code action, usually your cursor needs to be on top of an error
81+
-- or a suggestion from your LSP for this to activate.
82+
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
8083

8184
-- Find references for the word under your cursor.
82-
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
85+
map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
8386

8487
-- Jump to the implementation of the word under your cursor.
8588
-- Useful when your language has ways of declaring types without an actual implementation.
86-
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
89+
map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
8790

88-
-- Jump to the type of the word under your cursor.
89-
-- Useful when you're not sure what type a variable is and you want to see
90-
-- the definition of its *type*, not where it was *defined*.
91-
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
91+
-- Jump to the definition of the word under your cursor.
92+
-- This is where a variable was first declared, or where a function is defined, etc.
93+
-- To jump back, press <C-t>.
94+
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
95+
96+
-- WARN: This is not Goto Definition, this is Goto Declaration.
97+
-- For example, in C this would take you to the header.
98+
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
9299

93100
-- Fuzzy find all the symbols in your current document.
94101
-- Symbols are things like variables, functions, types, etc.
95-
map('<leader>cs', require('telescope.builtin').lsp_document_symbols, 'Document Symbols')
102+
map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
96103

97104
-- Fuzzy find all the symbols in your current workspace.
98105
-- Similar to document symbols, except searches over your entire project.
99-
map('<leader>cS', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Workspace Symbols')
100-
101-
-- Rename the variable under your cursor.
102-
-- Most Language Servers support renaming across files, etc.
103-
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
104-
105-
-- Execute a code action, usually your cursor needs to be on top of an error
106-
-- or a suggestion from your LSP for this to activate.
107-
map('<leader>ca', vim.lsp.buf.code_action, 'Code Action', { 'n', 'x' })
106+
map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
108107

109-
-- WARN: This is not Goto Definition, this is Goto Declaration.
110-
-- For example, in C this would take you to the header.
111-
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
108+
-- Jump to the type of the word under your cursor.
109+
-- Useful when you're not sure what type a variable is and you want to see
110+
-- the definition of its *type*, not where it was *defined*.
111+
map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
112112

113113
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
114114
---@param client vim.lsp.Client

lua/kickstart/plugins/telescope.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ return {
22
{ -- Fuzzy Finder (files, lsp, etc)
33
'nvim-telescope/telescope.nvim',
44
event = 'VimEnter',
5-
branch = '0.1.x',
65
dependencies = {
76
'nvim-lua/plenary.nvim',
87
{ -- If encountering errors, see telescope-fzf-native README for installation instructions

lua/kickstart/plugins/which-key.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ return {
4545

4646
-- Document existing key chains
4747
spec = {
48-
{ '<leader>c', group = 'Code', mode = { 'n', 'x' } },
49-
{ '<leader>d', group = 'Document' },
5048
{ '<leader>f', group = 'Find' },
51-
{ '<leader>r', group = 'Rename' },
5249
{ '<leader>s', group = 'Search' },
5350
{ '<leader>t', group = 'Toggle' },
5451
{ '<leader>h', group = 'Git Hunk', mode = { 'n', 'v' } },

0 commit comments

Comments
 (0)