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

LSP client not found #13

Closed
aauren opened this issue Mar 21, 2024 · 7 comments
Closed

LSP client not found #13

aauren opened this issue Mar 21, 2024 · 7 comments

Comments

@aauren
Copy link
Contributor

aauren commented Mar 21, 2024

Whenever I try to launch scope.vim from a key binding (nnoremap <C-p> <scriptcmd>vim9cmd scope#fuzzy#File()<CR>)I get the following error and no modal dialog appears

Error detected while processing /home/<home>/.vim/bundle/scope.vim/autoload/scope/fuzzy.vim[6]../home/auren/.vim/bundle/scope.vim/autoload/scope/lsp.vim:
line    4:
LSP client not found

This appears to come from

if !exists('g:loaded_lsp')
    echoerr 'LSP client not found'
    finish
endif

But I can't see anything that sets g:loaded_lsp. I did notice from the readme a link to https://github.com/yegappan/lsp so maybe it comes from there? However, I don't see in the requirements section that this is something that is required.

Additionally, I already use coc.vim for this purpose and would prefer not to use https://github.com/yegappan/lsp if at all possible.

@aauren
Copy link
Contributor Author

aauren commented Mar 21, 2024

FWIW Subsequent key combos after the error all appear to work.

girishji referenced this issue Mar 22, 2024
M  autoload/scope/lsp.vim
@girishji
Copy link
Owner

Should be fixed.

@aauren
Copy link
Contributor Author

aauren commented Mar 22, 2024

I can confirm that after updating this is fixed.

Quick question before I close this out, what was the expected functionality that I was missing by not having g:loaded_lsp set?

@girishji
Copy link
Owner

girishji commented Mar 22, 2024

LspDocumentSymbols(). It gathers symbols from LSP and you can search on them and jump.

@aauren
Copy link
Contributor Author

aauren commented Mar 22, 2024

Is there any chance that you will support other LSP integrations like coc.vim in the future?

@girishji
Copy link
Owner

I updated the comment. LspDocumentSymbols() should work.

Other LSP clients can be supported only if their APIs are exported. I use yegappan lsp, so it is no 'extra work' for me to look into issues. I can also make changes to yegappan lsp since I know the codebase quite well. Other Lsp's are extra work only because I do not know the codebase and it is not pleasant wading through legacy script (unlike vim9script).

@aauren
Copy link
Contributor Author

aauren commented Mar 22, 2024

Thanks for all your help! And for putting this plugin together!

I had been looking for how to get grep-like functionality from CTRLP for a long time. This plugin is a huge leap forward for me!

@aauren aauren closed this as completed Mar 22, 2024
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

No branches or pull requests

2 participants