This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-25
Channels
Hi, I have latest clojure-lsp binary on path. I'm using neovim. I have a bb project with the following bb.edn root file {:paths ["bb"]} I have a ~/.lsp/config.edn as {:project-specs [{:project-path "bb.edn" :classpath-cmd ["bb" "print-deps"]}]} :LspInfo on clojure buffer gives me 1 client(s) attached to this buffer: Client: clojure_lsp (id: 2, bufnr: [1, 6]) filetypes: clojure, edn autostart: true root directory: /home/geraldo/projetos/fgts cmd: clojure-lsp 1 active client(s) not attached to this buffer: I'm not getting documentation when I'm calling lua vim.lsp.buf.hover()
@U0516053R, clojure-lsp already has good defaults for project-specs, which recognizes bb.edn by default, it should work without that config
This is https://github.com/clojure-lsp/clojure-lsp/blob/master/lib/src/clojure_lsp/classpath.clj#L184-L185
so the classpath-cmd should be ["bb" "print-deps" "--format" "classpath"]
, but I'd suggest not overriding project-specs unless your projects is really that different and need that kind of customization
So you are suggesting that I get rid of config.edn because my root is bb.edn already ?
yes, clojure-lsp is already smart enough to find that bb.edn at the root and know how to build the classpath without any extra config
I did, and the result is the same.
1 active client(s) not attached to this buffer: on clojure with :LspInfo
Is that relevant ?
yes, that means clojure-lsp is not even starting, so not a server issue, but a client one, in this case, some misconfiguration with neovim
Thank you, I'll look into it
This time I'm using https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/test/minimal_init.lua to troubleshoot . I'm getting : Language client log: /home/geraldo/.local/state/nvim/lsp.log Detected filetype: clojure 1 client(s) attached to this buffer: Only warn on lsplog is : [WARN][2022-12-25 12:08:42] ...lsp/handlers.lua:128 "The language server clojure_lsp triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless" There are no ERR It does not show doc for (clojure.core/str)
right, so clojure-lsp seems to be starting, now we can debug on server side via this:
I'm using last nightly nvim
Sorry, I'm no nvim user, so that warning I have no context. about the doc not showing, please follow the troubleshooting I linked
I'm trying to use lsp without conjure. Neovim is being bombarded with lua plugins. I'm trying not to use Coc and stick to lsp provided by neovim and its lua plugins...
only warns on clojure-lsp logs is 2022-12-25T20:17:55.049Z WARN [clojure-lsp.kondo:305] - Non-fatal error from clj-kondo: No configs copied., the hover action takes 9ms, no error, shows nothing I also have DEBUG [clojure-lsp.nrepl:21] - nrepl not found, skipping nrepl server start... I think this is normal because is a bb.edn root project Using clojure-lsp static binary
Tryed with vscode calva. It shows no doc like in nvim.
same output in vscode on mouse hovering
and the paste from stdin test is working from troubleshoot
clojure-lsp 2022.12.09-15.51.10
that's odd, Calva uses latest clojure-lsp and works out of the box, could you:
ā¢ rm .lsp/.cache
ā¢ restart and get server logs
The cache removal is only to see the printed classpath during startup
That's exactly what I just did, removed -rf .lsp and .clj-kondo and It started to work again. Mutability woes š
Thank you for supporting us.
Thanks! I'm not aware of any cache issue, we had some of those in the past, but it's been a long time since I didn't see any cache issues, if you find a way to repro the problem LMK so we can try to fix it :)
I want to use clojure-lsp and fireplace together. With fireplace I'm inside the matrix, with clojure-lsp I'm remotely watching it š
I suggest you check some of the features https://clojure-lsp.io/features/, and search how to use it on nvim if you have interest in some of them. I hope to create a nvim tutorial in 2023 š¤
There are no hover information for def . defn has, def does not
I suggest you use something like https://github.com/AstroNvim/AstroNvim . It's not intrusive. I've discovered it today. I've used it to troubleshoot clojure-lsp today
It has Mason, which is a plugin for installing lsp dependencies, just say :Mason and you'll get a nice gui
I already has all bindings configured for lsp , if you want to search :Telescope and type keymaps
It's a good starting point. And it keeps you from going into the intricacies of nvim configuration
that's nice, I use emacs and found really confusing to understand those kind of things when I tried nvim, seems like it needs a lot of setup indeed, something doom-emacs really aim to fix it
My guess is, nvim gave new birth to vim with Lua plugins revolution. It's a revolution... I've never used Lua before, It's a simple enough language. You can turn LSP on for it. Very nice one from Brasil my country š