Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 310539b

Browse files
committed
Reword startIfMissing to initialize since starting is not guaranteed now
1 parent be720b3 commit 310539b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function onDidChangeActiveTextEditor(editor: TextEditor | undefined) {
100100
const { languageId, uri } = editor.document;
101101

102102
const workspace = clientWorkspaceForUri(uri, {
103-
startIfMissing: languageId === 'rust' || languageId === 'toml',
103+
initializeIfMissing: languageId === 'rust' || languageId === 'toml',
104104
});
105105
if (!workspace) {
106106
return;
@@ -139,12 +139,12 @@ function whenChangingWorkspaceFolders(e: WorkspaceFoldersChangeEvent) {
139139
const workspaces: Map<string, ClientWorkspace> = new Map();
140140

141141
/**
142-
* Fetches a `ClientWorkspace` for a given URI. If missing and `startIfMissing`
142+
* Fetches a `ClientWorkspace` for a given URI. If missing and `initializeIfMissing`
143143
* option was provided, it is additionally initialized beforehand, if applicable.
144144
*/
145145
function clientWorkspaceForUri(
146146
uri: Uri,
147-
options?: { startIfMissing: boolean },
147+
options?: { initializeIfMissing: boolean },
148148
): ClientWorkspace | undefined {
149149
const rootFolder = workspace.getWorkspaceFolder(uri);
150150
if (!rootFolder) {
@@ -157,7 +157,7 @@ function clientWorkspaceForUri(
157157
}
158158

159159
const existing = workspaces.get(folder.uri.toString());
160-
if (!existing && options && options.startIfMissing) {
160+
if (!existing && options && options.initializeIfMissing) {
161161
const workspace = new ClientWorkspace(folder);
162162
workspaces.set(folder.uri.toString(), workspace);
163163
workspace.autoStart();

0 commit comments

Comments
 (0)