Fork me on GitHub
#calva
<
2022-05-26
>
Sakib10:05:44

Should .clava .clj-kondo .lip folder in .gitignore?

borkdude10:05:30

For clj-kondo and lsp it is sufficient to add one:

.cache
in your .gitignore (so without anything else)

thanks3 3
pez14:05:51

Don't ignore the whole .calva/ folder. Rather: .calva/output-window/

Avelino18:05:07

@U04V15CAJ I think that just .cache is not necessary, see example below using fulcro:

?? .clj-kondo/com.fulcrologic/fulcro/com/fulcrologic/fulcro/clj_kondo_hooks.clj
?? .clj-kondo/com.fulcrologic/fulcro/config.edn
?? .clj-kondo/com.fulcrologic/guardrails/com/fulcrologic/guardrails/clj_kondo_hooks.clj
?? .clj-kondo/com.fulcrologic/guardrails/config.edn

borkdude18:05:17

@U936PSSLQ You're supposed to check those files into source control

borkdude18:05:33

As they provide better linting for your libraries and your team mates and CI will benefit if you have those files in your repo

maxt04:05:55

is it an idea to put output-window under .cache instead, to separate what should be versioned and what not?

pez08:05:44

There is nothing cashe-y about it though, so that would be confusing. We can stick a .gitignorefile in there, though. Then users will not have to figure about what should be ignored or not.

👍 1
isak16:05:36

Is there a way to make backspace in Calva delete all spaces when on a blank line, like the other Clojure editors?

pez16:05:22

Not sure I understand the question correctly, but what I do is press cmd+backspace. Not sure what the equivalent is on non-macs, but the VS Code command is named Delete All Left. You might be able to get backspace alone do this, if you bind it to Delete All Left with some fancy when context, but it seems a bit unnecessary to me. 😃

isak16:05:04

This is how Cursive (and Emacs) do it for paredit mode: (I'm just pressing Enter and Backspace alternately here)

isak16:05:43

Hmm, testing it with Ctrl instead of CMD, (Ctrl-Backspace) and it does some kind of backward splice

isak16:05:24

But anyway, in my animation above, do you agree that just removing a single space isn't something one would want? I.e., one wouldn't want to start typing at an incorrect indentation level, so the only possible interpretation is that the user wants to delete the line. I think that is the paredit logic in Emacs and Cursive, which I think is correct/useful.

sansarip16:05:44

I think the only difference, and it’s a tiny one 🤏, is that cmd + backspace doesn’t seem to move the cursor up to the last non-ws char. But, pressing backspace again will. So, I think, to get the equivalent behavior as Emacs/Cursive @U08JKUHA9, you’d need to do cmd + backspace backspace -holding down cmd the second time is optional.

1
1
pez16:05:57

Yeah, could be argued that it is the only interpretation. I just think it is slightly unnecessary, since there is a VS Code command for it. You can also do cmd/ctrl+land press backspace. That said, if you are willing to provide a PR, I would probably accept it.

1
isak16:05:23

Ok. For me I'm so used to the standard behavior that I can't live without it, even if I could hit some other shortcut. So yes - I think I will give that PR a shot.

🙏 1
sansarip17:05:28

You can also use the joyride extension 😉 that runs a small script that does cmd+backspace,`backspace` and then bind that to whatever keybinding you want, right? If you want cmd+backspace to exhibit this behavior, then you can change the Delete All Left binding to something else, and then use that in your joyride script instead. https://github.com/BetterThanTomorrow/joyride

isak17:05:29

True, but I think this is something pretty important to have a sensible default for, so I don't want to fix it for just myself

pez19:05:09

Looking forward to that PR! Please file an issue first, @U08JKUHA9.

1
pez19:05:49

Let me know if I can help in any way. Here's where you can start if you like to do it TDD style: https://github.com/BetterThanTomorrow/calva/blob/dev/src/extension-test/unit/cursor-doc/paredit-test.ts#L1150

isak19:05:38

Thanks. Plan to start looking at it this evening (I'm on Mountain time)

🙏 1
pez19:05:33

I'm probably asleep by then. 😃 But @U9A1RLFNV, @U02N27RK69K and @U037TPXKBGS are in timezones closer to yours, so you might be able to get some hints if you ask here. @U037TPXKBGS, in particular, is very familiar with Paredit things.

1
pez19:05:29

Dear Calva friends. https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.277https://github.com/BetterThanTomorrow/calva/issues/1719 • Fix: <https://github.com/BetterThanTomorrow/calva/issues/1737%7Calt+&lt;up,down> arrow inside map destruction is not working properly> • https://github.com/BetterThanTomorrow/calva/issues/1731 Thanks to @armed and @alpox! gratitude 🙏 ❤️ calva @alpox not only collects his Contributor badge on the Calva repository with this release. He also provided crucial help, pairing with me on the evaluateCode extension API. With a sane Dx design at that. (I had a less sane design in my drafts.) See https://calva.io/api/ for info about this API, and please join the #joyride, to start playing with it.

🎉 4
joyride 2
calva 2
seancorfield22:05:16

Now with added Joyride power! 💪:skin-tone-2:

😎 3
🎉 2
joyride 1
calva 1
maxt05:05:34

Thank you for giving real world example usage of joyride! When reading the code, I wondered why you'd put clojure-code to be evaled in a string, instead of just quoting it. Then I realized that you want to put code in there. Which reminds me that I often wanted a syntax-quote that doesn't resolve all symbols. I could construct something like this, but it soon gets unmanageble. Maybe if :evaluateCode supported sending in an context?

(list 'let ['symb (list 'str "#'" code)]
        '(str ""
              (-> (str (symbol symb))
                  (clojure.string/replace "?" "%3f")
                  (clojure.string/replace "!" "%21")
                  (clojure.string/replace "&" "%26"))))

maxt05:05:20

@U04V70XH6 Not really a question but I was curious about your reasoning around choosing to put clojure code in strings.

seancorfield05:05:32

Yeah, it's definitely one of those "no options are great" situations.

seancorfield05:05:51

Part of it was because I ported it from an environment where it was all strings.