Fork me on GitHub
#vim
<
2022-04-16
>
Dumch07:04:34

Has anyone started playing with #clojuredart yet? It was https://github.com/Tensegritics/ClojureDart yesterday. I am trying to figure out how to setup nvim with lsp, created question on https://www.reddit.com/r/neovim/comments/u4sqb9/how_do_you_set_up_vim_for_clojuredart/.

snoe15:04:13

Good question @UL05W6AEM #lsp would be a good place to figure it out. cc @UKFSJSM38 roughly, clojure-lsp needs a few things: • Understanding to look for and analyze cljd files. This might require clj-kondo and/or clojure-lsp patches. • A way to identify a project-root based on the presence of a file like deps.edn for clj, usually set by the lsp client (I'm not familiar with nvim's lsp) • A way to define source-paths to analyze. This can probably be manually set in .lsp/config • A command to run to provide a classpath-like list of project dependencies.

ericdallo15:04:37

Yeah, a ClojureDart project always have a deps.edn AFAIK, so that should work, the issue is having dart analysis indeed, like dart files/deps analysis

Dumch15:04:39

I told vim to see .cljd as clojure filetype and lot's of lsp from lsp-config plugin works (snippets, docs from clojure core, clj-kondo warnings), but several things do not (can't go to function definition, can't rename). And I also see this kind of warnings on ns: Can't parse * , No matching clause: unknown If I rename file to *.clj this disappears.

ericdallo17:04:55

Are you using latest clojure-lsp?

Dumch19:04:19

$ brew upgrade clojure-lsp
Warning: clojure-lsp 20210913T222535 already installed
$ clojure-lsp --version
clojure-lsp 2021.09.13-22.25.35
clj-kondo 2021.08.07-SNAPSHOT

ericdallo19:04:17

Probably using wrong brew, please follow installation instructions from here: https://clojure-lsp.io/installation/

Dumch19:04:09

Thank you, now it's 2022.03.31, but still the same warnings on start of the ns, and now when try to 'rename' is answers with 'nothing to rename' (before is allow to rename but with no result)

ericdallo20:04:03

@UL05W6AEM I think that was fixed on latest clj-kondo and we bumped on clojure-lsp master already but didn't release yet, I was planning to release Monday, could you check if it's fixed testing a nightly build at #clojure-lsp-builds?

Dumch20:04:55

I removed installed with brew lsp and put native osx build from here https://clojurians.slack.com/archives/C032YH7P0R2/p1650037542867939 into my /usr/local/bin . Removed .clj-kondo/cache and restart vim — lsp reconnects, and the same error

╰$ clojure-lsp --version
clojure-lsp 2022.03.31-20.00.20
clj-kondo 2022.04.08
And if I rename file to clj —> completelly different warnings

ericdallo20:04:22

Looks odd, would mind creating a repo so I can test that?

ericdallo20:04:32

And specify the detailed steps

ericdallo20:04:17

Yeah, I'm no vim user, if it work on my side with emacs, we can start debugging following troubleshooting section

👍 1
Dumch06:04:23

Fixed with update. I dont know why nightly build didn't help me

👍 1