Skip to content

Commit

Permalink
Start clojure-lsp when drams are downloaded
Browse files Browse the repository at this point in the history
Fixes #1601
Fixes #1664
  • Loading branch information
PEZ committed Apr 6, 2022
1 parent 00d3ce7 commit ba47b70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lsp/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ async function getFallbackFolder(): Promise<FallbackFolder> {
};
}

async function startClientCommand() {
export async function startClientCommand() {
lspStatus.show();
await maybeDownloadLspServer();
await startClient(await getFallbackFolder());
Expand Down
5 changes: 5 additions & 0 deletions src/nrepl/repl-start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { getConfig } from '../config';
import * as replSession from './repl-session';
import * as cljsLib from '../../out/cljs-lib/cljs-lib';
import { ReplConnectSequence } from './connectSequence';
import * as clojureLsp from '../lsp/main';
import * as calvaConfig from '../config';

const TEMPLATES_SUB_DIR = 'bundled';
const DRAM_BASE_URL = 'https://raw.githubusercontent.com/BetterThanTomorrow/dram';
Expand Down Expand Up @@ -161,6 +163,9 @@ export async function startStandaloneRepl(
void vscode.window.showWarningMessage(`Error downloading files: ${err.message}`);
});
}
if (calvaConfig.getConfig().enableClojureLspOnStart) {
void clojureLsp.startClientCommand();
}

const [mainDoc, mainEditor] = await openStoredDoc(storageUri, tempDirUri, config.files[0]);
for (const file of config.files.slice(1)) {
Expand Down

0 comments on commit ba47b70

Please sign in to comment.