Skip to content

Maybe use initializationOptions as additional source of settings #195

Closed
@krobelus

Description

@krobelus

This came up in this issue with the kak-lsp client.
Before the workaround for that issue, kak-lsp sent server configuration via the initialize request (in initializationOptions).
It only sent workspace/didChangeConfiguration when the configuration actually changed.
This caused problems because pylsp ignores initializationOptions. The workaround is to re-send options with workspace/didChangeConfiguration.

I wonder if it's a good idea to use initializationOptions as additional settings source.
I see two possible variants:

  1. Always include initializationOptions but let workspace/didChangeConfiguration override its settings
  2. As soon as workspace/didChangeConfiguration arrives, forget the initializationOptions

Annoyingly, option 2 would not have fixed the kak-lsp issue, because kak-lsp used to an empty
settings object in workspace/didChangeConfiguration (but that's an issue on our side).

It's probably also fine to leave it; LSP is quite underspecified about how these requests interact. I heard that both are deprecated in favor of workspace/configuration..

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions