-
Notifications
You must be signed in to change notification settings - Fork 6
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
Help with LSP JSON-RPC Response.. #10
Comments
Got me wondering if this LSP requires |
Hey EmranMR, It does should not require phpactor to be active. Not too sure about the error you are getting, what if you disable hover capabilities? |
Hey @haringsrob! The phpactor implementation worked really fine, In fact far more superior than the intelephense I had before so will be looking into porting that as well in the future as an extension! I checked the logs Phpactor and all the capabilities were returned correctly such as Now I did a quick search in your source code, not sure but might be related to To give you an example phpactor returns but the laravel-dev-tools return the following: "hoverProvider" : "Phpactor\\LanguageServerProtocol\\HoverClientCapabilities",
"definitionProvider" : "Phpactor\\LanguageServerProtocol\\DefinitionClientCapabilities",
"documentSymbolProvider" : "Phpactor\\LanguageServerProtocol\\DocumentSymbolClientCapabilities", This response is just returning the If we look at registerCapabilties public function registerCapabiltiies(ServerCapabilities $capabilities): void
{
$options = new CompletionOptions();
$options->triggerCharacters = ['<', ':', '@'];
$capabilities->completionProvider = $options;
$capabilities->definitionProvider = DefinitionClientCapabilities::class;
$capabilities->hoverProvider = HoverClientCapabilities::class;
$capabilities->documentSymbolProvider = DocumentSymbolClientCapabilities::class;
} |
I just hardcoded the "hoverProvider" : true,
"definitionProvider" : "Phpactor\\LanguageServerProtocol\\DefinitionClientCapabilities",
"documentSymbolProvider" : "Phpactor\\LanguageServerProtocol\\DocumentSymbolClientCapabilities", so registerCapabilties worth having a look at. Although now I am getting errors such as:
I reckon VsCode prob has better error handling that is why it is working in VScode? Thanks |
Hello @haringsrob.
I am very keen to try your LSP however I hit some roadblocks. I was wondering if you could help. I should also mention I am not an expert in LSP by any means. I am just trying to port this LSP into Nova by following the documentations 😊
I am writing an extension for the Nova editor. Please checkout the branch named
LSP
if you need to.You can check out the documentation by Nova about their language-client. Here is a summary of installation:
./laravel-dev-tools app:build
and copied into the extension root.builds/
folder of your repo inside my extension.LanguageClient
to your executable viastdio
Based on the docs on Nova and your repo that should be it. In fact it seemed to have worked fine in sublime, neovim and vsCode looking at the other issues. But I get errors in return for some reason.
Once I initiate the LSP I get the following error in debug mode:
To summerise Nova is moaning about the
hoverProvider
not havingExpected Bool or HoverOptions
as the value because the value isPhpactor\\LanguageServerProtocol\\HoverClientCapabilities
, see below 👇1. Error Messages
2. Nova's Request to the LSP
3. Laravel-dev-tools Response
The text was updated successfully, but these errors were encountered: