Closed nekowasabi closed 1 year ago
Cannot gather candidate by lsp_definition with vim-lsp. But enable gather canddidate by lsp_documentSymbol.
https://vim-jp.slack.com/archives/CLKR04BEF/p1699429772613499
if &compatible set nocompatible " Be iMproved endif if empty(glob('~/.config/nvim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall | source $MYVIMRC endif call plug#begin('~/.config/nvim/plugged') Plug 'vim-denops/denops.vim' Plug 'prabirshrestha/vim-lsp' Plug 'mattn/vim-lsp-settings' Plug 'Shougo/ddu.vim' Plug 'Shougo/ddu-ui-ff' Plug 'Shougo/ddu-kind-file' Plug 'Shougo/ddu-filter-matcher_substring' Plug 'uga-rosa/ddu-source-lsp' call plug#end() call ddu#custom#patch_global(#{ \ ui: 'ff', \ }) call ddu#custom#paaatch_global(#{ \ kindOptions: #{ \ file: #{ \ defaultAction: 'open', \ }, \ } \ }) call ddu#custom#patch_global(#{ \ sourceOptions: #{ \ _: #{ \ matchers: ['matcher_substring'], \ }, \ } \ }) let g:ddu_source_lsp_clientName = 'vim-lsp' call ddu#custom#patch_global(#{ \ kindOptions: #{ \ lsp: #{ \ defaultAction: 'open', \ }, \ lsp_codeAction: #{ \ defaultAction: 'apply', \ }, \ }, \}) nnoremap <silent> O \ <Cmd>call ddu#start(#{ \ sync: v:true, \ sources: [#{ \ name: 'lsp_documentSymbol', \ }], \ uiParams: #{ \ ff: #{ \ immediateAction: 'open', \ }, \ } \})<CR>
:PlugUpdate<CR>
O
<?php class A { public function __construct() { } /** * @return string */ public function aaa() { return 'ok'; } public function bbb() { return 'no'; } } $obj = new A();
Sorry, It's my environment mistake.
Environment
Description
Cannot gather candidate by lsp_definition with vim-lsp. But enable gather canddidate by lsp_documentSymbol.
slack URL
https://vim-jp.slack.com/archives/CLKR04BEF/p1699429772613499
minimal vimrc
Reproduce process
:PlugUpdate<CR>
O
aaaaexample