I'm trying to make use of macro-defs to suppress a bunch of bad errors and warnings. for example if I schema.core/defschema
and create a new symbol for that schema, references to it are flagged with "Unknown symbol". fair enough, but the documentation for the macro-defs option is pretty sparse. I'd love an example, especially an example of a .lsp/config.edn
defining a few.
ah, I eventually figured this out: in a Yada Edge project there ends up being two .lsp
directories. they're now sharing the config.edn
via a symlink and that sorts it out.
for the record, a valid macro definition for my purposes looks like this:
{"macro-defs" {schema.core/defschema [:declaration :elements]}}
Yup, that's a common way to define "acts like clojure.core/def
" I'm also happy to take PRs to add common library macro-defs.
the best place for examples is within the code base: https://github.com/snoe/clojure-lsp/blob/3502e8e1234642543c3900f78d02477e253dc0d4/src/clojure_lsp/parser.clj#L760
I may well send PRs to add Midje things (if I can get them working; I see there's an open bug) and a few more parts of Schema.