Idea: Is it possible to display additional information in the UI sidebar? For example, marking private vars as such, noting a macro, showing # of references, etc.? That might be kind of cool. Something I noticed: References are counted when the function calls itself from a separate arity. Is that intentional?
Yeah, it needs to be on to sync 😅
BTW lsp-ui-menu only show documentSymbol, but yeah, you can bring this idea to lsp-mode and see what they think, we could have multiple functions that call different lap methods am show on the sidebar or a summary one
There is a lsp-mode wishlist issue
just as a note: I think it’s generally a bit unclear what packages you need installed to get the feature, or which M-x cmd
matches which feature, or if there’s a default binding for it, etc. There may be a good reason for this, I don’t know.
I think lsp-mode has which integration which shows all features via keybindings?
also, how do I display the call graph? (I’m in emacs)
> Something I noticed: > References are counted when the function calls itself from a separate arity. Is that intentional? IMO looks correct
lsp-treemacs-call-hierarchy
what is UI sidebar?
yeah, my bad, just had to install the lsp-treemacs package
i meant lsp-ui-imenu
that’s the one i mentioned, but perhaps lsp-treemacs-symbols could achieve something similar
this doesn’t happen for you?
hrm, seems to now be doing it even when i remove the foo
. will clear .cache and sqlite and look again
this is me changing it to call itself, do a lsp-lens-hide and lsp-lens-show, then changing it back and doing it again.
(with saves)
annddd, looking at the source i guess lens-show is what updates the overlay
anddddd, now my stupidity is revealed. I just needed to turn lsp-lens-mode on 🤦 i’m 0/2 tonight
hi anyone using neovim 5
and clojure-lsp
and nvim-lspconfig
? no coc-nvim
I do. There’s still a little bit of brittleness here and there meaning I have to start a new neovim instance to reset state.
But I like the experience and I’ll keep using it. I actually run Clojure-lsp from source to be able to debug some stuff.
doesn't it start automatically ?
It does. It just that some times thing end up out of sync or LSP stops working entirely.
yes it happens with other languages
Maybe @dharrigan or @rafaeldelboni
I'm using this pretty basic setup https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#clojure_lsp but no luck. LSP does not start so no autocomplete etc etc.
@orestis latest release should not happen out of sync anymore
We disabled the incremental text changes until fix it
Unforutnately no, I'm still on neovim 4 (stable) and coc
I don't trust the NeoVim client too much @ericdallo 🙂 I think clojure-lsp is mostly OK these days.
Is the executable in neovim's path?
I would check the Neovim lsp logs to see...
lua vim.cmd(":e"..vim.lsp.get_log_path())
Also see what :LspInfo
shows
My experience of using neovim (4), conjure, clojure-lsp and coc is rock solid. I know others use deoplete instead of coc and they have a good experience too.
I have these functions defined to fiddle with the neovim client
function! LSPLog()
lua vim.cmd(":e"..vim.lsp.get_log_path())
endfunction
command LSPLog call LSPLog()
function! LSPDev()
lua vim.lsp.stop_client(vim.lsp.get_active_clients())
lua require('lspconfig').clojure_lsp_dev.autostart()
endfunction
command LSPDev call LSPDev()
ha got an error
1049 [ ERROR ] 2021-03-26T10:35:29-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:458 ]> "rpc">"clojure-lsp">"stderr"> "Mar 26, 2021 10:35:29 AM org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError\nSEVERE: Unable to invoke no-args constructor for class org.eclipse.lsp4j.ShowDocumentCapabilities.
I should try coc after @dharrigan enthusastic approval. I think deoplete is just for autocompletion though, still relies on the built-in neovim LSP client.
I would ask @ericdallo about this error...
How did you Installed clojure-lsp?
It's indeed a graalvm missing reflect config, but I can repro with both integration tests and emacs
I wonder how did that happen
first try using brew
then I removed it and got the latest zip release
Yeah me neither, I'm waiting 5 go to stable to make the move.
ditto
Make sure to install it via official brew tap
ok will try it again
https://clojure-lsp.github.io/clojure-lsp/installation/#macos
yes same error
anyway no rush. I'm a newbie setting up my environment to start playing w clojure.
Coming from Ruby Elixir JS
Ok, I'm not on pc right now, but I can take a look in 30mins
It's easy to fix it, but I'd like to repro the error
kk appreciate. Thanks !
:thanks:
Found the issue, it's a feature lsp-mode (:emacs:) has https://github.com/emacs-lsp/lsp-mode/issues/2459, I'm fixing on clojure-lsp side
@aldo.nievas fixed on master, before I release it, could you test with a local release?
is just clone clojure-lsp repo and run make debug-bin
removing it from brew first ?
you don't need to remove, you can point on nvim to the generated binary on clojure-lsp root
ok
actually, you will need to point to it to use the generated, otherwise it will not find on your PATH
I have no idea how to do that on vim
kk
Perfect !
Nice 🙂
I should release that fix soon, then you can use it via brew again, I'll just include other fix/features before
good work, dude. Thanks !
I've been using coc for a couple years now. its basically a compilation of the vscode implementation which is why it's so rock solid. There's a lot to it and my experience with the neovim project leads me to think it will be 2-3 years before they have a solid, matching implementation.
I've been thinking of writing a sci + rewrite-clj scripting tool (compiled with GraalVM) for instantly rewriting Clojure code from the command line: but here's another thought: what if users can plug in their own scripts into clojure-lsp for customly rewriting code and hook it up to some action in their editor?
a bit like clj-kondo hooks
It could work, it'd need to implement things not following LSP spec and implement it on every client side editor though
looks a interesting feature
I think you mentioned some custom code action recently?
yes, it'd would need to be something like that, but a lot of more work
like how you did the lint-as feature
looks nice, we could elaborate and think how that would work
as of now it's just a vague thought, but might be nice to keep in the back our mind
sure, I know lsp-mode is quite extensible for those kind of things as well, but other editors like vim and Calva may have a hard time
so we'd need to think the best "protocol" to work nice for client and server