Skip to content

Commit f36056b

Browse files
committed
Merge 'upstream': telescope branch, lsp keybindings, spelling
- Remove Telescope `0.1` branch lock - Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 - fix: minor misspellings
2 parents 153ec74 + 9929044 commit f36056b

4 files changed

Lines changed: 24 additions & 29 deletions

File tree

lua/keymaps.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
3131
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
3232
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
3333

34-
-- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes
34+
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
3535
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
3636
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
3737
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })

lua/kickstart/plugins/lspconfig.lua

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

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

8083
-- Find references for the word under your cursor.
81-
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
84+
map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
8285

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

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

9299
-- Fuzzy find all the symbols in your current document.
93100
-- Symbols are things like variables, functions, types, etc.
94-
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
101+
map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
95102

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

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

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

lua/kickstart/plugins/telescope.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ return {
99
{ -- Fuzzy Finder (files, lsp, etc)
1010
'nvim-telescope/telescope.nvim',
1111
event = 'VimEnter',
12-
branch = '0.1.x',
1312
dependencies = {
1413
'nvim-lua/plenary.nvim',
1514
{ -- If encountering errors, see telescope-fzf-native README for installation instructions

lua/kickstart/plugins/which-key.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ return {
5959

6060
-- Document existing key chains
6161
spec = {
62-
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
63-
{ '<leader>d', group = '[D]ocument' },
64-
{ '<leader>r', group = '[R]ename' },
6562
{ '<leader>s', group = '[S]earch' },
66-
{ '<leader>w', group = '[W]orkspace' },
6763
{ '<leader>t', group = '[T]oggle' },
6864
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
6965
},

0 commit comments

Comments
 (0)