Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/shaderVariant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,12 @@ export class ShaderVariantTreeDataProvider implements vscode.TreeDataProvider<Sh
// Symbols might have changed, so request them as we use this to compute symbols.
this.requestDocumentSymbol(file.uri);
}
public onDocumentSymbols(uri: vscode.Uri, symbols: vscode.SymbolInformation[]) {
public onDocumentSymbols(uri: vscode.Uri, symbols: vscode.DocumentSymbol[]) {
// TODO:TREE: need to recurse child as well.
this.shaderEntryPointList.set(uri.path, symbols.filter(symbol => symbol.kind === vscode.SymbolKind.Function).map(symbol => {
return {
entryPoint: symbol.name,
range: new vscode.Range(
new vscode.Position(symbol.location.range.start.line, symbol.location.range.start.character),
new vscode.Position(symbol.location.range.end.line, symbol.location.range.end.character)
)
range: symbol.selectionRange
};
}));
// Solve async request for goto.
Expand Down
2 changes: 1 addition & 1 deletion src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function getMiddleware() : Middleware {
const result = await next(document, token);
if (result) {
// /!\ Type casting need to match server data sent. /!\
let resultArray = result as vscode.SymbolInformation[];
let resultArray = result as vscode.DocumentSymbol[];
sidebar.onDocumentSymbols(document.uri, resultArray);
}
return result;
Expand Down
Loading