Fork me on GitHub
#vim
<
2021-09-08
>
jayesh-bhoot10:09:38

Hi all. For a relative beginner, which would you suggest? vim-iced, conjure, or clojure-lsp? My work involves both clojure and clojurescript. I expect a few features - autocomplete for both the project and library symbols; refactoring; jump to definition; list usages; linting; etc.

lispyclouds11:09:10

clojure-lsp is recommended for both iced and conjure. its pupose is to provide static analysis , autocomplete, refactoring etc. iced and conjure are for the REPL style dev.

lispyclouds11:09:17

conjure vs iced is based on taste i think. can try both of them out, can decide which suits you better. conjure supports more lisps than just clojure, iced is more clojure focused. both support (neo)vim.

jayesh-bhoot11:09:13

ah! so clojure-lsp works underneath, while the other two are more about repl. That clears up a lot of confusion.

jayesh-bhoot11:09:42

hmm. no. it seems conjure/iced works alongside clojure-lsp

lispyclouds11:09:01

rather clojure-lsp is to be run beside both

jayesh-bhoot11:09:05

where clojure-lsp is centered around the editing experience, while either of the latter two focus on repl experience. correct?

2
lispyclouds11:09:08

lsp is quite different implemented, can check on #lsp for more info. main idea is it analyses your code and deps statically i.e. not spinning up a JVM and eval-ing code. REPL clients need eval hence dynamic analysis

👍 6
lispyclouds11:09:26

if youve used something like IntelliJ, lsp is equivalent to the intellisense that it has

jayesh-bhoot11:09:53

yep. In fact, I have used Cursive, which gave me an impression that I will need only one of these tools to get the static analysis as well as the repl integration support. I see the difference now.

Noah Bogart13:09:03

iced repl is very cool, it’s a “full” environment that’s meant to give you a lot of features and functionality, but that means it also locks you into its way of handling things

Noah Bogart13:09:23

conjure is much less complex and has fewer defaults/keybinds/etc. iced has stuff like “macroexpand under cursor”, conjure leaves that up to the user to write a comment form and then write the (macroexpand '(macro-to-expand …)) to expand the macro

jayesh-bhoot14:09:28

@UEENNMX0T I did not like the conjure's 'pop-up way', at least the one flaunted in their intro video. I would rather have an REPL running in a vim frame. Is that possible?

Noah Bogart14:09:47

hmm i think so! i only recently started using it cuz i found a neovim gui i like (VimR for osx), but i haven’t read through most of the docs so I don’t know

👍 2
walterl20:09:10

@UL6NS3E7P Yes, you can disable the pop-up HUD: :help g:conjure#log#hud#enabled

👍 2
walterl20:09:16

@UEENNMX0T It's easy enough to extend Conjure with macroexpand troll https://github.com/walterl/conjure-macroexpand

🙏 2
Noah Bogart21:09:17

that’s excellent

walterl21:09:20

It's no coc-clojure 🙌

😍 2
dharrigan10:09:30

@UJY23QLS1 have you considered opening a PR for Conjure to bring your code directly into the project?

uwo10:09:08

@UL6NS3E7P Avid conjure user here. I tend to use the pop-up window less, and a vertical split more with <leader>lv. The real magic of conjure, to me, is having a log of your work, and being able to jump into the log split-window and explore it as text -- I'll yank text objects (data) or search large data structures, etc.

💯 2
jayesh-bhoot10:09:29

> The real magic of conjure, to me, is having a log of your work, and being able to jump into the log split-window and explore it as text -- I’ll yank text objects (data) or search large data structures, etc. (edited) @U09QBCNBY sounds like an interesting use case. I wonder if iced can do this too.

uwo13:09:39

@UL6NS3E7P I've never used vim-iced, so I am admittedly biased. I would be curious to know if it supports this kind of workflow as well!

Noah Bogart15:09:51

Give the page a read! It’s not super long. It supports capturing stdio and putting that in a buffer, running tests and prettying results, executing and loading code with a command

👌 2
jayesh-bhoot15:09:25

@UEENNMX0T yep. something for the weekend.

👍 2
Noah Bogart15:09:52

I say all this as someone who just moved from iced to conjure lol. Vim iced is very good and I liked it a lot, just decided to give conjure a try when I moved to neovim and have found it less bulky than iced

sheluchin17:09:54

I'm using vim-iced and I have a few commands defined to extend the command palette. Is there some way to get it to work universally without having to use :IcedCycleSession to switch between clj/cljs? For example, I have a Restart Server command, but it understandably doesn't work when I'm in a cljs session. I define the command like this in my local .nvimrc:

let g:iced#palette = {
      \ 'Restart Server': ':IcedEval (sheluchin.server/restart)',
      \ }

uochan20:09:14

How about like this?

let g:iced#palette = {
      \ 'Restart Server': ':call iced#nrepl#eval#code("(sheluchin.server/restart)", {"session": "clj"})',
      \ }
This forces to evaluate code in clj session.

sheluchin20:09:37

@UBL24PLE6 Many thanks. Is there a way to modify those palette commands without restarting vim and the iced repl?

uochan21:09:14

For temporal, you can execute :let g:iced#palette = {...} command But for permanent, you must modify setting file and restart vim (repl does not need to restart)

sheluchin21:09:53

Got it. Thanks 🙂