Fork me on GitHub
#vim
<
2020-04-30
>
Olical15:04:56

👋 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 🎉)

parrot 48
❤️ 12
yiorgos18:04:30

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?

dominicm18:04:14

@g3o you can open :Last

yiorgos18:04:48

ah that’s great! Thanks 👍

Tim Smart19:04:14

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?

dave19:04:35

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

dave19:04:39

it might be worth filing an issue at the clojure-lsp github repo for any issues you find

noisesmith19:04:15

definitionProvider ... TODO: java classes

dave19:04:24

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

dave19:04:09

i have noticed that the "unknown symbol" errors for java classes go away if you add import statements to your ns form

dave19:04:33

but i think there might still be issues with fully qualified java classes, which shouldn't always require an import statement

dave19:04:37

e.g. .File

noisesmith19:04:41

that tracks with their feature matrix, you could solve it by importing the same static list of imports java uses

noisesmith19:04:59

oh - then it's more complex

dave19:04:47

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

noisesmith19:04:33

I wonder if it's as simple as checking resolve

user=> (resolve '.File)
.File

noisesmith19:04:35

or does the lsp thing work statically without loading any code?

Tim Smart19:04:46

In my ns form I have (:require [manifold.stream :as s]), but it complains that s is an unknown namespace :man-shrugging:

noisesmith19:04:38

haha classic bug!

noisesmith19:04:54

the ns form starts with metadata, bad parsers don't know about that feature

noisesmith19:04:13

(well, that's tea leaf reading but I think it's a good hunch)

dave19:04:52

you're probably right on the money with that theory

noisesmith20:04:57

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

noisesmith20:04:41

there's a lot of weird gotchas for a parser that wants to consume clojure forms with metadata

noisesmith20:04:05

(almost as bad as the number of gotchas for code that wants to use metadata)

Tim Smart21:04:31

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

Tim Smart21:04:06

What do people use here for clojure completion in neovim?

Tim Smart21:04:56

@olical looks like the develop branch doesn’t seem to work with coc-conjure 😞

nate21:04:28

@U012TDSCE1H try replacing coc-conjure with coc-conjure-olical in your vimrc

🎉 4
nate21:04:57

it's a separate one for now until the develop branch is released

Tim Smart21:04:12

Oh awesome! For some reason coc isn’t registering it when I open a clojure file…

nate22:04:23

This in my vimrc worked:

let g:coc_global_extensions = ['coc-conjure-olical']

Tim Smart22:04:55

:CocList shows the source has been registered, but nothing is getting triggered :man-shrugging::skin-tone-2:

Tim Smart23:04:04

OK it is getting trigger, but no completions are being returned.

Tim Smart23:04:04

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

Olical23:04:56

do you have the cider middleware set up?

Tim Smart23:04:10

No… not sure what that is lol.

Olical23:04:14

Because that's required until the next nREPL update when a simple one will be built on

Tim Smart23:04:24

Sounds like that is the issue.

Olical23:04:22

I need to make it more obvious that it's required for some things right now

Olical23:04:37

I'm trying to make it so basics work without it, but adding CIDER enhances everything

Olical23:04:48

Since it's a project that has the whole clojure tooling world behind it.

Olical23:04:36

If you want to see the underlying nREPL messages you can run :ConjureConfig clojure.nrepl/debug? true.

Olical23:04:41

It's noisy though!

Olical23:04:17

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

Olical23:04:29

Hence the silence when it goes wrong, it's for a good reason but yeah, tradeoffs.

Tim Smart23:04:31

I’m using boot, so just added a new deftask to my profile.boot. And it works 😭 Thank you!

Olical23:04:15

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

Tim Smart23:04:02

It looks like cider has some good stuff, so it was probably a good thing I was introduced it now haha.

Tim Smart23:04:23

Are there any good lint options for nvim, while I’m here?

nate23:04:23

I use ALE with clj-kondo to good effect

Olical23:04:14

Yep! Same! And joker

Olical23:04:19

I use both

Olical23:04:22

It's great

Tim Smart23:04:37

Thanks, will give ALE and kondo a go.

Tim Smart04:05:38

Works great, thanks for the tip.

Tim Smart21:04:27

But, the UX is way better compared to master. Good job!

🎉 8