Fork me on GitHub
#calva
<
2021-10-06
>
mindbender07:10:20

How can I edit the REPL history in Calva?

pez07:10:02

You can only clear it, with Calva: Clear REPL History.

mindbender01:10:18

Not even manually? Like pointing me to the file where the history is stored. I have a lot of duplicate entries I want to remove

bringe01:10:51

The history is stored in workspaceState, which is provided by the VS Code extension API: https://github.com/BetterThanTomorrow/calva/blob/d8033a5a3626adad3b40a42a436200fef75fda6f/src/results-output/repl-history.ts#L49. I’m not sure how to edit that, but it must be persisted somewhere since the history is retrievable after closing and reopening VS Code.

bringe01:10:18

I don’t see info there on how to modify it though, or know if it’s intended to be modifiable. Anyway, I think what might also solve your problem is if Calva deduplicated the history entries. Like if the history was [1 2 2] now, it could be [1 2] if deduplicated. However, it probably would only make sense to deduplicate entries next to each other. So [1 2], if 1 were added, would be [1 2 1].

bringe01:10:42

Anyway, if you wanted to create a PR for that by chance, that would be welcome. simple_smile

pez15:10:23

The 44th marketplace review on Calva just in. It took me two minutes to dare open it. Would it be the first sub-5 rating? It wasn’t. It was the 44th five-star rating, and with a wonderful review message. “instrumental to my Clojure learning experience”. Wow, that is so much what we work for! I’m such a happy puppy now! gratitude ❤️ 🙏 https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva&amp;ssr=false#review-details

🎉 8
calva 1
🙌 1
pez15:10:46

Also. A new Calva out, v2.0.214: • https://github.com/BetterThanTomorrow/calva/issues/1001https://github.com/BetterThanTomorrow/calva/issues/1311 • Fix: https://github.com/BetterThanTomorrow/calva/issues/1310https://github.com/BetterThanTomorrow/calva/issues/1319 It’s pretty awesome to jack a bb or nbb REPL in to the file you have opened. Try it! Also thanks @ariel for upgrading deps.clj! 🙏

🎉 6
🙌 4
calva 5