tweak: only spawn lsp servers for files in current instance (or cwd if instance is global) (#19058)

This commit is contained in:
Aiden Cline
2026-03-25 00:31:29 -05:00
committed by GitHub
parent 700f57112a
commit 71693cc24b
2 changed files with 61 additions and 0 deletions

View File

@@ -177,6 +177,12 @@ export namespace LSP {
async function getClients(file: string) {
const s = await state()
// Only spawn LSP clients for files within the instance directory
if (!Instance.containsPath(file)) {
return []
}
const extension = path.parse(file).ext || file
const result: LSPClient.Info[] = []