File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -381,14 +381,12 @@ export class ShaderVariantTreeDataProvider implements vscode.TreeDataProvider<Sh
381381 // Symbols might have changed, so request them as we use this to compute symbols.
382382 this . requestDocumentSymbol ( file . uri ) ;
383383 }
384- public onDocumentSymbols ( uri : vscode . Uri , symbols : vscode . SymbolInformation [ ] ) {
384+ public onDocumentSymbols ( uri : vscode . Uri , symbols : vscode . DocumentSymbol [ ] ) {
385+ // TODO:TREE: need to recurse child as well.
385386 this . shaderEntryPointList . set ( uri . path , symbols . filter ( symbol => symbol . kind === vscode . SymbolKind . Function ) . map ( symbol => {
386387 return {
387388 entryPoint : symbol . name ,
388- range : new vscode . Range (
389- new vscode . Position ( symbol . location . range . start . line , symbol . location . range . start . character ) ,
390- new vscode . Position ( symbol . location . range . end . line , symbol . location . range . end . character )
391- )
389+ range : symbol . selectionRange
392390 } ;
393391 } ) ) ;
394392 // Solve async request for goto.
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ function getMiddleware() : Middleware {
140140 const result = await next ( document , token ) ;
141141 if ( result ) {
142142 // /!\ Type casting need to match server data sent. /!\
143- let resultArray = result as vscode . SymbolInformation [ ] ;
143+ let resultArray = result as vscode . DocumentSymbol [ ] ;
144144 sidebar . onDocumentSymbols ( document . uri , resultArray ) ;
145145 }
146146 return result ;
You can’t perform that action at this time.
0 commit comments