is anyone using clojure_lsp
with nvim-lspconfig
? nvim-lspconfig
does have clojure_lsp
listed as a supported server, and I am able to get at least completion working, but that's about it. hover and go to definition don't work, and I think it's maybe because the lsp doesn't know my classpath? I'm having trouble translating
"initializationOptions": {
"project-specs": [{
"project-path": "deps.edn",
"classpath-cmd": ["clj", "-Spath"]}]
}
to something like this
nvim_lsp.clojure_lsp.setup{
on_attach = custom_on_attach,
settings = {
ignoreClasspathDirectories = true,
},
init_options = {
projectSpecs = {
projectPath = "deps.edn",
classpathCmd = {"clj", "-Spath"},
},
}
}
(lua doesn't seem to like hyphenated variable names)
I have about 0 experience with lua, and afaik their only datastructure is the table (associative array), so I'm trying to figure out how to shunt that edn into a tableIt is supported, the default config is here https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/clojure_lsp.lua
Yes, I did see that, but there is no example configuration of the initialization options if you want to further configure the server
as an update, I now set my config in .lsp/config.edn
, and deleted the lsp sqlite db in .lsp
and things started to work after clojure_lsp
rebuilt it
I also just tried passing in the edn string to init_options
. After poking around a little more it seems like completion sort of works. I can get completion for clojure.core
functions, but not e.g. the vars in mount.core
if I (:require [mount.core :as mount)
I'm struggling with Fireplace and Piggieback for my CLJS REPL. nREPL and Fireplace is working nicely for the Clojure server code, I can eval things and so on. but if I connect to the CLJS REPL in my browser, I can eval things from the REPL prompt but not through Fireplace.
:Piggieback (figwheel.main.api/repl-env "dev")
works fine, but then when I cpp
on (+ 7 8)
or something I get
Vim(return):E716: Key not present in Dictionary: response, 'value', [])