vscode: exclusive flag does not apply to diagnostics
An LSP server that registers itself with a document selector that uses the (proposed API) exclusive
flag
documentSelector: [{ scheme: 'file', language: 'typescript', exclusive: true }]
will disable all other language services for requests, such as hover. However, other language services can still provide diagnostics, and presumably other notifications.
I’m attaching a simple extension that repros the issue. Upon running the “hello world” command it registers an LSP server that takes exclusive control over the file scheme for the typescript language. So if you open a TypeScript file, you’ll initially get language services powered by the TS Server. Once you run the command, you no longer will get TypeScript language services for hovers, for example. However, the TS Server is still providing diagnostics.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Make sure we do not enable JS/TS language features on live share clients For #104180 — committed to microsoft/vscode by mjbvz 4 years ago
I just pushed a scoped fix that should disable all language features and diagnostics for files with the
vsls
scheme: f694b07825a23005985b470e767a68927a83a553I was having trouble getting live share working in the OSS build, so once the next insiders comes out let me know if this did not fix the issue