This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-23
Channels
- # announcements (2)
- # beginners (165)
- # boot (11)
- # cider (11)
- # clj-kondo (7)
- # cljdoc (1)
- # cljsrn (5)
- # clojure (120)
- # clojure-dev (21)
- # clojure-europe (3)
- # clojure-france (1)
- # clojure-italy (62)
- # clojure-nl (8)
- # clojure-spec (26)
- # clojure-uk (40)
- # clojuredesign-podcast (1)
- # clojurescript (3)
- # cursive (2)
- # data-science (2)
- # datomic (10)
- # emacs (2)
- # figwheel-main (1)
- # fulcro (17)
- # graphql (5)
- # hoplon (5)
- # jackdaw (15)
- # jobs (2)
- # juxt (1)
- # luminus (5)
- # off-topic (1)
- # onyx (11)
- # pathom (4)
- # pedestal (1)
- # re-frame (4)
- # reagent (11)
- # reitit (1)
- # remote-jobs (5)
- # shadow-cljs (48)
- # spacemacs (2)
- # specter (4)
- # sql (24)
- # tools-deps (25)
- # vim (82)
interesting. Goes to show I'm probably not utilizing the power of the repl enough because I've just been relieved to come back to clojure and get my interactive eval'ing on.
I'm thinking I'm not getting autocompletion suggestions because I don't think coc.nvim actually uses omnicomplete because it blocks something, I don't know. I'll have to rethink how I want to go about that. I would like to keep using coc.nvim as it's been a great experience for me in other languages.
Conjure seems to provide a coc-conjure
extension that makes it work together so maybe I'll give this whole socket repl thingamajig a try. I always fall into this tinkering trap though and go back to my nice fireplace work flow.
fireplace just provides vanilla omnicomplete, i'm not sure which if these plugins can leverage that. @dominicm can maybe say more
but how does Compliment fit in to all of this? "If you use Nightcode, vim-fireplace, or Atom, then you don’t have to install anything at all — Compliment will already be there for you." from it's readme
Yeah it was my whole confusion on omnicompletion. Coc.nvim doesn't use it for it's autosuggestions apparently. Once I hit <C-x><C-o> which if I remember correctly is the omnicompletion button I get the suggestions I was looking forward. Now the debate is if I want autosuggestions I need to abandon my coc.nvim setup or abandon fireplace for conjure which apparently integrates the Compliment autocompletion with coc.nvim nicely (maybe a third option I'm not seeing). The ole lose-win, win-lose situation unfortunately.
I haven't played with coc.nvim at all, but could do. It didn't turn up in my searches, probably because I assumed it was a language-server only tool. async_clj_omni provides integrations with ncm2 & asyncomplete (and also a legacy ncm1, the deoplete integration is broken & I need to chase it)
blugh, I wish we could get to the bottom of this lsp stuff and not have every plugin that provides a modicum of integration with lsp having a billion features.
coc & ale have so much overlap it's crazy. They're completion & linting tools, why to they both have documentation bindings?!
i was trying to puzzle my way through this recently. the overlap is definitely confusing. i finally landed on having both installed, and they do seem to play nice together, FWIW
i do have this in my config, lifted from @U0ECYL0ET :
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if &filetype == 'vim'
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
so i guess that overrides any binding of K that ALE might be doingwhoops, i totally lifted the above from @U0BUV7XSA, not @U0ECYL0ET. the people developing badass clojure vim tooling are all starting to blend together in my mind
https://github.com/neoclide/coc.nvim/wiki/Create-custom-source this looks fairly amenable to the fireplace async api, shouldn't be too difficult to get this written. It'll be a little while before I muster up the energy to figure out how to install coc though 🙂 The bulk of it should be something like:
function! coc#source#async_clj_omni#complete(opt, cb)
call fireplace#omnicomplete({candidates -> a:cb(candidates)}, a:opt.input)
endf
Where a:opt.input may need to have matchstr
called against it in order to strip extraneous things like (
.Fireplace just shipped an async completion API, so async_clj_omni is now supporting asyncomplete & ncm2. coc.nvim coming soon™
a lot of autocompletion stuff just works out of the box. there are a ton of coc plugins available that you install via :CocInstall
and it just works™
@dave Can you list a few of your favourites please? I'm using snoe/clojure-lsp very happily
@slack1274 which lsp plugin are you using clojure-lsp with?
i also use clojure-lsp which is great, and i use coc-conjure too which is nice i also use: • coc-gocode (go) • coc-java • coc-rls (rust) • coc-solargraph (ruby) • coc-html • coc-json (supports JSON schema) • coc-vimlsp (viml) • coc-marketplace (provides an easy way to search for coc extensions without leaving vim)
it's especially great for statically typed languages. you can see the docs/type signatures for methods when you hover over them or start to autocomplete them
@dave got a repl open? if you try and complete with j.l.S
does anything come up from coc-conjure?
I'm also getting some weird stuff where coc is caching the results and not triggering for every character change, so for rem
I'm seeing reify
It's talking directly to Conjure's stand alone JSON RPC server to get completions without blocking Neovim in any way, if that helps at all. I guess it's mainly about how the plugin is written.
it doesn't 🙂 I was just checking whether coc-conjure had figured out how to make this work or not
i guess if clojure-lsp were doing that, then i would still see it even if my repl isn't running
I have something that basically works, but coc.nvim doesn't support certain things that I need to do this in pure vimscript. I'm trying to avoid creating an npm module tbh.
Yeah I'm thinking Conjure has found a way to get Compliment autosuggestions working nicely with coc.nvim. Is that what you folks are saying? And you are thinking of trying to get that same functionality with fireplace? Either way, thank you guys so much for discussing it.
@chase-lambert I have something that 80% works with coc.nvim for fireplace, yeah 🙂
https://github.com/neoclide/coc.nvim/issues/1016 I need this so that you get a refresh after hitting / for namespaces
I might try clojure-lsp again with coc.nvim but I want a way to just shut it off without shutting down the rest of coc.nvim's completion capabilities. Sometimes the language server is a bit too "pushy" for me as I'm experimenting around.
yeah, he's helped me a lot on unrelated things. I'm sure he'll respond very quickly.
I'll install this async-clj-omni and give it a go. are you saying it longer requires deoplete as I don't plan on switching to that
so once I get this working, what is the overlap between this, Compliment, and clojure-lsp?
compliment is a general-purpose clojure library. It's used by cider for completion, and also by conjure.
ever since I added cider-nrepl
in I get these warnings when starting lein repl
:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by mranderson049.orchard.v0v4v0.dynapath.
v0v2v5.dynapath.defaults$eval3696$fn__3697 to method java.net.URLClassLoader
.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of mranderson049.
orchard.v0v4v0.dynapath.v0v2v5.dynapath.defaults$eval3696$fn__3697
WARNING: Use --illegal-access=warn to enable warnings of further illegal ref
lective access operations
WARNING: All illegal access operations will be denied in a future release
they'll disappear in java 12 I believe. In java 11 they report themselves as accessible, but then you use them & this happens.
No, because they won't be flagged as accessible. And the thing searching the chain will continue until it finds something that's actually accessible.
man, coc.nvim with these autosuggestions and the documentation in the floating windows is such a darn game changer for (neo)vim for me.
yeah I fell in love with it with rust but couldn't figure out a way to get that goodness with Clojure. I think we're there!
@chase-lambert update coc.vim, chez fixed the bug and now /
will trigger a re-scan.
Nice! Thanks so much man. Didn't expect to have all my wishes and desires fulfilled in one day. hahaha.