Closed PrajitP closed 4 years ago
It turn out LanguageClient-neovim I am using does not support workspace/workspaceFolders feature.
Perl::LanguageServer::Parser->background_parser()
only parse workspace from 'workspace folder'.
Not sure if it's write design, but I think it should also parse 'rootURI' directory as it is consider as default root if 'workspace folder' is missing.
Fixed in commit 19721b14f8dbd1f0c84d7dee6d11f82dbdcb3157
Note
I don't think this is bug. It is mostly me trying to figure out how to configure this language server to work with 'vim' or 'neovim'.
Given that all the code exist and is also being in used, and is tested with
vscode
. I am trying to understand howvscode
language client works, specially when are method related toworkspace
get trigger and what is the content of those methods.Once I figure this out I will configure my
neovim
language client to send that command and also document it for others.TODO
How to reproduce
let g:LanguageClient_serverCommands = { \ 'perl': ['perl', '-MPerl::LanguageServer', '-e', 'Perl::LanguageServer::ru n', '--', '--debug', '--version', '2.1.0'], \ } let g:LanguageClient_loggingFile = expand('~/LanguageClient.log') let g:LanguageClient_serverStderr = expand('~/LanguageClientStderr.log') let g:LanguageClient_loggingLevel='DEBUG'
$string
on 2nd line.result
Issue
After debugging found that the,
symbols
attribute for$workspace
(Perl::LanguageServer::Workspace
) are not populated. As a result of it, 2 of functionalitydefinitionProvider
andreferencesProvider
which depends on 'workspace symbols' don't work. Looking through code I found that in modulePerl::LanguageServer
there is a methodwhich populates the symbols for workspace, but looks like it not called from anywhere in the code.
Module
Perl::LanguageServer::Methods::workspace
also has 2 methodwere
symbols
for workspace are populated, I am trying to figure out how and when to trigger them form 'neovim client'.