You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
launch language server using command phpactor language-server --address=127.0.0.1:8888 -vvv
launch hx and open a PHP file.
Invoke code_action using <space>+a
Expected behavior:
LSP client connects with server
Actual behavior:
Status line says: "Language server not active for current buffer"
Helix log
❯ tail -f ~/.cache/helix/helix.log
2022-04-20T16:14:58.088 helix_lsp::transport [ERROR] err <- "note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\n"
2022-04-20T16:18:11.224 helix_lsp::transport [INFO] Language server not initialized, delaying request
2022-04-20T16:18:11.726 helix_term::application [ERROR] Timed out waiting for language servers to shutdown
2022-04-20T16:18:12.941 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false}},"window":{"workDoneProgress":true},"workspace":{"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"workspaceFolders":true}},"processId":193232,"rootPath":"/home/karim/Projects/IIPlatform/git/resource-server","rootUri":"file:///home/karim/Projects/IIPlatform/git/resource-server","workspaceFolders":[{"name":"resource-server","uri":"file:///home/karim/Projects/IIPlatform/git/resource-server"}]},"id":0}
2022-04-20T16:18:13.068 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":1,"completionProvider":{"triggerCharacters":[":",">","$"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":[],"documentSymbolProvider":[],"codeActionProvider":{"codeActionKinds":["quickfix.import_class","quickfix.complete_constructor","quickfix.complete_constructor_public","quickfix.create_class","quickfix.add_missing_properties","quickfix.implement_contracts","quickfix.fix_namespace_class_name","quickfix.generate_method","refactor.extract.method","refactor.extract.constant","quickfix.generate_accessors","refactor.extract.expression"]},"workspaceSymbolProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"executeCommandProvider":{"commands":["name_import","transform","create_class","generate_method","extract_method","extract_constant","generate_accessors","import_all_unresolved_names","extract_expression"]},"workspace":{"fileOperations":{"willRename":{"filters":[{"pattern":{"glob":"**\/*.php"}}]}}}},"serverInfo":[]}}
2022-04-20T16:18:13.068 helix_lsp::transport [INFO] <- {"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix.import_class","quickfix.complete_constructor","quickfix.complete_constructor_public","quickfix.create_class","quickfix.add_missing_properties","quickfix.implement_contracts","quickfix.fix_namespace_class_name","quickfix.generate_method","refactor.extract.method","refactor.extract.constant","quickfix.generate_accessors","refactor.extract.expression"]},"completionProvider":{"triggerCharacters":[":",">","$"]},"definitionProvider":true,"documentHighlightProvider":[],"documentSymbolProvider":[],"executeCommandProvider":{"commands":["name_import","transform","create_class","generate_method","extract_method","extract_constant","generate_accessors","import_all_unresolved_names","extract_expression"]},"hoverProvider":true,"implementationProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":1,"typeDefinitionProvider":true,"workspace":{"fileOperations":{"willRename":{"filters":[{"pattern":{"glob":"**/*.php"}}]}}},"workspaceSymbolProvider":true},"serverInfo":[]}
2022-04-20T16:18:13.068 helix_lsp [ERROR] failed to initialize language server: failed to parse: data did not match any variant of untagged enum OneOf
2022-04-20T20:30:39.471 helix_lsp::transport [INFO] Language server not initialized, delaying request
2022-04-20T20:30:39.973 helix_term::application [ERROR] Timed out waiting for language servers to shutdown
2022-04-21T12:46:27.731 helix_lsp [ERROR] failed to initialize language server: failed to parse: data did not match any variant of untagged enum OneOf
The server seems to be sending a message that breaks the LSP spec. I'm not sure what about the message is failing to parse though. You may need to compare the messages to the lsp spec
The server seems to be sending a message that breaks the LSP spec. I'm not sure what about the message is failing to parse though. You may need to compare the messages to the lsp spec
The issue seems to stem more than likely from phpactor returning an empty array for serverInfo.
Based on the LSP spec, serverInfo was introduced in 3.15 and is optional. LSP Spec: Initialize Result
Summary
Unable to use phpactor language server for php.
Attempting to connect results in the below error:
Reproduction Steps
phpactor.sh
and make it executable and add it path.language-server
for PHP inlanguages.toml
phpactor language-server --address=127.0.0.1:8888 -vvv
code_action
using<space>+a
Expected behavior:
LSP client connects with server
Actual behavior:
Status line says: "Language server not active for current buffer"
Helix log
Language Server Log
Here is the output from phpactor language-server:
Platform
Linux 5.16.19-76051619-generic x86_64
Terminal Emulator
tmux-256color
Helix Version
22.03-118-gb0bceb56
The text was updated successfully, but these errors were encountered: