mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Adopt monaco-editor-core@0.14.1
This commit is contained in:
parent
0932a0bb67
commit
a02a95603d
4 changed files with 37 additions and 26 deletions
|
|
@ -423,7 +423,7 @@ export class DocumentSymbolAdapter implements monaco.languages.DocumentSymbolPro
|
|||
constructor(private _worker: WorkerAccessor) {
|
||||
}
|
||||
|
||||
public provideDocumentSymbols(model: monaco.editor.IReadOnlyModel, token: CancellationToken): Thenable<monaco.languages.SymbolInformation[]> {
|
||||
public provideDocumentSymbols(model: monaco.editor.IReadOnlyModel, token: CancellationToken): Thenable<monaco.languages.DocumentSymbol[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return wireCancellationToken(token, this._worker(resource).then(worker => worker.findDocumentSymbols(resource.toString())).then(items => {
|
||||
|
|
@ -432,9 +432,11 @@ export class DocumentSymbolAdapter implements monaco.languages.DocumentSymbolPro
|
|||
}
|
||||
return items.map(item => ({
|
||||
name: item.name,
|
||||
detail: '',
|
||||
containerName: item.containerName,
|
||||
kind: toSymbolKind(item.kind),
|
||||
location: toLocation(item.location)
|
||||
range: toRange(item.location.range),
|
||||
selectionRange: toRange(item.location.range)
|
||||
}));
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue