diff --git a/CHANGELOG.md b/CHANGELOG.md index 372572aed..c8302caf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,12 @@ Changes to Calva. ## [Unreleased] +- Fix: [Can't start REPL in lein projects with backtick on project.clj](https://github.com/BetterThanTomorrow/calva/issues/2633) + ## [2.0.474] - 2024-09-22 - [Synchronize the file extensions for Calva and Calva Spritz](https://github.com/BetterThanTomorrow/calva/issues/2629) -- [Terminal output pretty printing fails when using `printerFn` pretty print option](https://github.com/BetterThanTomorrow/calva/issues/2630) +- Fix: [Terminal output pretty printing fails when using `printerFn` pretty print option](https://github.com/BetterThanTomorrow/calva/issues/2630) ## [2.0.473] - 2024-09-21 diff --git a/src/cljs-lib/src/calva/parse.cljs b/src/cljs-lib/src/calva/parse.cljs index 8ec0792bc..7a33eeabb 100644 --- a/src/cljs-lib/src/calva/parse.cljs +++ b/src/cljs-lib/src/calva/parse.cljs @@ -23,7 +23,11 @@ "Parses out all top level forms from `s`. Returns a vector with the parsed forms." [s] - (let [pbr (rt/string-push-back-reader (str/replace s #"#=\(" "nil #_("))] + (let [pbr (rt/string-push-back-reader (-> s ; tools.reader croaks on some Clojure constructs + ; at least the way we use it here + ; And we're not interested in actually parsing these + (str/replace #"#=\(" "nil #_(") + (str/replace #"`" "'")))] (loop [parsed-forms []] (let [parsed-form (tr/read {:eof 'CALVA-EOF :read-cond :preserve} pbr)] diff --git a/src/nrepl/project-types.ts b/src/nrepl/project-types.ts index 379be0c2f..ba5c142e7 100644 --- a/src/nrepl/project-types.ts +++ b/src/nrepl/project-types.ts @@ -158,7 +158,9 @@ async function leinDefProject(): Promise { const parsed = parseForms(data); return parsed.find((x) => x[0] == 'defproject'); } catch (e) { - void vscode.window.showErrorMessage('Could not parse project.clj'); + void vscode.window.showErrorMessage( + "Could not parse project.clj. You'll need to start the REPL manually, and then use the Connect REPL command instead." + ); throw e; } }