calva

pez 2025-05-03T11:23:23.203919Z

Dear Calva friends: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.507https://github.com/BetterThanTomorrow/calva/issues/2797 • Bump default cider-nrepl Jack-in dependency to 0.55.4 Thanks @sashton for improving Calva! 🙏 ❤️ calva

3
Yuhrão 2025-05-03T21:53:07.920489Z

Hi everyone. I'm using VIM extension with VSCode and when I try to evaluate the following form, I'm getting only the Hello World printed, but I wanted to evaluate the defn instead. I'm not sure how could I make this work in normal mode. This is probably something other people have experienced I guess Thank you in advance

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (println "Hello, World!"))

👋 1
pez 2025-05-03T21:56:07.729119Z

Use the command Calva: Evaluate top level form alt+enter is the default binding.

Yuhrão 2025-05-03T21:56:45.532549Z

Tysm 🙂 It has worked

🙏 1
pez 2025-05-03T21:58:33.080469Z

Sometimes you will want to evaluate current form when it is at the end of a line. I don’t know how people do that in normal mode, but maybe some macro can be constructed that enters append mode, evaluates, and then goes back to normal mode.

🤔 1
Yuhrão 2025-05-03T22:00:09.299449Z

Good to know. I was thinking about that and I saw in VSCode official Vim extension that it doesn't support macros... but I can figure it out eventually ahah If I find a way I'll share here 🙂

🤘 1
Yuhrão 2025-05-03T22:25:02.222009Z

@pez here's the solution that has worked for me:

{
      "before": ["<leader>", "e", "e"],
      "commands": ["cursorRight", "calva.evaluateSelection"]
    }
I added this to my vim.normalModeKeyBindingsNonRecursive config.

pez 2025-05-04T05:52:50.416319Z

Sweet! Please add to the Calva VIM page.