Skip to content

LSP 3.18: support the smaller additions (markdown diagnostic messages, command tooltips, code action documentation and tags, …) #2247

Todo

Description

@lagergren

What

LSP4IJ supports the larger 3.18 additions:

  • textDocument/inlineCompletion;
  • textDocument/rangesFormatting;
  • workspace/textDocumentContent and its refresh;
  • workspace/foldingRange/refresh;
  • SnippetTextEdit (snippetEditSupport);
  • MessageType.Debug;
  • the label token type.

These smaller 3.18 additions are not supported:

Addition Spec Today in LSP4IJ
Diagnostic.message as MarkupContent, with textDocument.diagnostic.markupMessageSupport diagnostic client capabilities Not announced. A markdown message is shown as its raw source, and escaped in the tooltip (LSPDiagnosticFeature.java#L185-L195, #L204-L206).
Command.tooltip command A code lens's tooltip is its title (LSPCodeLensFeature.java#L112, #L115).
CodeActionOptions.documentation (per kind), with codeAction.documentationSupport code action client capabilities Not read. VS Code shows these as "Learn more" entries in the code action menu.
CodeAction.tags (LLMGenerated), with codeAction.tagSupport code action tag Not read. It could get an icon or a suffix in the intention list.
CodeActionKind.RefactorMove (refactor.move) code action kind Not in the announced valueSet (ClientCapabilitiesFactory.java#L142-L151). Such actions are still shown as intentions.
Relative patterns in document filters, with textDocument.filters.relativePatternSupport document filter Not supported: "Only support String patterns for now, not RelativePattern" (ExtendedDocumentSelector.java#L51).
WorkspaceEditMetadata (isRefactoring) on workspace/applyEdit, with workspaceEdit.metadataSupport workspace edit metadata Not read. It could name the undo command or group it as a refactoring.
CompletionList.applyKind (merge vs replace of itemDefaults.commitCharacters and data), with completionList.applyKindSupport completion list Not read. The item's value always replaces the default (LSPCompletionContributor.java#L250-L265), which is the spec's default.
signatureInformation.noActiveParameterSupport (activeParameter: null means none) signature help client capabilities Not supported: a missing active parameter falls back to the first one. LSP4J 1.0 has no field for the capability.
codeLens.resolveSupport code lens client capabilities Handled but not announced. It is in the "announce the client capabilities" issue.

Why

Few servers use these yet. VS Code's own client announces markupMessageSupport: false (vscode-languageclient, diagnostic.ts), so markdown diagnostic messages are rare. The others are announced by vscode-languageclient: Command.tooltip, documentationSupport, tagSupport, metadataSupport, applyKindSupport and relativePatternSupport (client.ts, codeAction.ts, completion.ts). New servers may start relying on them.

How it could be done

One item at a time. These can also be split into separate issues if preferred:

  • Command tooltip: pass command.getTooltip() as the tooltip argument of TextCodeVisionEntry and ClickableTextCodeVisionEntry when it is set. This is a one-line change.
  • Markdown messages:
    • render MarkupContent messages with the converter that hover uses, in the tooltip and in the Problems view (plain text);
    • keep the problem description plain, since an Annotation message is plain text;
    • announce markupMessageSupport.
  • Code action documentation: read CodeActionOptions.documentation, and add one intention per kind ("Learn more about …") that runs its command.
  • Code action tags: an LLMGenerated marker in the intention's text or icon. To decide.
  • Relative patterns in document selectors:
    • resolve baseUri (a workspace folder or URI) and the pattern against the file's path, as FileSystemWatcherManager already does for watchers;
    • announce filters.relativePatternSupport.
  • noActiveParameterSupport: needs LSP4J support first. Then activeParameter: null highlights no parameter.

Activity

  1. added
    enhancement
    on Nov 25, 2026
  2. added this to the Backlog milestone on Nov 30, 2026
  3. cordeirops commented on Nov 30, 2026

    @cordeirops
    Contributor

    I have implemented the Command.tooltip item and will open a PR for it.

    /assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions