Fork me on GitHub
#vim
<
2019-05-23
>
lxsli08:05:56

@snoe I got CoC + clojure-lsp working! Really cool, thanks for this. I'm getting a lot of "Unknown symbol". EG I have com.rpl.specter :refer :all and MAP-KEYS isn't recognised. java.util.Date also isn't recognised.

lxsli08:05:34

Weirdly MAP-VALS is available from Coc autocomplete but still comes up as an unknown symbol. MAP-KEYS isn't available.

lxsli12:05:49

Also when in diff view, my ns declaration (`(ns worker.logic.genesis)`) is marked unused

lxsli14:05:25

can't reproduce this one

lxsli12:05:11

I can open github issues if you want

dave12:05:17

what's CoC?

dave13:05:36

ah, neat. looks promising!

dave13:05:43

@alee did you have to do anything special to get CoC + clojure-lsp working? is it just a matter of installing both plugins?

snoe13:05:27

@alee yeah, github issues would be great - I haven't used specter but it's possible we can support the symbols it creates through the macro-defs config. We'll figure it out in the issue

snoe13:05:49

@dave clojure-lsp is just a command line tool that coc.nvim (or any editor/lsp plugin) launches. lmk if you run into problems getting it running

dave13:05:03

👍 i'm keen to give it a try. i use deoplete now and i'm not totally satisfied with the completion results or the behavior, which can be slightly buggy

dave13:05:20

and i really like the philosophy behind LSP

lxsli13:05:22

Install instructions, from memory: Plug 'neoclide/coc.nvim', {'tag': '*', 'do': './install.sh'} - do the necessary to install Download clojure-lsp from github release, chmod +x, put on path Copy snoe's https://github.com/snoe/dotfiles/blob/master/home/.vimrc from the " COC comment down into your .vimrc or whichever Launch vim Run :CocConfig, accept json addon, paste https://github.com/snoe/dotfiles/blob/master/home/.vim/coc-settings.json Change the command to the full path to clojure-lsp, replace args with [] Relaunch vim to edit a clojure file, wait a few seconds for the clojure-lsp JVM to start as a subprocess (it's silent).

dave14:05:20

that's helpful, thanks!

👍 4
lxsli14:05:35

oh one more thing, snoe bound to <leader>, I changed all those to <localleader>

dharrigan14:05:56

YOu know with sexp (or sexp-mappings-for-egular-people), if you slurp or barf, is there a way to stop the extra space from being inserted

dharrigan14:05:01

personally, I find it very annoying

dharrigan14:05:23

(I like my braces, ( close to my letters :-))

dominicm14:05:11

What extra space? What keys are you pressing?

dominicm17:05:54

I don't think I get a space when I do this

dharrigan20:05:52

I think it's the formatting on my side, nvm. thanks! 🙂

dharrigan14:05:08

(which reminds me, can I also slurp and barf curlies } and squares ])?

tvirolai16:05:10

Yes, with the same key combinations as the regular parentheses.

mynomoto14:05:47

@snoe any suggestions on how to deal with macros using clojure-lsp? They generate lots of false positives (same problem on all static checkers currently). Some common way to configure those would be interesting, but I'm not sure that's even possible.

mynomoto14:05:52

On joker I just rewrote a macro for it to know how to warn things correctly.

snoe14:05:52

@mynomoto yeah, take a a look at the macro-defs config, I think it's pretty flexible but there's still stuff missing. https://github.com/snoe/clojure-lsp/blob/master/src/clojure_lsp/parser.clj#L620 for some examples

mynomoto15:05:36

Ok, I will check it out. Thanks!