Fork me on GitHub
#vim
<
2022-04-09
>
Carl23:04:24

Hi all, I'm a neovim user with a conjure/built in lsp config for clojure. I'm using the promesa library and see a lot of this "unresolved symbol" error while using promesa's p/let macro despite the code otherwise working. Understandably it's probably due to the editor not know what the macro actually does, but I am not sure how to resolve this.

ericdallo23:04:08

Add this to your project: .clj-kondo/config.edn

{:lint-as {custom-ns/let clojure.core/let}}

ericdallo23:04:21

Being custom-ns the correct p/let namespace

Carl00:04:51

Thanks @UKFSJSM38 that seems to have done the trick. While looking in .clj-kondo I saw that there is .clj-kondo/funcool/promesa/config.edn which was presumably installed with the library which has all of the :lint-as settings I probably eventually want. Is there a way to make Neovim detect this instead?:

Carl00:04:39

Or as well as the new .clj-kondo/config.edn I just added

Carl00:04:27

The importing section https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#importing looks like what I want to do. So it would appear I just need to change my .clj-kondo/config.edn to

{
 ; :lint-as {promesa.core/let clojure.core/let}
 :config-paths ["clj-kondo/funcool"]}
but that doesn't seem to be working

Carl00:04:04

Oh I really am silly, this is what it should have been:

{:config-paths ["funcool/promesa"]}
All working now!

ericdallo02:04:05

Yeah, that's correct sorry for the delay, good you already found it

❤️ 1