diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ca29b94..63a896bbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Changes to Calva. ## [Unreleased] +## [2.0.480] - 2024-10-21 + +- Fix: [Custom command snippets use the wrong ns when repl sessions types do not match](https://github.com/BetterThanTomorrow/calva/issues/2653) +- Fix: [ns inner blocks are kept on the same line by default when using the clean ns command](https://github.com/BetterThanTomorrow/calva/issues/2648) + ## [2.0.479] - 2024-10-01 - [Autostart REPL in created projects, also when created in the current folder](https://github.com/BetterThanTomorrow/calva/issues/2644) diff --git a/bundled/drams-menu/drams-dev.edn b/bundled/drams-menu/drams-dev.edn index 92201b4c0..22aa35fa9 100644 --- a/bundled/drams-menu/drams-dev.edn +++ b/bundled/drams-menu/drams-dev.edn @@ -11,4 +11,8 @@ {:title "Create a mini Clojure project", :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/dev/drams/v2/mini", :extraDetail "Starts a REPL, requires Java", - :description "A quick way to Fire up a Clojure REPL"}] \ No newline at end of file + :description "A quick way to Fire up a Clojure REPL"} + {:title "Create a mini shadow-cljs Fullstack project", + :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/dev/drams/v2/mini_shadow_fullstack", + :extraDetail "Starts a REPL, requires Java", + :description "From Thomas Helller's Fullstack Workflow with shadow-cljs"}] \ No newline at end of file diff --git a/bundled/drams-menu/drams-published.edn b/bundled/drams-menu/drams-published.edn index 0eded7f7f..717b63499 100644 --- a/bundled/drams-menu/drams-published.edn +++ b/bundled/drams-menu/drams-published.edn @@ -11,4 +11,8 @@ {:title "Create a mini Clojure project", :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/published/drams/v2/mini", :extraDetail "Starts a REPL, requires Java", - :description "A quick way to Fire up a Clojure REPL"}] \ No newline at end of file + :description "A quick way to Fire up a Clojure REPL"} + {:title "Create a mini shadow-cljs Fullstack project", + :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/published/drams/v2/mini_shadow_fullstack", + :extraDetail "Starts a REPL, requires Java", + :description "From Thomas Helller's Fullstack Workflow with shadow-cljs"}] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5755a1ee1..3e6f8b4f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "calva", - "version": "2.0.479", + "version": "2.0.480", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "calva", - "version": "2.0.479", + "version": "2.0.480", "license": "MIT", "dependencies": { "@vscode/debugadapter": "^1.64.0", diff --git a/package.json b/package.json index 3c32da214..ec7c5185c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Calva: Clojure & ClojureScript Interactive Programming", "description": "Integrated REPL, formatter, Paredit, and more. Powered by cider-nrepl and clojure-lsp.", "icon": "assets/calva.png", - "version": "2.0.479", + "version": "2.0.480", "publisher": "betterthantomorrow", "author": { "name": "Better Than Tomorrow", diff --git a/src/custom-snippets.ts b/src/custom-snippets.ts index e7b6308bf..2e7498859 100644 --- a/src/custom-snippets.ts +++ b/src/custom-snippets.ts @@ -51,8 +51,9 @@ async function evaluateCodeOrKeyOrSnippet(codeOrKeyOrSnippet?: string | SnippetD ? codeOrKeyOrSnippet : await getSnippetDefinition(codeOrKeyOrSnippet as string, editorNS, editorRepl); - snippetDefinition.ns = snippetDefinition.ns ?? editorNS; snippetDefinition.repl = snippetDefinition.repl ?? editorRepl; + snippetDefinition.ns = + snippetDefinition.ns ?? (editorRepl === snippetDefinition.repl ? editorNS : undefined); snippetDefinition.evaluationSendCodeToOutputWindow = snippetDefinition.evaluationSendCodeToOutputWindow ?? true; diff --git a/src/lsp/client/client.ts b/src/lsp/client/client.ts index a13ac37b8..33b7a2fa9 100644 --- a/src/lsp/client/client.ts +++ b/src/lsp/client/client.ts @@ -150,7 +150,6 @@ export const createClient = (params: CreateClientParams): defs.LspClient => { 'auto-add-ns-to-new-files?': true, 'document-formatting?': false, 'document-range-formatting?': false, - 'keep-require-at-start?': true, }, middleware: { didOpen: (document, next) => { diff --git a/src/nrepl/jack-in.ts b/src/nrepl/jack-in.ts index e2ec9c9dc..5d68a2b09 100644 --- a/src/nrepl/jack-in.ts +++ b/src/nrepl/jack-in.ts @@ -28,7 +28,7 @@ import * as inspector from '../providers/inspector'; function resolveEnvVariables(entry: any): any { if (typeof entry === 'string') { - const s = entry.replace(/\$\{env:(\w+)\}/, (_, v) => (process.env[v] ? process.env[v] : '')); + const s = entry.replace(/\$\{env:(\w+)\}/g, (_, v) => (process.env[v] ? process.env[v] : '')); return s; } else { return entry;