Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

🐛 Should not use dynamic capability registration unless client supports it #4337

Open
1 task done
benjamineskola opened this issue Mar 31, 2023 · 0 comments
Open
1 task done
Labels
A-LSP Area: language server protocol S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@benjamineskola
Copy link

benjamineskola commented Mar 31, 2023

Environment information

CLI:
  Version:                      12.0.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.15.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "null"

Rome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true

Workspace:
  Open Documents:               0

Discovering running Rome servers...

Server:
  Status:                       stopped

What happened?

Using rome lsp-proxy with helix, neither formatting nor diagnostics appear to work and the following messages appear in the log.

2023-03-31T18:29:20.795 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, MethodCall(MethodCall { jsonrpc: Some(V2), method: "client/registerCapability", params: Map({"registrations": Array [Object {"id": String("rome_formatting"), "method": String("textDocument/formatting")}, Object {"id": String("rome_range_formatting"), "method": String("textDocument/rangeFormatting")}, Object {"id": String("rome_on_type_formatting"), "method": String("textDocument/onTypeFormatting"), "registerOptions": Object {"documentSelector": Null, "firstTriggerCharacter": String("}"), "moreTriggerCharacter": Array [String("]"), String(")")]}}, Object {"id": String("rome_did_change_workspace_settings"), "method": String("workspace/didChangeWatchedFiles"), "registerOptions": Object {"watchers": Array [Object {"globPattern": String("/Users/ben/.config/rome.json"), "kind": Number(7)}]}}]}), id: Num(4) })))
2023-03-31T18:29:20.795 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server

There are several of the same kind. I can provide a full log if it's helpful, but possibly most of it is more relevant to helix.

I found similar issues raised with other LSP servers: e.g. bash-lsp/bash-language-server#763

Expected result

No warnings in logs, formatting/diagnostics to work.

(I can't actually tell if this is the cause of the failure or if I have some other configuration issue too, but since the log message requests reporting it I thought I'd do so.)

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@benjamineskola benjamineskola added the S-To triage Status: user report of a possible bug that needs to be triaged label Mar 31, 2023
@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug A-LSP Area: language server protocol and removed S-To triage Status: user report of a possible bug that needs to be triaged labels May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-LSP Area: language server protocol S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants