check if buffer is handled
This commit is contained in:
parent
7c351af28f
commit
74bd823e4e
2 changed files with 5 additions and 0 deletions
|
@ -280,6 +280,10 @@ export default class BufferSyncSupport {
|
||||||
this.triggerDiagnostics()
|
this.triggerDiagnostics()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public has(uri: string): boolean {
|
||||||
|
return this.uris.has(uri)
|
||||||
|
}
|
||||||
|
|
||||||
private triggerDiagnostics(delay = 200): void {
|
private triggerDiagnostics(delay = 200): void {
|
||||||
this.diagnosticDelayer.trigger(() => {
|
this.diagnosticDelayer.trigger(() => {
|
||||||
this.sendPendingDiagnostics()
|
this.sendPendingDiagnostics()
|
||||||
|
|
|
@ -65,6 +65,7 @@ export default class FileConfigurationManager {
|
||||||
|
|
||||||
public async ensureConfigurationForDocument(document: TextDocument): Promise<void> {
|
public async ensureConfigurationForDocument(document: TextDocument): Promise<void> {
|
||||||
let opts = await workspace.getFormatOptions(document.uri)
|
let opts = await workspace.getFormatOptions(document.uri)
|
||||||
|
if (!this.client.bufferSyncSupport.has(document.uri)) return
|
||||||
return this.ensureConfigurationOptions(document.languageId, opts.insertSpaces, opts.tabSize)
|
return this.ensureConfigurationOptions(document.languageId, opts.insertSpaces, opts.tabSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue