This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-22
Channels
- # alda (2)
- # announcements (1)
- # babashka (32)
- # beginners (67)
- # calva (1)
- # cider (19)
- # clerk (11)
- # clj-commons (35)
- # clj-kondo (7)
- # cljsrn (2)
- # clojure (35)
- # clojure-europe (86)
- # clojure-nl (5)
- # clojure-norway (5)
- # clojure-russia (6)
- # clojurescript (16)
- # clr (21)
- # conjure (1)
- # core-async (10)
- # cryogen (1)
- # cursive (12)
- # data-science (1)
- # emacs (29)
- # events (4)
- # figwheel-main (2)
- # graalvm (9)
- # gratitude (7)
- # honeysql (4)
- # hugsql (3)
- # hyperfiddle (23)
- # jobs (1)
- # jobs-discuss (4)
- # joyride (9)
- # malli (2)
- # off-topic (81)
- # portal (7)
- # reagent (19)
- # reitit (1)
- # releases (4)
- # shadow-cljs (121)
- # xtdb (3)
@terry.poot I hear from @pez that you have done some tweaking on clojure-lsp and clj-kondo and since I'm experimenting with VS Code on Windoze (mainly to take advantage of superior shell integration), I'd like to know how to make them play nice with Clojure CLR. What do I need to know?
It's been a few weeks. Once I get through the morning [waking up -> morning meeting] interval I'll put something together. It works better than I expected, tbh, but I haven't tried to apply any updates, so I'm on a fixed version of both of them, which of course will be more and more of an issue over time. I don't think the patches are very large. Anyway, I'll get back to you later on this.
@bobcalco (or anyone) this zip file contains 2 patch files, one each for specific versions of clojure-lsp and clj-kondo, that make vscode/calva partially work for ClojureCLR using .cljr files. The short hash for the commit they apply to is in the name. There's not much there, it just makes those tools think cljr files are clj files. Note that clojure-lsp references a fixed version of clj-kondo, so both patches tweak that. I've not tried to apply these to later versions, as I just don't have time right now. To help you find those hashes, the lsp one is from 2/11, and the kondo one is from 2/15. cljc files won't be processed at all. cljr files will, but it's fragile, if they see anything they don't recognize, the parse fails. This particularly includes all the assembly loading functions, but also a LOT of different kinds of syntax errors. But when it works, you get full functionality as far as I can tell. As it happens, with my color scheme settings, I can tell whether a file has been processed by the color of my function names. ๐ Note that to make this work, you have to go into calva settings and tell it to use a specific path for clojure-lsp, and tell it where to find it. I haven't built this in a bit, but you want the build process that yields a clojure-lsp.bat file. I think it's a debug build. If it doesn't work for you let me know, there might be some other setting needed. (Oh, you do need to tell vscode that .cljr files are clojure files, of course.)
this is really cool @terry.poot I always hoped clojure-lsp could work with cljr too. cc @UKFSJSM38
@UKFSJSM38 and @U04V15CAJ have expressed that they want to support cljr, and are soliciting people to create issues for it. I don't have a lot of time right now, so if others want to help with that, it'd be great. And then we'll have real support and not my lame hack lol
Calva's default associations:
"languages": [
{
"id": "clojure",
"aliases": [
"Clojure",
"clojure"
],
"extensions": [
".clj",
".cljs",
".cljc",
".cljd",
".cljx",
".clojure",
".edn",
".joke",
".boot",
".bb",
".calva-repl"
],
"configuration": "./language-configuration.json"
}
],
No idea why .cljr
is still missing there... :face_palm:I've asked if cljr users had any problems with clj-kondo a few years back and I got no responses :)
@terry.poot I'll give this a spin soon. @U04V15CAJ I need a primer on clj-kondo and how it works. Will engage over on that channel as I try to get up to speed. The CLR is the black sheep in the Clojure family obviously. But I have real reason to make Clojure a first class citizen on that platform (among them, preserving my sanity, as I have to work in both .NET and the JVM). That said, the problem with Clojure - the only problem I have with Clojure, really - is the tooling on all supported platforms is 100% pure Angus incidental complexity (IC). The language is relatively free of IC, but good grief the tooling... This is the only reason languages like Go, Rust, etc, take off: they get the tooling right out of the gate. Clojure has real challenge here, because it's kind of a slave of the tooling of the host environments to which it's by the bye ported and supported (and on it's best supported platform, there are three popular build systems...lol). So we all need to put our heads together and unify this sh*t. THEN and ONLY THEN, I think Clojure will be in a position to grab more developer mindshare.
The good news, at least with vsc/calva, is that clj-kondo and clojure-lsp are basically invisible. You don't have to learn anything out of the gate, only when you want to customize things.
Right now I've turned clojure-lsp off cuz my editor screen looked like Jeffrey Dahmer's basement when it was on. But hopefully with your fixes and a little finger grease (we don't really use our elbows when we type, do we?) I can enjoy a nice Chianti when I code. ๐ท
If I didn't need a bunch of other things I can have for free with VS code (I do a lot with linked data, and RDF support in VS Code is light years ahead of Emacs and Vim), I would flip between cider and conjure. But most .NET devs whom I want to lure into Clojure are VS Code experienced, another reason to use Calva on the CLR.
Yeah, I used Intellij/Cursive for years, but the rest of my team is on VSCode, which is one of the main reasons I switched. And now I'm glad, because I wouldn't be able to hack Cursive, and last I heard, it had no support for cljr.
Plus, I'm a big fan of Calvados. (Why did they drop the DOS? Oh wait - nevermind)
I like Cursive, except for having to eat up half of my laptop memory just to edit files. ๐
In my heart of hearts I want to be Vimmer. The Spartan life. Vim has Fennel via Lua now! (So much for being Spartan.) But then again, VS Code has ... Joyride. So whatever, man.
I just want to stop thinking about these things so I can focus on what I want to build. When I'm writing Clojure code, all is well. When I try to test, debug, interact with it, all of a sudden the smorgasbord of options eats up the void created by all the incidental complexity that the language removed from my life. LOL.
Tbf, I love all the options. But it definitely adds cognitive load that sometimes I wish I didn't have to carry. Such is life. ๐
And the reality is, people building these tools are pouring their hearts and souls into them. So, seeing how they compete, compare, and each in their own way contribute to bettering the experience is fun to experience. But yeah, when the competition is fierce sometimes we have to accept that "no music will be played today" (Rich Hickey in one of his talks relating music to coding). ๐
And right now on the CLR the Clojure music is hard to play. But it's worth playing there. Why? A lot of coders code (even live) there. As technologies go (set aside MS hatred, in which I am a fully vested member -- and really, is Oracle really better?), I am reminded of Leonard Cohen's "Anthem": Ring the bells that still can ring Forget your perfect offering There is a crack, a crack in everything That's how the light gets in