Fork me on GitHub
#calva
<
2022-03-23
>
baibhavbista04:03:41

Hey, is there a way I can use calva on other file extensions? I'm mostly interested in getting the slurp and barf shortcuts working

bringe03:03:37

@U0ETXRFEW Is there a way to configure this, maybe in VS Code? The only way I know how to do this off-hand is to modify Calva’s package.json and run it from source in the development host.

❤️ 1
baibhavbista03:03:33

@U9A1RLFNV thanks for the tip Will go the development host route for now

👍 1
bringe04:03:17

What kind of files are you trying to use slurp and barf in? The paredit commands are made to work in Clojure code, but might work on some other lisp-like language.

baibhavbista05:03:52

@U9A1RLFNV hmmm.. I'm going to use it for clojure code too ahem.. ClojureDart to be precise 😅 I just need to enable the same commands for the extension .cljd

pez06:03:59

Might be something we should do in Calva.

☝️ 1
baibhavbista06:03:16

For my purposes, this looks like it would be fine I think being able to change the file extensions Calva works on from the VScode extension settings would be a good thing to have though

pez06:03:50

It makes me happy (for reasons unclear to me) that you are running the development host, @U0154QR3DC7 😃 You can also change the language association manually via the setting File: Association, or at-will with the command Change Language Mode.

❤️ 1
pez06:03:15

Please file an issue about adding ClojureDart. Then a PR fixing it. 😃

👍 1
baibhavbista06:03:23

Haha damn I hadn't realized I could just Change Language Mode. That works 😅

baibhavbista06:03:03

Maybe will wait until Clojuredart is public? It's currently under closed beta

pez06:03:53

We should probably also add *.bb. I notice I have that in my settings, so haven't realized it is lacking from Calva.

👍 1
pez06:03:57

I think it is fine to add it even while in closed beta. It will also make it easier for us to get early warnings if we need to update something in our Clojure lexer.

👍 1
baibhavbista06:03:44

Done • Issue: https://github.com/BetterThanTomorrow/calva/issues/1617 • PR: https://github.com/BetterThanTomorrow/calva/pull/1618 (funny that currently the issue and PR counts are so close to each other)

pez06:03:07

So awesome. 🙏

❤️ 1
pez06:03:33

Now merged to dev. Note to self (and a little bit to you, @U0154QR3DC7 😃 ) the commit message did not reference the issue with Fixes #1617 syntax so it will not be auto-close by the commit. We'll need to close it manually after release.

👍 1
baibhavbista06:03:06

ahhh.. I did not know that I needed to have the issue number in the commit message I'm not really familiar with using issue numbers 😅 I assumed mentioning the issue from the PR would partly do it Thanks for letting me know

pez06:03:48

It was such a small change and since things built and tests passed, I decided to not stress the protocol we are using for PRs. 😃

👍 1
Lukas Domagala10:03:20

I think another problem with these extensions is LSP. If I remember correctly LSP asks the client for watches on some extensions, cljd and bb aren’t among them. @UKFSJSM38 should we add those to LSP?

ericdallo11:03:08

What you mean with "watches on some extensions"?

Lukas Domagala13:03:07

@UKFSJSM38 When initializing the LSP server we register file watchers on the client with “workspace/didChangeWatchedFiles” which are currently set to “/*.{clj,cljs,cljc,edn}“. If I understand this bit of LSP correctly, it tells the client to tell the server any(only?) changes to those files. So currently LSP would not notice any changes to .bb files, right?

ericdallo18:03:31

is it common to have .bb files? I was not aware, I thought the recomendation of bb was to have it as .clj

Lukas Domagala10:03:59

I don’t use it and not sure how common it is, but I’m guessing that at least cljd for ClojureDart is mandatory?

pez11:03:28

I use it here and there and have seen it in some professional projects I've had access to.

baibhavbista11:03:29

Just an anecdote, but yeah I've seen .bb files in professional projects too

pez11:03:20

I use it when I write a script that only works in Babashka. I don't quite like to have a .clj file that Clojure can't handle. 😃

ericdallo13:03:00

Ok, feel free to open a issue or PR adding .bb files

pez08:03:44

Please visit #announcements and slap some emojis on this one. 😃

💜 4
pez16:03:17

Here's a demo of that feature with letting you choose which one, of potentially very many, Clojure projects in your workspace to connect to. https://www.youtube.com/watch?v=6Ba7c_MxT1E