vim

For discussion on all things (neo)vim.
Olical 2020-04-30T15:46:56.032300Z

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

❤️ 3
🦜 12
yiorgos 2020-04-30T18:30:30.034700Z

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?

dominicm 2020-04-30T18:31:14.035200Z

@g3o you can open :Last

yiorgos 2020-04-30T18:32:48.035600Z

ah that’s great! Thanks 👍

Tim Smart 2020-04-30T19:23:14.037600Z

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?

dave 2020-04-30T19:48:35.038600Z

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

dave 2020-04-30T19:49:39.040Z

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

2020-04-30T19:51:15.041200Z

definitionProvider ... TODO: java classes

dave 2020-04-30T19:51:24.041400Z

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

dave 2020-04-30T19:52:09.042100Z

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

dave 2020-04-30T19:52:33.042900Z

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

dave 2020-04-30T19:52:37.043100Z

e.g. <http://java.io|java.io>.File

2020-04-30T19:52:41.043300Z

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

2020-04-30T19:52:59.043600Z

oh - then it's more complex

dave 2020-04-30T19:53:47.044900Z

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

2020-04-30T19:54:33.045100Z

I wonder if it's as simple as checking resolve

user=&gt; (resolve '<http://java.io|java.io>.File)
<http://java.io|java.io>.File

2020-04-30T19:56:35.047400Z

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

Tim Smart 2020-04-30T19:56:46.047600Z

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

2020-04-30T19:57:38.047900Z

haha classic bug!

2020-04-30T19:57:54.048600Z

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

2020-04-30T19:58:13.049Z

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

dave 2020-04-30T19:59:52.049900Z

you're probably right on the money with that theory

2020-04-30T20:00:57.051Z

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

2020-04-30T20:01:41.051500Z

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

2020-04-30T20:02:05.052Z

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

Tim Smart 2020-04-30T21:15:31.052900Z

@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 Smart 2020-04-30T21:16:06.053400Z

What do people use here for clojure completion in neovim?

Tim Smart 2020-04-30T21:18:56.054300Z

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

Tim Smart 2020-04-30T21:19:27.054900Z

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

🎉 2
nate 2020-04-30T21:21:28.055100Z

@tim.smart try replacing coc-conjure with coc-conjure-olical in your vimrc

🎉 1
nate 2020-04-30T21:21:57.055300Z

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

Tim Smart 2020-04-30T21:30:12.055900Z

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

nate 2020-04-30T22:38:23.056300Z

This in my vimrc worked:

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

Tim Smart 2020-04-30T22:56:55.056500Z

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

nate 2020-04-30T22:59:47.056700Z

hm

Tim Smart 2020-04-30T23:00:04.056900Z

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

Tim Smart 2020-04-30T23:21:04.057100Z

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

Olical 2020-04-30T23:21:56.057300Z

do you have the cider middleware set up?

Tim Smart 2020-04-30T23:22:10.057500Z

No… not sure what that is lol.

Olical 2020-04-30T23:22:14.057700Z

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

Olical 2020-04-30T23:22:15.057900Z

In

Tim Smart 2020-04-30T23:22:24.058100Z

Sounds like that is the issue.

Olical 2020-04-30T23:25:08.058300Z

Ah, it's this middleware https://docs.cider.mx/cider-nrepl/

Olical 2020-04-30T23:25:22.058500Z

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

Olical 2020-04-30T23:25:37.058700Z

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

Olical 2020-04-30T23:25:48.058900Z

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

Olical 2020-04-30T23:26:31.059100Z

This should do the trick: https://docs.cider.mx/cider-nrepl/usage.html#_via_clj

Olical 2020-04-30T23:27:36.059300Z

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

Olical 2020-04-30T23:27:41.059500Z

It's noisy though!

Olical 2020-04-30T23:28:17.059700Z

To see completion errors you can run &lt;c-x&gt;&lt;c-o&gt; to trigger omnicompletion, I think. The passive autocomplete doesn't show errors because you might not want to install cider and have completions

Olical 2020-04-30T23:28:29.059900Z

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

Tim Smart 2020-04-30T23:31:31.060100Z

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

Olical 2020-04-30T23:32:15.060300Z

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 Smart 2020-04-30T23:33:02.060500Z

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

Tim Smart 2020-04-30T23:34:23.060700Z

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

nate 2020-04-30T23:36:23.060900Z

I use ALE with clj-kondo to good effect

Olical 2020-04-30T23:38:14.061100Z

Yep! Same! And joker

Olical 2020-04-30T23:38:19.061300Z

I use both

Olical 2020-04-30T23:38:22.061500Z

It's great

Tim Smart 2020-04-30T23:48:37.061700Z

Thanks, will give ALE and kondo a go.