Fork me on GitHub
#announcements
<
2020-04-29
>
didibus03:04:08

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

sogaiu05:04:04

was able to get locals and java completion working successfully. nice!

sogaiu05:04:49

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?

practicalli10:04:21

I added anakondo to Spacemacs and it seems to be working well. Will do some more testing as I code today.

borkdude14:04:00

I installed anakondo, but when I enter a random Clojure file in /tmp it asks me to which project I want to switch...

borkdude14:04:31

and no matter which one I choose it keeps asking me

practicalli15:04:56

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.

borkdude15:04:26

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

practicalli15:04:43

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.

borkdude15:04:43

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

practicalli15:04:18

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.

didibus16:04:24

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

didibus16:04:25

@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

didibus16:04:50

@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

practicalli16:04:56

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.

didibus16:04:58

You should only need to comment out the add-hooks I believe.

didibus16:04:32

I think autoload is needed to load the anakondo-minor-mode command.

didibus16:04:47

But I'm still figuring out all the mysteries of Emacs autoload

didibus00:05:04

@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

didibus00:05:51

Which one would you think be best? I'm leaning on defaulting to the folder.

didibus06:05:43

@UG1C3AD5Z @U04V15CAJ Ok latest Melpa release should have fixed your issues.

sogaiu06:05:01

thanks! will give it a try

borkdude06:05:33

@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

borkdude14:05:02

Or: detect $PROJECT_ROOT by looking at .clj-kondo, .git or project.cj or deps.edn and if all that fails, only lint the current buffer?

borkdude14:05:31

That would work for my /tmp/foo.clj scripts

didibus00:05:30

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

didibus00:05:48

The way I have it right now, it defaults to the buffer's default-directory

didibus00:05:07

Which is something the user can change. Though I think it would fail it you'd set it to nil

didibus00:05:14

I'll hammock over it a bit

practicalli08:05:46

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

didibus09:05:17

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.

bringe18:04:16

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.

wilkerlucio21:04:46

[com.wsscode/async "1.0.5"] is out! This release adds a helper to handle async try/catch on streaming processes. Docs at: https://github.com/wilkerlucio/wsscode-async#error-catching-on-streaming-processes

wilkerlucio21:04:46

[com.wsscode/async "1.0.5"] is out! This release adds a helper to handle async try/catch on streaming processes. Docs at: https://github.com/wilkerlucio/wsscode-async#error-catching-on-streaming-processes

wilkerlucio21:04:42

@U051SS2EU @U11BV7MTK @U050ECB92 from the thing we were talking earlier at #core-async