mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Avoid running pathCompletion in languages other than html
This commit is contained in:
parent
b34585bc6d
commit
5a67acfb17
|
@ -288,7 +288,13 @@ connection.onCompletion(async textDocumentPosition => {
|
|||
const emmetCompletionParticipant = getEmmetCompletionParticipants(document, textDocumentPosition.position, mode.getId(), emmetSettings, emmetCompletionList);
|
||||
const pathCompletionParticipant = getPathCompletionParticipant(document, workspaceFolders, pathCompletionList);
|
||||
|
||||
mode.setCompletionParticipants([emmetCompletionParticipant, pathCompletionParticipant]);
|
||||
// Ideally, fix this in the Language Service side
|
||||
// Check participants' methods before calling them
|
||||
if (mode.getId() === 'html') {
|
||||
mode.setCompletionParticipants([emmetCompletionParticipant, pathCompletionParticipant]);
|
||||
} else {
|
||||
mode.setCompletionParticipants([emmetCompletionParticipant]);
|
||||
}
|
||||
}
|
||||
|
||||
let settings = await getDocumentSettings(document, () => mode.doComplete.length > 2);
|
||||
|
@ -405,8 +411,6 @@ connection.onDocumentLinks(documentLinkParam => {
|
|||
}, [], `Error while document links for ${documentLinkParam.textDocument.uri}`);
|
||||
});
|
||||
|
||||
|
||||
|
||||
connection.onDocumentSymbol(documentSymbolParms => {
|
||||
return runSafe(() => {
|
||||
let document = documents.get(documentSymbolParms.textDocument.uri);
|
||||
|
|
Loading…
Reference in a new issue