This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-23
Channels
- # announcements (7)
- # babashka (40)
- # babashka-sci-dev (74)
- # beginners (74)
- # calva (31)
- # cider (11)
- # clj-kondo (22)
- # cljs-dev (1)
- # cljsrn (1)
- # clojure (70)
- # clojure-brasil (3)
- # clojure-dev (12)
- # clojure-europe (39)
- # clojure-nl (2)
- # clojure-norway (15)
- # clojure-uk (9)
- # clojurescript (69)
- # community-development (2)
- # conjure (1)
- # core-async (3)
- # cursive (1)
- # data-science (1)
- # datalevin (13)
- # datomic (17)
- # emacs (42)
- # events (1)
- # fulcro (16)
- # graphql (9)
- # helix (1)
- # holy-lambda (14)
- # honeysql (2)
- # hugsql (3)
- # hyperfiddle (5)
- # kaocha (10)
- # lsp (41)
- # luminus (5)
- # malli (7)
- # meander (3)
- # membrane (47)
- # off-topic (23)
- # podcasts (2)
- # polylith (34)
- # rdf (4)
- # re-frame (2)
- # releases (2)
- # remote-jobs (1)
- # ring (16)
- # shadow-cljs (111)
- # spacemacs (6)
- # test-check (2)
- # tools-deps (19)
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.
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
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.
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.
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.
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)
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.
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. 😃
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?
@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
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. 😃
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