Fork me on GitHub

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


@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

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

👍 1

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.


@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


Might be something we should do in Calva.

☝️ 1

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


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

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

👍 1

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


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


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

👍 1

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

Done • Issue: • PR: (funny that currently the issue and PR counts are so close to each other)


So awesome. 🙏

❤️ 1

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

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


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?


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?


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?


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


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


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. 😃


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


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

💜 4

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.