[html] remove document settings on buffer close

This commit is contained in:
Martin Aeschlimann 2017-08-22 12:22:51 +02:00
parent 964028f97b
commit 00a44d37c5

View file

@ -47,6 +47,10 @@ let scopedSettingsSupport = false;
var globalSettings: Settings = {};
let documentSettings: { [key: string]: Thenable<Settings> } = {};
// remove document settings on close
documents.onDidClose(e => {
delete documentSettings[e.document.uri];
});
function getDocumentSettings(textDocument: TextDocument, needsDocumentSettings: () => boolean): Thenable<Settings> {
if (scopedSettingsSupport && needsDocumentSettings()) {