You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the choice between lsp.DocumentSymbol or RangeBasedDocumentSymbol. The latter points to a range that includes one of DeclarationTag, DefinitionTag, ReferenceTag or UnknownTag.
There is some information that is present in lsp.DocumentSymbol that doesn't appear to be able to be reconstructed from RangeBasedDocumentSymbol and the range tag:
lsp.DocumentSymbol contains a tags?: SymbolTag[] field, which isn't present in any of the range tags.
lsp.DocumentSymbol includes a name: string field while DefinitionTag and DeclarationTag include a text: string field.
Proposal 1: Add a field tags?: Symbol[] to DefinitionTag and DeclarationTag so that this information is present for symbols when a LSIF indexer chooses to use the RangeBasedDocumentSymbol-based representation.
Proposal 2: Add a name: string field to DefinitionTag and DeclarationTag or else rename the text: string field in these interfaces to name.
The text was updated successfully, but these errors were encountered:
dbaeumer
transferred this issue from microsoft/language-server-protocol
Mar 1, 2021
Having a symbol tag makes sense. And we should document that name === text. There needs to be some transformation anyways from a RangeBasedDocumentSymbol to a DocumentSymbol.
LSIF defines
DocumentSymbolResult
like this:Note the choice between
lsp.DocumentSymbol
orRangeBasedDocumentSymbol
. The latter points to a range that includes one ofDeclarationTag
,DefinitionTag
,ReferenceTag
orUnknownTag
.There is some information that is present in
lsp.DocumentSymbol
that doesn't appear to be able to be reconstructed fromRangeBasedDocumentSymbol
and the range tag:lsp.DocumentSymbol
contains atags?: SymbolTag[]
field, which isn't present in any of the range tags.lsp.DocumentSymbol
includes aname: string
field whileDefinitionTag
andDeclarationTag
include atext: string
field.Proposal 1: Add a field
tags?: Symbol[]
toDefinitionTag
andDeclarationTag
so that this information is present for symbols when a LSIF indexer chooses to use theRangeBasedDocumentSymbol
-based representation.Proposal 2: Add a
name: string
field toDefinitionTag
andDeclarationTag
or else rename thetext: string
field in these interfaces toname
.The text was updated successfully, but these errors were encountered: