Fork me on GitHub
#babashka
<
2023-07-24
>
elken13:07:51

Question from an acquaintance I don't know the answer to: > Is there a better way than to import a prelude in babashka scripts than this: >

(load-file (str (System/getenv "HOME") "/scripts/prelude.clj"))
> it's still not great because clojure-lsp doesnt know about the functions in that file

borkdude13:07:16

babashka supports BABASHKA_PRELOADS which is an environment variable that should contain a Clojure expression. This is very old. Also doesn't work with lsp. If you want to use lsp support, just use your prelude as a library

elken13:07:47

Yeah I made the assumption the env var would have the same issues, thanks for clarifying though 🙂