This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-27
Channels
- # beginners (56)
- # calva (61)
- # cider (16)
- # clara (7)
- # cljdoc (2)
- # cljs-dev (2)
- # cljsrn (1)
- # clojure (144)
- # clojure-spec (23)
- # clojure-uk (5)
- # clojurescript (9)
- # clojureverse-ops (5)
- # community-development (4)
- # cursive (18)
- # datomic (15)
- # docs (6)
- # jackdaw (2)
- # nrepl (10)
- # nyc (2)
- # off-topic (18)
- # rewrite-clj (20)
- # shadow-cljs (31)
Hey all 🙂 I'm giving Calva a whirl. All connected and running great after 5 mins! But....don't have any inline def lookups or intellisense like behaviour.
Welcome! It’s a very common pattern, @mattford… Very probable to do with some nrepl dependency that is not met. What kind of project is this?
:repl {:plugins [[cider/cider-nrepl "0.21.2-SNAPSHOT"]
[org.clojure/tools.nrepl "0.2.13"]]
:dependencies [[nrepl "0.6.0"]]}
On REPL startup I see this
nREPL server started on port 61198 on host 127.0.0.1 -
REPL-y 0.3.7, nREPL 0.2.12
hmmm - why's my dep being ignored (I'm guessing lein is providing a value as that's the only place in my project it's defined)
nrepl 0.6.0
is hardcoded in Leiningen so you don’t need that dependency. Maybe [org.clojure/tools.nrepl "0.2.13"]
throws things off though, (if two different versions of nrepl are loaded…) in any case, remove that.
Cool. I am working on injecting that stuff for you, so it should get less messy when that is released.
My immediate questions are: joker on edit rather than save, paredit enforcing balance.
I like it, been an Emacs user for 20 years or so, but the modern intellisense stuff and the lack of decent way of rendering inside the editor keeps me looking.
Unfortunately not. There might be an issue about it on github. I think that in general it should be easy to add, but the testing as such is a bit flaky…
Debugging will be missing until someone like @mseddon has time to add it. It is a bit too far from my skill level.
I might give it a shot some day anyway, but right now there are too many more pressing things.
About joker… iirc the integration operates on the saved file. Not sure if it offers some other integration option but if it does it would be feasiable to add lint-on-type.
Glad you like it! I am quite determined to make it a productive tool. Inching it slowly, but we’ll get there! 😃
It was a while ago since I looked at the joker integration in Calva. But it is quite little code,I can check it out.
How does Emacs do it then…?
This extension says in the docs it can lint on type: https://github.com/martinklepsch/vscode-joker-clojure-linter
Hmmmm…. Looking at the code I’m not sure how that’s possible, since it just calls joker --lint [filename]
kondo accepts from stdin.
@d4hines: I don’t think Emacs uses joker. But interesting that that extension uses joker and can lint on type. Martin is a very smart guy, so might be some magic involved. 😃
And clj-kondo looks very interesting! If @d4hines or @mattford has the time you are welcome to try figure out how jiker and clj-kondo compares and what we might lose and win by switching. Seems like it might give us less false positives.
Yeah - I’ll give it a look when I have a chance. As I understand Michiel made Kondo to add to, not replace joker. But the main purpose of Joker was to be fast, and since Kondo is in Graal, it might make sense for to grow and eventually replace Joker.
(these inferences are my own, might be misunderstanding the respective authors’ intents)
Kondo only seems to are about the linting part, so it can’t replace joker for those using it for clojure scripting.
But the use case we are talking about is considered by Kondo and not by joker. 😃 It would be possible to support both and have it as a user setting, but I much rather maintain just one integration. The Clojure world has so many different branches I need to support w/o adding several linters to the mix. I have considered scrapping linting all together since there is an extension for that, but also, I like that Calva just packs the tools together.
Doesn’t look like it would be too difficult to swap out https://github.com/BetterThanTomorrow/calva/blob/61e6a0d97104a82bb9d2245db4fa0d5b1c7a072b/calva/repl/middleware/lint.ts for Kondo. I’ll give it a shot (can’t promise when). I don’t know what Windows support for Kondo would look like… I think you’d be forced to use WSL until Graal supports windows binaries.
Man… the fact that Calva is in Typescript is so nice … I would have no idea how to start hacking on an emacs lisp package…