lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
2020-03-18T14:40:05.008700Z

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.

2020-03-18T18:03:08.009600Z

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.

2020-03-18T18:04:25.010500Z

for the record, a valid macro definition for my purposes looks like this:

{"macro-defs" {schema.core/defschema [:declaration :elements]}}

snoe 2020-03-18T18:45:30.013100Z

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.

snoe 2020-03-18T18:46:34.013500Z

the best place for examples is within the code base: https://github.com/snoe/clojure-lsp/blob/3502e8e1234642543c3900f78d02477e253dc0d4/src/clojure_lsp/parser.clj#L760

2020-03-18T18:50:02.014200Z

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.

👍 2
👏 1