Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(lsp): simplify list_to_jump #3099

Merged
merged 2 commits into from
May 14, 2024

Conversation

jamestrew
Copy link
Contributor

@jamestrew jamestrew commented May 14, 2024

clean up list_to_jump to work mostly with vim.lsp.util.locations_to_items output from the get-go

@jamestrew jamestrew merged commit e9be6bb into nvim-telescope:master May 14, 2024
9 checks passed
@jamestrew jamestrew deleted the lsp-jump-cleanup branch May 14, 2024 04:10
end
end

vim.lsp.util.jump_to_location(locations[1], offset_encoding, opts.reuse_win)
vim.lsp.util.jump_to_location(item.user_data, offset_encoding, opts.reuse_win)
Copy link
Contributor

@adriangoransson adriangoransson May 14, 2024

Choose a reason for hiding this comment

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

user_data is only in nightly for the moment :(

I get this on 0.9.5.

Error executing vim.schedule lua callback: ...lar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp/util.lua:1120: attempt to index local 'location' (a nil value)                                                       
stack traceback:                                                                                                                                                                                                   
        ...lar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp/util.lua:1120: in function 'jump_to_location'                                                                                                           
        ...nvim/lazy/telescope.nvim/lua/telescope/builtin/__lsp.lua:187: in function 'handler'                                                                                                                     
        ...w/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1393: in function ''                                                                                                                           
        vim/_editor.lua: in function <vim/_editor.lua:0>                          

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.

2 participants