This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (35)
- # aws (40)
- # babashka (10)
- # beginners (119)
- # calva (25)
- # cider (13)
- # clj-kondo (15)
- # cljsrn (23)
- # clojure (205)
- # clojure-dev (3)
- # clojure-europe (15)
- # clojure-germany (3)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-uk (58)
- # clojurescript (193)
- # community-development (2)
- # conjure (147)
- # core-async (49)
- # crux (8)
- # cursive (47)
- # datomic (21)
- # duct (1)
- # fulcro (19)
- # graalvm (3)
- # graphql (1)
- # helix (3)
- # hoplon (11)
- # jackdaw (1)
- # joker (1)
- # juxt (5)
- # kaocha (1)
- # keechma (3)
- # lambdaisland (6)
- # local-first-clojure (27)
- # malli (5)
- # off-topic (41)
- # rdf (27)
- # re-frame (7)
- # reagent (15)
- # reitit (5)
- # rum (11)
- # shadow-cljs (157)
- # spacemacs (18)
- # sql (4)
Anakondo v0.2 https://github.com/didibus/anakondo An Emacs minor mode for Clojure[Script] completion without needing a connected REPL: * Now in MELPA * Now with Locals completion and Java completion
one small thing, somehow my installation of emacs (or config?) doesn't have
concatenate for some reason. renaming that to
cl-concatenate seemed to make things work.
any ideas what might be wrong with my setup?
I added anakondo to Spacemacs and it seems to be working well. Will do some more testing as I code today.
I installed anakondo, but when I enter a random Clojure file in /tmp it asks me to which project I want to switch...
I think it is tied to projectile by design (at least for the moment) as it used that to access the specific deps.edn file and build up the path.
I think it would be useful to make this opt-in. clj-kondo can also just lint one file without any context. this will be useful for babashka scripts which I want to use it for, because I don't spin up a REPL for that all the time. cc @U0K064KQV
The problem I have is that I use layouts and if I restart Emacs then a dozen Clojure projects are reopened and analysed, which takes nearly a minute and I cannot do anything until the analysis has finished. anakondo works well when loaded, so keen to see how this evolves.
I think the project scanning should be optional, it seems your problem is more or less the same as mine, only from a different angle
Having an option to make scanning optional would be useful, I agree. I did raise an issue suggesting running the static analysis in the background, although unsure if that is possible with Emacs.
@UG1C3AD5Z Ah, I still haven't figured how to know what I need to explicitly require and not. The functions included with Emacs don't tell you where they come from when you look up their docs which is what makes it hard. I think I need to require 'cl explicitly here. Thanks for the feedback.
@U04V15CAJ Hum, that's interesting. I think I know why this doesn't happen to me. I think since my home is a git project, projectile defaults to that when I'm "outside" a project. I assumed that was just the projectile default behavior. I'll work on a fix. Thanks for trying it out and reporting back
@U05254DQM Ah yes, I can see this being annoying. I have planned to make analysis async as my next big feature. But your use case might need something else, even analysing everything asynchronously when you start Emacs seems wasteful. I had wondered if I should have a file cache so it persists between mode restarts. That could be an option. Otherwise for now, you might want to manually turn on/off the mode
Ah, I can just comment out the autoload and the add-hooks code and using
SPC SPC anakondo-minor-mode and it seems to work. That will allow me to continue testing. Thanks.
@U04V15CAJ I can do two things, I can either default the project to the current file's folder, or I can default it to nil, so I'll just analyze the buffer and nothing else
@U0K064KQV if I’m editing a Clojure file in /tmp, will it analyze my entire tmp folder? That doesn’t seem to be a good idea. Why don’t you piggie back on the detection of the .clj-kondo directory and else default to single file
$PROJECT_ROOT by looking at
deps.edn and if all that fails, only lint the current buffer?
Ya, it will analyze all of /tmp in that case. I guess its a trade off. If someone has a set of clojure files or babashka in some folder that they load-file together, then it be nice to have that default as the project folder, but in the case of a tmp file or an empty buffer I guess it would make more sense to default it to no project and only analyze the buffer
Which is something the user can change. Though I think it would fail it you'd set it to nil
Thinking it would be useful to exclude files types or specific directories. I have one project that takes over 40 seconds to analyze. It only has a few libs and not that much code, but has large data files. I assuming this is why it's slow. I'll raise an issue and share the code later today
Sure thing. That said, all transitive dependencies also get analysed for both Java and Clojure. So if you have a big dependency tree, that could also be the cause.
https://github.com/BetterThanTomorrow/calva v2.0.96 comes with additional features to the new debugger: • Command for instrumenting functions for debugging • Editor decorations to show instrumented function definitions and usages • Fix active item background in suggestion menu for readability (thanks to zelark) https://calva.io/debugger/ for more info about the debugger.