diff --git a/CHANGELOG.md b/CHANGELOG.md index e5daa56f9..97caf0a9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,8 @@ Changes to Calva. ## [Unreleased] -- Fix: [Only the first environment variable is resolved in jackInEnvironment](https://github.com/BetterThanTomorrow/calva/issues/2650) +- 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 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/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;