Skip to content

Use Telescope builtin functions for LSP definition and type definition#467

Merged
feoh merged 1 commit intonvim-lua:masterfrom
theopn:master
Oct 13, 2023
Merged

Use Telescope builtin functions for LSP definition and type definition#467
feoh merged 1 commit intonvim-lua:masterfrom
theopn:master

Conversation

@theopn
Copy link
Contributor

@theopn theopn commented Oct 13, 2023

I thought it was a little odd that every other LSP features use Telescope builtin but not those two. It will allow easier navigation when there are multiple symbol definitions.

We can also potentially do something like the following snippet to be safer and provide an example of pcall:

  -- ...
  local status, builtin = pcall(require, 'telescope.builtin')
  if status then
    nmap('gd', builtin.lsp_definitions, '[G]oto [D]efinition')
    -- ...
  else
    nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
    -- ...
  end

Although I am not sure it will be necessary since Telescope is very widely used in Kickstart and it might clutter the config and confuse beginners.

Copy link

@maxwelbm maxwelbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion

@feoh feoh merged commit 9b256d9 into nvim-lua:master Oct 13, 2023
qiuye2015 pushed a commit to qiuye2015/fjp.nvim that referenced this pull request Dec 10, 2023
Use Telescope builtin functions for LSP definition and type definition
@one2three4f
Copy link

one2three4f commented Mar 2, 2024

I thought it was strange the gd key wasn't working with this lsp https://github.com/Feel-ix-343/markdown-oxide , for some reason telescope's gd does not behave the same way vim's.

took a peek and lunar vim also keeps native gd.
https://github.com/LunarVim/LunarVim/blob/9ee3b7b8846d7ed2fa79f03d67083f8b95c897f2/lua/lvim/lsp/config.lua#L88

edit:
seems to be fixed soon:
nvim-telescope/telescope.nvim#2768

cbmorrell pushed a commit to cbmorrell/kickstart-modular.nvim that referenced this pull request Apr 22, 2024
Use Telescope builtin functions for LSP definition and type definition
s-frick pushed a commit to s-frick/kickstart.nvim that referenced this pull request Jul 29, 2024
Use Telescope builtin functions for LSP definition and type definition
melobern added a commit to melobern/kickstart.nvim that referenced this pull request Oct 30, 2024
Use Telescope builtin functions for LSP definition and type definition
smrznuti1 pushed a commit to smrznuti1/nvc that referenced this pull request Dec 17, 2024
Formatter now able to use local buffer tabstop config. One of the case
is when the tabstop is set by editorconfig.

Close nvim-lua#457
smrznuti1 pushed a commit to smrznuti1/nvc that referenced this pull request Dec 17, 2024
Formatter now able to use local buffer tabstop config. One of the case
is when the tabstop is set by editorconfig.

Close nvim-lua#457
felixhummel added a commit to felixhummel/nvim that referenced this pull request Dec 19, 2024
Use Telescope builtin functions for LSP definition and type definition
restray added a commit to restray/kickstart.nvim that referenced this pull request Mar 16, 2025
Use Telescope builtin functions for LSP definition and type definition
tkappedev pushed a commit to tkappedev/kickstart.nvim that referenced this pull request Jun 14, 2025
Use Telescope builtin functions for LSP definition and type definition
apriljarosz pushed a commit to apriljarosz/kickstart.nvim that referenced this pull request Jun 19, 2025
Use Telescope builtin functions for LSP definition and type definition
eduardofuncao pushed a commit to eduardofuncao/config.nvim that referenced this pull request Aug 5, 2025
Use Telescope builtin functions for LSP definition and type definition
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.

4 participants