Support correct namespace for exported clj-kondo hooks
mrkam2 opened this issue · comments
Is your feature request related to a problem? Please describe.
When I create a clj-kondo hook file in resources/clj-kondo.exports/<org_name>/<lib_name>/…/<ns_name>.clj
, it gets a (ns clj-kondo.exports.<org_name>.<lib_name>...)
declaration which I need to fix to remove clj-kondo.exports.<org_name>.<lib_name>.
prefix from it.
Describe the solution you'd like
It would be great for clojure-lsp to recognize this situation and create correct namespace declaration.
Here is a detailed example. Let's say I'm working in a library my-company/cool-lib
and create a hook for a macro that lives in namespace feature.helper
. I will create a hook file in resources/clj-kondo.exports/my-company/cool-lib/hooks/feature/helper.clj
and I need its namespace declaration to be (ns hooks.feature.helper)
.
References: