mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Update language service
This commit is contained in:
parent
79ec6c6841
commit
46354e4c4b
3 changed files with 5 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "monaco-html",
|
"name": "monaco-html",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0-next.1",
|
||||||
"description": "HTML plugin for the Monaco Editor",
|
"description": "HTML plugin for the Monaco Editor",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "gulp compile",
|
"compile": "gulp compile",
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
"object-assign": "^4.1.0",
|
"object-assign": "^4.1.0",
|
||||||
"rimraf": "^2.5.2",
|
"rimraf": "^2.5.2",
|
||||||
"typescript": "2.0.3",
|
"typescript": "2.0.3",
|
||||||
"vscode-html-languageservice": "^1.0.0-next.2",
|
"vscode-html-languageservice": "^1.0.0-next.5",
|
||||||
"vscode-languageserver-types": "^1.0.4-next.2"
|
"vscode-languageserver-types": "^1.0.4-next.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ export class HTMLWorker {
|
||||||
let highlights = this._languageService.findDocumentHighlights(document, position, htmlDocument);
|
let highlights = this._languageService.findDocumentHighlights(document, position, htmlDocument);
|
||||||
return Promise.as(highlights);
|
return Promise.as(highlights);
|
||||||
}
|
}
|
||||||
findDocumentLinks(uri: string, workspacePath: string): Promise<ls.DocumentLink[]> {
|
findDocumentLinks(uri: string): Promise<ls.DocumentLink[]> {
|
||||||
let document = this._getTextDocument(uri);
|
let document = this._getTextDocument(uri);
|
||||||
let links = this._languageService.findDocumentLinks(document, workspacePath);
|
let links = this._languageService.findDocumentLinks(document, null);
|
||||||
return Promise.as(links);
|
return Promise.as(links);
|
||||||
}
|
}
|
||||||
private _getTextDocument(uri: string): ls.TextDocument {
|
private _getTextDocument(uri: string): ls.TextDocument {
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ export class DocumentLinkAdapter implements monaco.languages.LinkProvider {
|
||||||
public provideLinks(model: monaco.editor.IReadOnlyModel, token: CancellationToken): Thenable<monaco.languages.ILink[]> {
|
public provideLinks(model: monaco.editor.IReadOnlyModel, token: CancellationToken): Thenable<monaco.languages.ILink[]> {
|
||||||
const resource = model.uri;
|
const resource = model.uri;
|
||||||
|
|
||||||
return wireCancellationToken(token, this._worker(resource).then(worker => worker.findDocumentLinks(resource.toString(), null)).then(items => {
|
return wireCancellationToken(token, this._worker(resource).then(worker => worker.findDocumentLinks(resource.toString())).then(items => {
|
||||||
if (!items) {
|
if (!items) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue