File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
pkgs/sass_language_services/lib/src/features/go_to_definition Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ class GoToDefinitionFeature extends LanguageFeature {
83
83
}
84
84
}
85
85
86
- var definition = await findInWorkspace <StylesheetDocumentSymbol >(
86
+ var definition =
87
+ await findInWorkspace< (StylesheetDocumentSymbol , lsp.Location )> (
87
88
lazy: true ,
88
89
initialDocument: initialDocument,
89
90
depth: initialDocument.uri != document.uri ? 1 : 0 ,
@@ -112,19 +113,25 @@ class GoToDefinitionFeature extends LanguageFeature {
112
113
);
113
114
114
115
if (symbol != null ) {
115
- return [symbol];
116
+ return [
117
+ (
118
+ symbol,
119
+ lsp.Location (uri: document.uri, range: symbol.selectionRange)
120
+ )
121
+ ];
116
122
}
117
123
118
124
return null ;
119
125
},
120
126
);
121
127
122
128
if (definition != null && definition.isNotEmpty) {
123
- var symbol = definition.first;
129
+ var symbol = definition.first.$1;
130
+ var location = definition.first.$2;
124
131
return Definition (
125
- name,
126
- kind ,
127
- lsp. Location (uri : document.uri, range : symbol.selectionRange) ,
132
+ symbol. name,
133
+ symbol.referenceKind ,
134
+ location ,
128
135
);
129
136
}
130
137
You can’t perform that action at this time.
0 commit comments