vim

For discussion on all things (neo)vim.
2021-01-12T03:37:51.345200Z

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 table

2021-01-12T16:44:04.345600Z

It is supported, the default config is here https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/clojure_lsp.lua

2021-01-13T00:04:16.348600Z

Yes, I did see that, but there is no example configuration of the initialization options if you want to further configure the server

2021-01-14T16:37:06.000100Z

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

2021-01-12T04:12:49.345400Z

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)

2021-01-12T17:15:55.347600Z

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', [])