Skip to content

Provide a way to override non-boolean server capabilities in the config #3001

Description

@jwortmann

Is your feature request related to a problem? Please describe.

JETLS includes the space character in the completion trigger characters, and that causes the completion popup to open whenever pressing space while typing, which I don't like.

Currently I can use

"disabled_capabilities": {
    "completionProvider.triggerCharacters": true,
}

to disable all trigger characters. But I'd rather like to disable only the space character, and keep the other trigger characters active.

Describe the solution you'd like

Perhaps a new config option

"capability_overrides": {
    "completionProvider.triggerCharacters": ["@", "\\", ":"]
}

that would override the given (sub-)key in the server capabilities.

So this would be a more flexible variant of disabled_capabilities. Other (non-boolean) server capabilities where this could be useful are signatureHelpProvider.triggerCharacters and documentOnTypeFormattingProvider.moreTriggerCharacter.

Furthermore, by convention the value null could be used to "unset" the given key and all sub-keys of that key, for example

"capability_overrides": {
    "completionProvider.triggerCharacters": null
}

would be equivalent to

"disabled_capabilities": {
    "completionProvider.triggerCharacters": true,
}

That would allow to replace and deprecate disabled_capabilities, if we want to do that. Just an idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions