lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
bartuka 2021-06-17T12:16:56.169700Z

is it possible to check where is the .clj-kondo/config.ednloaded in a lsp session?

bartuka 2021-06-17T12:17:33.170400Z

I would like to ensure the project config is loaded instead of my global config

bartuka 2021-06-17T12:36:57.172200Z

I am not familiar with clojure-lsp project, but this (https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/config.clj#L23) means that clojure-lsp is not reading any clj-kondo/config.edn files? or the copy-configs option should be enough to make it work?

bartuka 2021-06-17T12:37:31.172500Z

this namespace does not have an explicit "read clj-kondo config" statement

ericdallo 2021-06-17T14:35:18.172700Z

Yes, all of that is handled by clj-kondo, we don't tell clj-kondo to use specific config, it checks automatically by project config or ~/.config/clj-kondo/config.edn

bartuka 2021-06-17T17:10:36.173100Z

I have this in .clj-kondo/config.edn in project root folder

{:linters {:unresolved-symbol {:exclude []}
           :unresolved-var {:exclude [sql/raw sql/call sql/format]}}
and yet the Error List to my project is filled with these msgs:

ericdallo 2021-06-17T17:28:51.173500Z

@borkdude can help here but I think you should use the full qualified symbol in the exclude?

borkdude 2021-06-17T17:40:40.173700Z

@iagwanderson is the namespace called sql or is this an alias?

bartuka 2021-06-17T17:42:40.173900Z

an alias

bartuka 2021-06-17T17:43:27.174100Z

that might be it, I will test asap

borkdude 2021-06-17T17:44:33.174300Z

yeah, you should use the full namespace name

borkdude 2021-06-17T17:45:17.174500Z

@iagwanderson btw, is this for honeysql?

👍 1
borkdude 2021-06-17T17:45:43.174700Z

I have this in my own config:

honeysql.util/defalias clojure.core/def
honeysql.helpers/defhelper clojure.core/def

👍 2
borkdude 2021-06-17T17:47:23.174900Z

this will resolve the correct vars (after analyzing honeysql again)

ericdallo 2021-06-17T17:53:54.175200Z

Yeah, if you have the chance to teach the linter instead of suppress the warning, I think it's better

👍 1
borkdude 2021-06-17T17:55:14.175500Z

you also get better auto-completions for it

borkdude 2021-06-17T17:55:27.175700Z

because ... LSP rules!

🤘 1
bartuka 2021-06-17T18:18:44.176Z

ohh.. nice! thanks @borkdude I didn't know about this option

bartuka 2021-06-17T18:34:45.176400Z

perfect! just tried that out. thanks again