Backlog
Labels
enhancementNew feature or request
Milestone
Description
What
textDocument/moniker (3.16) returns, for the symbol at a position, one or more Monikers:
scheme, e.g.tsc,npm,maven;identifier;unique(document,project,group,scheme,global);kind(import,export,local).
They identify a symbol across projects and indexes, and were made for LSIF: "to link symbols across different indexes, for example go to definition into a dependency".
- The client announces it with
textDocument.moniker. - The server announces it with
monikerProvider.
Why
Little demand, so far:
- Servers: none of rust-analyzer (
moniker_provider: Noneincapabilities.rs), gopls (Monikeris inunimplemented.go), clangd (not bound inClangdLSPServer.cpp), jdtls or typescript-language-server offers it. rust-analyzer computes monikers only for its LSIF and SCIP output. - Clients:
vscode-languageclienthas no moniker feature either (nomoniker.ts). VS Code has no UI for monikers.
Today
- ❌ in LSPSupport.md#L69.
- No
textDocument.monikercapability is sent (ClientCapabilitiesFactory.java). monikeris never called.
How it could be done
There is no direct IntelliJ counterpart. Possible uses:
- Copy Reference:
- a
CopyReferenceAction-like action that copiesscheme:identifier; - IntelliJ's
QualifiedNameProviderextension point (com.intellij.qualifiedNameProvider) is the hook for Edit › Copy Path/Reference › Copy Reference; - this is the most visible use, and the only one that doesn't need an index.
- a
- Cross-server navigation: match an
importmoniker in one server against anexportmoniker of another, e.g. a library's own server. That needs a symbol index on the client, which LSP4IJ doesn't have.
Suggestion: keep it ❌ unless a server or adopter asks for it. If one does, start with Copy Reference.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
lagergren commentedon Nov 27, 2026
An adopter's use case, from the Ecstasy language server (xtclang/xvm):
User projects refer to the XDK's libraries, whose sources another open project, the XDK's own, serves with its own
language server. A definition or references request for a library symbol in a user's project then has no declaration
to give, since the server there has the library only as compiled modules. With monikers, LSP4IJ could ask the other
open projects' servers for the same moniker (an
importmoniker in the using project, itsexportin the declaringone) and navigate to the declaration in the XDK's sources: the cross-server navigation described above.
(Moved here from #2307, which duplicated this issue.)