Skip to content

Commit 26e0f76

Browse files
committed
lua files outside of workspace do not start server
1 parent 31891b5 commit 26e0f76

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

client/out/languageserver.js

Lines changed: 1 addition & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/languageserver.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -164,29 +164,14 @@ export function activate(context: ExtensionContext) {
164164
if (uri.scheme === 'untitled' && !defaultClient) {
165165
defaultClient = start(context, [
166166
{ scheme: 'untitled', language: 'lua' }
167-
], {
168-
name: 'untitled',
169-
uri: uri,
170-
index: 0,
171-
});
167+
], null);
172168
return;
173169
}
174170

175171
let folder = Workspace.getWorkspaceFolder(uri);
176172
// Files outside a folder can't be handled. This might depend on the language.
177173
// Single file languages like JSON might handle files outside the workspace folders.
178174
if (!folder) {
179-
let parentUri = Uri.file(path.parse(uri.fsPath).dir)
180-
if (!clients.has(parentUri.toString())) {
181-
let client = start(context, [
182-
{ scheme: 'file', language: 'lua', pattern: `${parentUri.fsPath}/**/*` }
183-
], {
184-
name: parentUri.fsPath,
185-
uri: parentUri,
186-
index: 0,
187-
});
188-
clients.set(parentUri.toString(), client);
189-
}
190175
return;
191176
}
192177
// If we have nested workspace folders we only start a server on the outer most workspace folder.

0 commit comments

Comments
 (0)