Fork me on GitHub
#vim
<
2021-12-17
>
emilaasa14:12:47

Anyone have an example of how coc-settings.json should look like to make clojure-lsp understand a deps edn project?

emilaasa14:12:17

This is my current lsp config:

"languageserver": {
        "clojure-lsp": {
            "command": "clojure-lsp",
            "filetypes": ["clojure"],
            "disableDiagnostics": false,
            "rootPatterns": ["deps.edn", "project.clj"],
            "additionalSchemes": ["jar", "zipfile"],
            "trace.server": "verbose",
            "initializationOptions": {
                "project-specs": [{
                    "project-path": "project.clj",
                    "classpath-cmd": ["lein", "classpath"]
                }],
                "use-metadata-for-privacy?": true,
                "ignore-classpath-directories": true
            }
        },

emilaasa14:12:46

The immediate problem I'm trying to solve is being able to run with both lein and and the clojure command line

ericdallo14:12:14

I really suggest don't override project-specs``

ericdallo14:12:34

that's likely to be your issue

emilaasa14:12:29

Great thanks Eric! I have configs that are a bit dated 🙂

Noah Bogart14:12:43

not to toot my own horn too much, but I wrote coc-clojure (https://github.com/NoahTheDuke/coc-clojure) to make using clojure-lsp easier for coc

☝️ 2
emilaasa14:12:14

Looks great I'll check it out!

emilaasa14:12:36

I actually really appreciate horn tooting here as much as possible, it can be pretty hard to keep up with the great improvements now with neovim, lsp, conjure and all that

Noah Bogart14:12:51

glad to help!

emilaasa15:12:57

Hey it's working 😄 Thanks!

🎉 3
🚀 2
clojure-lsp 2