Wrt to mappings etc, I’m always accidentally refreshing all my namespaces (I’m not sure what I’m pressing) which means I’m losing access to my (still running) http server which means I have to kill my repl to release the port 😞
If you loosing the reference to the app-server that is defined with def
, using defonce
instead should stop the namespace reload from changing the reference.
I’m using defonce indeed. Some ways of roasting though (tools.namespace.refresh...) will completely throw away the namespace and start over.
Ah yes, that approach is more of a repl restart without restarting the repl.
I would much prefer if Conjure exposed this kind of functionality as a command so I could invoke it manually, and then perhaps make my own keybinding as needed.
I get providing keybindings for things like eval-thing-under-cursor, but most other things should be commands IMO.
Thanks for the long and detailed response. I’ll look into unmapping some stuff the way you describe it. I completely understand wanting to offer some defaults as well. Perhaps a middle ground would be a variable (e.g. vim-better-default allows you to disable the keybindings if you set a global variable to false)
@orestis How about let g:conjure#client#clojure#nrepl#mapping#refresh_changed = 'XRR'
or something?
Yeah @clojurians-slack100 I’ll do something like that for now.
@olical OT: Conjure has piqued my interest in Fennel. I'm looking for a Clojure-y replacement for Python (mostly for writing CLI apps). Fennel's syntax with Lua's ecosystem seems like a good alternative. Having not used Fennel before, how well would you say it serves as a Python replacement? (Sorry for the OT question, but couldn't think of a more applicable channel.)
Although I don't think it fits the bill as Clojure-y, there is a lisp-y language that transpiles to python ast, and is fully interoperable with python itself. It's called hy (https://docs.hylang.org/en/stable/). It's a great language, but it's a little young, and I bumped up against what I felt were limitations pretty quick.
Conjure doesn't touch it... yet.
I've had a look at Hy and really wanted to like it, but there were a few language decisions that I just couldn't get past. Can't remember what they were, though 😕
Maybe I should just try a project with it and see how it works in practice.
In fact, maybe I'll try both Fennel and Hy for a nice comparison 🙂
And babashka :babashka:
Babashka seems fantastic for tooling
We're using it a fair bit in anger I think
To replace JS and bash things
Conjure works with bb
bb's limited ecosystem is my biggest gripe there. Otherwise it's really great.
You may want to look at Janet too! https://janet-lang.org/ Same author as Fennel (I think?), super similar, but it's own VM
And full Conjure support
Fennel + Lua on the CLI is a good option too, but I haven't added support for working with non Aniseed (see: running inside neovim itself) Fennel yet
So Fennel inside nvim is okay with Conjure. Outside nvim in other processes has no support until I work something out.
Making Fennel compiled/running outside of Neovim a first class client of Conjure is high up on my todo list
Janet is an option, but one of the big issues is ecosystem. It's what Clojure nailed with JVM-support. Babashka is also great, but using it with third-party Clojure libs is (as I understand it) clunky, if at all possible. So Fennel's ability to use the Lua ecosystem seems like a major plus. Just to clarify: I'm not really asking about Conjure support for Fennel, but rather Fennel as a language (and ecosystem) for general scripting, on its own.
Totally agree!
But yeah, if you can solve the problem with Lua but want lispy syntax and macros, Fennel is fantastic!
First class "Fennel but not inside neovim" support will be landing eventually 🙂
Thanks for your feedback ❤️. If I get to use Fennel soon enough, maybe I can help with the Conjure support 🙂