@@ -669,14 +669,14 @@ func (l *LanguageService) ProvideReferences(ctx context.Context, params *lsproto
669669 )
670670}
671671
672- func (l * LanguageService ) ProvideVsReferences (ctx context.Context , params * lsproto.ReferenceParams , orchestrator CrossProjectOrchestrator ) (lsproto.VsReferencesResponse , error ) {
672+ func (l * LanguageService ) ProvideVSReferences (ctx context.Context , params * lsproto.ReferenceParams , orchestrator CrossProjectOrchestrator ) (lsproto.VSReferencesResponse , error ) {
673673 return handleCrossProject (
674674 l ,
675675 ctx ,
676676 params ,
677677 orchestrator ,
678- (* LanguageService ).symbolAndEntriesToVsReferences ,
679- combineVsReferences ,
678+ (* LanguageService ).symbolAndEntriesToVSReferences ,
679+ combineVSReferences ,
680680 false , /*isRename*/
681681 false , /*implementations*/
682682 symbolEntryTransformOptions {},
@@ -691,10 +691,10 @@ func (l *LanguageService) symbolAndEntriesToReferences(ctx context.Context, para
691691 return lsproto.LocationsOrNull {Locations : & locations }, nil
692692}
693693
694- func (l * LanguageService ) symbolAndEntriesToVsReferences (ctx context.Context , params * lsproto.ReferenceParams , data SymbolAndEntriesData , options symbolEntryTransformOptions ) (lsproto.VsReferencesResponse , error ) {
694+ func (l * LanguageService ) symbolAndEntriesToVSReferences (ctx context.Context , params * lsproto.ReferenceParams , data SymbolAndEntriesData , options symbolEntryTransformOptions ) (lsproto.VSReferencesResponse , error ) {
695695 caps := lsproto .GetClientCapabilities (ctx )
696696 vsCapability := caps .VSSupportsVisualStudioExtensions
697- var items []* lsproto.VsReferenceItem
697+ var items []* lsproto.VSReferenceItem
698698 id := int32 (0 )
699699 projectName := string (l .projectPath )
700700
@@ -712,11 +712,11 @@ func (l *LanguageService) symbolAndEntriesToVsReferences(ctx context.Context, pa
712712 // Create the definition item
713713 definitionId := id
714714 emptyStr := ""
715- defItem := & lsproto.VsReferenceItem {
715+ defItem := & lsproto.VSReferenceItem {
716716 VSId : definitionId ,
717717 VSLocation : defInfo .location ,
718718 VSDefinitionText : defInfo .displayText ,
719- VSKind : & []lsproto.VsReferenceKind {lsproto .VsReferenceKindUnknown },
719+ VSKind : & []lsproto.VSReferenceKind {lsproto .VSReferenceKindUnknown },
720720 VSProjectName : & projectName ,
721721 VSContainingType : & emptyStr ,
722722 }
@@ -733,31 +733,31 @@ func (l *LanguageService) symbolAndEntriesToVsReferences(ctx context.Context, pa
733733 refLocation := l .getLocationOfEntry (ref )
734734
735735 // Determine read/write kind
736- kind := lsproto .VsReferenceKindRead
736+ kind := lsproto .VSReferenceKindRead
737737 if ref .kind != entryKindRange && ref .node != nil && ast .IsWriteAccessForReference (ref .node ) {
738- kind = lsproto .VsReferenceKindWrite
738+ kind = lsproto .VSReferenceKindWrite
739739 }
740740
741- refItem := & lsproto.VsReferenceItem {
741+ refItem := & lsproto.VSReferenceItem {
742742 VSId : id ,
743743 VSDefinitionId : & definitionId ,
744744 VSLocation : refLocation ,
745- VSKind : & []lsproto.VsReferenceKind {kind },
745+ VSKind : & []lsproto.VSReferenceKind {kind },
746746 VSProjectName : & projectName ,
747747 }
748748 items = append (items , refItem )
749749 id ++
750750 }
751751 }
752752
753- return lsproto.VsReferencesResponse { VsReferenceItems : & items }, nil
753+ return lsproto.VSReferencesResponse { VSReferenceItems : & items }, nil
754754}
755755
756756// referencedSymbolDefinitionInfo holds the computed info for a definition
757757type referencedSymbolDefinitionInfo struct {
758758 node * ast.Node
759759 location lsproto.Location
760- displayText * lsproto.ClassifiedTextElement
760+ displayText * lsproto.VSClassifiedTextElement
761761}
762762
763763// definitionToReferencedSymbolDefinitionInfo converts a Definition to display info
@@ -796,8 +796,8 @@ func (l *LanguageService) definitionToReferencedSymbolDefinitionInfo(ctx context
796796 return & referencedSymbolDefinitionInfo {
797797 node : node ,
798798 location : loc ,
799- displayText : & lsproto.ClassifiedTextElement {
800- Runs : []* lsproto.ClassifiedTextRun {{Text : node .Text (), ClassificationTypeName : string (lsproto .ClassificationTypeNameText )}},
799+ displayText : & lsproto.VSClassifiedTextElement {
800+ Runs : []* lsproto.VSClassifiedTextRun {{Text : node .Text (), ClassificationTypeName : string (lsproto .ClassificationTypeNameText )}},
801801 },
802802 }
803803
@@ -811,8 +811,8 @@ func (l *LanguageService) definitionToReferencedSymbolDefinitionInfo(ctx context
811811 return & referencedSymbolDefinitionInfo {
812812 node : node ,
813813 location : loc ,
814- displayText : & lsproto.ClassifiedTextElement {
815- Runs : []* lsproto.ClassifiedTextRun {{Text : name , ClassificationTypeName : string (lsproto .ClassificationTypeNameKeyword )}},
814+ displayText : & lsproto.VSClassifiedTextElement {
815+ Runs : []* lsproto.VSClassifiedTextRun {{Text : name , ClassificationTypeName : string (lsproto .ClassificationTypeNameKeyword )}},
816816 },
817817 }
818818
@@ -842,8 +842,8 @@ func (l *LanguageService) definitionToReferencedSymbolDefinitionInfo(ctx context
842842 return & referencedSymbolDefinitionInfo {
843843 node : node ,
844844 location : loc ,
845- displayText : & lsproto.ClassifiedTextElement {
846- Runs : []* lsproto.ClassifiedTextRun {{Text : node .Text (), ClassificationTypeName : string (lsproto .ClassificationTypeNameString )}},
845+ displayText : & lsproto.VSClassifiedTextElement {
846+ Runs : []* lsproto.VSClassifiedTextRun {{Text : node .Text (), ClassificationTypeName : string (lsproto .ClassificationTypeNameString )}},
847847 },
848848 }
849849
@@ -856,8 +856,8 @@ func (l *LanguageService) definitionToReferencedSymbolDefinitionInfo(ctx context
856856 return & referencedSymbolDefinitionInfo {
857857 node : node ,
858858 location : loc ,
859- displayText : & lsproto.ClassifiedTextElement {
860- Runs : []* lsproto.ClassifiedTextRun {{Text : `"` + def .tripleSlashFileRef .reference .FileName + `"` , ClassificationTypeName : string (lsproto .ClassificationTypeNameString )}},
859+ displayText : & lsproto.VSClassifiedTextElement {
860+ Runs : []* lsproto.VSClassifiedTextRun {{Text : `"` + def .tripleSlashFileRef .reference .FileName + `"` , ClassificationTypeName : string (lsproto .ClassificationTypeNameString )}},
861861 },
862862 }
863863
@@ -867,7 +867,7 @@ func (l *LanguageService) definitionToReferencedSymbolDefinitionInfo(ctx context
867867}
868868
869869// getDefinitionKindAndDisplayParts returns the classified display text for a symbol definition.
870- func (l * LanguageService ) getDefinitionKindAndDisplayParts (ctx context.Context , symbol * ast.Symbol , originalNode * ast.Node , vsCapability bool ) * lsproto.ClassifiedTextElement {
870+ func (l * LanguageService ) getDefinitionKindAndDisplayParts (ctx context.Context , symbol * ast.Symbol , originalNode * ast.Node , vsCapability bool ) * lsproto.VSClassifiedTextElement {
871871 program := l .GetProgram ()
872872 c , done := program .GetTypeChecker (ctx )
873873 defer done ()
@@ -877,12 +877,12 @@ func (l *LanguageService) getDefinitionKindAndDisplayParts(ctx context.Context,
877877 info := getQuickInfoAndDeclarationAtLocation (c , symbol , originalNode , nil , vsCapability , meaning )
878878
879879 if vsCapability {
880- return & lsproto.ClassifiedTextElement {Runs : info .displayParts .GetRuns ()}
880+ return & lsproto.VSClassifiedTextElement {Runs : info .displayParts .GetRuns ()}
881881 }
882882 // Fallback: single unclassified run with the full text
883883 text := info .displayParts .String ()
884- return & lsproto.ClassifiedTextElement {
885- Runs : []* lsproto.ClassifiedTextRun {{Text : text , ClassificationTypeName : string (lsproto .ClassificationTypeNameText )}},
884+ return & lsproto.VSClassifiedTextElement {
885+ Runs : []* lsproto.VSClassifiedTextRun {{Text : text , ClassificationTypeName : string (lsproto .ClassificationTypeNameText )}},
886886 }
887887}
888888
0 commit comments