👋 hey all, I'm very close to releasing my rewrite of Conjure (Neovim Clojure tooling). It's on the develop branch and it should be even easier to use than the master branch! Any feedback would be much appreciated, especially if you can break it! Here's what it looks like: https://asciinema.org/a/325517 https://github.com/Olical/conjure/tree/develop It supports nREPL + CIDER now and has a sleeker UX than before (subjective). I'm just trying to check that it's stable enough for general release at the moment 🙂 It's written in Fennel, a Lisp that compiles to Lua. So the plugin is Neovim specific and 100% Lua based. Conjure supports multiple Lisps, so I've been using it to develop itself by evaluating Fennel code within Neovim! Check out Aniseed if you want to see more about Neovim plugins in a Clojure like Lisp https://github.com/Olical/aniseed Thanks! (if you give it a go, I'd love to hear your thoughts in #conjure 🎉)
Does anyone knows if with fireplace you can have a buffer for displaying the evaluated forms instead of the showing the output in the minibuffer?
@g3o you can open :Last
ah that’s great! Thanks 👍
Hey, I'm trying to get clojure-lsp working with coc, but it's throwing unknown symbol errors all over the place. Anyone got any pointers?
i use clojure-lsp with coc, and i also see a lot of false positives. i think there is just more work needed in order to capture all of the edge cases
it might be worth filing an issue at the clojure-lsp github repo for any issues you find
definitionProvider ... TODO: java classes
oh, another thing worth mentioning is that you can configure clojure-lsp to understand the structure of various macros: https://github.com/snoe/clojure-lsp#macro-defs
i have noticed that the "unknown symbol" errors for java classes go away if you add import statements to your ns form
but i think there might still be issues with fully qualified java classes, which shouldn't always require an import statement
e.g. <http://java.io|java.io>.File
that tracks with their feature matrix, you could solve it by importing the same static list of imports java uses
oh - then it's more complex
overall, i think clojure-lsp is very promising. one of these days i'll do a deep dive into the code and see if i can understand it better so that i can contribute fixes to these issues
I wonder if it's as simple as checking resolve
user=> (resolve '<http://java.io|java.io>.File)
<http://java.io|java.io>.File
or does the lsp thing work statically without loading any code?
In my ns form I have (:require [manifold.stream :as s])
, but it complains that s
is an unknown namespace :man-shrugging:
haha classic bug!
https://github.com/ztellman/manifold/blob/master/src/manifold/stream.clj#L1
the ns form starts with metadata, bad parsers don't know about that feature
(well, that's tea leaf reading but I think it's a good hunch)
you're probably right on the money with that theory
I remember the guy behind core.typed complaining about this not working with clojure.tools.analyzer.jvm years ago, would have assumed it was fixed by now
there's a lot of weird gotchas for a parser that wants to consume clojure forms with metadata
(almost as bad as the number of gotchas for code that wants to use metadata)
@noisesmith I think that might be it. When I don’t use manifold the errors go away. But I would rather use manifold over clojure-lsp lol.
What do people use here for clojure completion in neovim?
@olical looks like the develop
branch doesn’t seem to work with coc-conjure 😞
But, the UX is way better compared to master
. Good job!
@tim.smart try replacing coc-conjure
with coc-conjure-olical
in your vimrc
it's a separate one for now until the develop branch is released
Oh awesome! For some reason coc isn’t registering it when I open a clojure file…
This in my vimrc worked:
let g:coc_global_extensions = ['coc-conjure-olical']
:CocList
shows the source has been registered, but nothing is getting triggered :man-shrugging::skin-tone-2:
hm
OK it is getting trigger, but no completions are being returned.
@olical Is there a way I can debug conjure completions? It looks like completions-promise
is being called fine, but is always returning an empty array.
do you have the cider middleware set up?
No… not sure what that is lol.
Because that's required until the next nREPL update when a simple one will be built on
In
Sounds like that is the issue.
Ah, it's this middleware https://docs.cider.mx/cider-nrepl/
I need to make it more obvious that it's required for some things right now
I'm trying to make it so basics work without it, but adding CIDER enhances everything
Since it's a project that has the whole clojure tooling world behind it.
This should do the trick: https://docs.cider.mx/cider-nrepl/usage.html#_via_clj
If you want to see the underlying nREPL messages you can run :ConjureConfig clojure.nrepl/debug? true
.
It's noisy though!
To see completion errors you can run <c-x><c-o>
to trigger omnicompletion, I think. The passive autocomplete doesn't show errors because you might not want to install cider and have completions
Hence the silence when it goes wrong, it's for a good reason but yeah, tradeoffs.
I’m using boot, so just added a new deftask to my profile.boot. And it works 😭 Thank you!
Yessss so glad to hear that! In the next version of nREPL there's some basics included. So you won't need cider for a simpler complete, but you add it when you want it smarter
It looks like cider has some good stuff, so it was probably a good thing I was introduced it now haha.
Are there any good lint options for nvim, while I’m here?
I use ALE with clj-kondo to good effect
Yep! Same! And joker
I use both
It's great
Thanks, will give ALE and kondo a go.