Fork me on GitHub
#conjure
<
2021-01-05
>
dharrigan10:01:15

Speaking a bit out clojure-lsp etc.,

dharrigan10:01:32

it recently learnt the ability to do semantic variables

dharrigan10:01:48

would that work with conjure (+ coc-conjure)?

Olical10:01:30

Hmm not sure, it could well do! Not sure if @jlesquembre (maybe only on github, not on slack) has a better idea though.

Olical10:01:41

Oh I see, so clojure-lsp provides semantic variables, coc-conjure provides completions results from CIDER :thinking_face: I guess you want to merge those two sources somehow? I don't think that's something I can do from within Conjure though.

dharrigan10:01:23

Yeah, I have no idea how it would work either ;(

dharrigan10:01:41

There you go. It can be added on to

Olical10:01:53

Thank you so much, David!

dharrigan10:01:01

I'll take the rest of the day off now

dharrigan10:01:04

my work here is done.

Olical10:01:08

Definitely!

emilaasa10:01:36

Added some of my use cases to a comment

👍 3
Olical10:01:09

This is a much better format for ideas than me adding a single sentence to my ever growing list of things to do 😅

emilaasa10:01:50

Actually when I realized you could write nvim extensions in fennel I got a bit excited

emilaasa10:01:09

I have avoided vimscript like the plague.. 😃

Olical10:01:36

That's why I took a year long detour building Aniseed so I could eventually rewrite Conjure in it.

Olical10:01:47

There's no greater motivator than my language snobbery.

emilaasa10:01:03

That's cool 😃

Olical10:01:17

Hoping to add completion support to aniseed soon too!

Olical10:01:38

Well, Conjure + Aniseed, the projects are two sides of the same coin really.

emilaasa10:01:41

Oh I stumbled upon aniseed a while ago, I guess I've been a fan of yours for a while =)

emilaasa10:01:05

What's the plan regarding conjure vs lsp by the way?

Olical10:01:32

Their feature sets are derived from their constraints really. So Conjure is specifically REPL tooling, the only information it has comes from sending messages to a running instance of your program. LSP is purely static analysis so it has no idea about the running state but knows lots about the code at rest. My opinion is that if you can find a way to use both, you totally should. If someone has a sweet Conjure + LSP setup I'd love to read a post on it to be honest. Conjure will always be about live evaluation of code and tight feedback loops on what actually happened. LSP will fill in some gaps in completion and go to def tooling (even though Conjure supports that), they'll each excel in certain areas I think.

Olical10:01:19

It's not so much Conjure vs LSP, but more how can we get both at once.

3
emilaasa10:01:07

Cool - that sounds like a pretty good distinction and one that's technologically enforced as well.

emilaasa10:01:41

I'll get on that blog post 😛

emilaasa10:01:40

Might as well document the unavoidable frustrations I'll run in to.

practicalli-johnny11:01:23

@U11EL3P9U has a conjure + LSP setup, I am sure he would be happy to share his setup

dave11:01:45

I also have both. It isn't difficult to pull off, they really are two separate things. I use COC as my LSP client

dharrigan13:01:04

Happy to share it 🙂

Chase16:01:31

So I have LSP and clj-kondo setup and things seem to be working fine. I'm curious how you folks are using them. Are you overwriting anything with conjure or coc.nvim for like "get definition"? How are you using it for refactoring?

Chase16:01:06

Also, is there a good way to toggle them off and on? Sometimes when I'm trying to get into a flow I want to shut off all the warnings and such.

dharrigan17:01:11

I'm not doing anything special

dharrigan17:01:30

I think I should put my config up. I'm interested to learn if I am missing out on something too

dharrigan17:01:44

my impression is that clojure-lsp is ahead in the emacs world

Chase17:01:51

Yeah, the guy running clojure-lsp seems to have a lot of cool stuff going on here: https://github.com/snoe/dotfiles/blob/master/home/.vimrc

Chase17:01:23

Down towards the bottom. I probably should have made this a #vim topic

dharrigan19:01:27

These are about the only mappings I use in my .vimrc atm:

dharrigan19:01:07

nnoremap <silent> <c-space> :call CocAction('doHover')<CR>
nnoremap <silent> K :call <SID>show_documentation()<CR>
nnoremap <silent> cram :call CocRequest('clojure-lsp', 'workspace/executeCommand', {'command': 'add-missing-libspec', 'arguments': [Expand('%:p'), line('.') - 1, col('.') - 1]})<CR>
nnoremap <silent> crcn :call CocRequest('clojure-lsp', 'workspace/executeCommand', {'command': 'clean-ns', 'arguments': [Expand('%:p'), line('.') - 1, col('.') - 1]})<CR>
nnoremap <silent> crcp :call CocRequest('clojure-lsp', 'workspace/executeCommand', {'command': 'cycle-privacy', 'arguments': [Expand('%:p'), line('.') - 1, col('.') - 1]})<CR>

dharrigan19:01:43

I'l l have to evaluate the recent updates to clojure-lsp to see if there are any others I may be interested in (his other ones' I removed since not that interested in them)