This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-17
Channels
- # announcements (2)
- # babashka (1)
- # beginners (54)
- # calva (19)
- # clj-kondo (7)
- # cljs-dev (6)
- # cljsrn (18)
- # clojure (11)
- # clojure-europe (19)
- # clojurescript (7)
- # conjure (3)
- # cursive (7)
- # datomic (4)
- # figwheel-main (2)
- # fulcro (4)
- # helix (5)
- # honeysql (24)
- # instaparse (2)
- # lsp (20)
- # malli (17)
- # off-topic (6)
- # pathom (2)
- # practicalli (2)
- # shadow-cljs (2)
- # tools-deps (34)
- # vim (7)
Is it possible to publish events to LSP/clj-kondo from a running application? my use case is that I know in my reply session that for example a Var has an invalid function schema defined: in-repl dev-toolong runs generative testing on background and could report "`var #'user/kikka has invalid function schema defined`". Would be great to be able to push that into LSP so it would end up in a warning-marker.
you talk about REPL session. I think it's more natural to inject something in that REPL session than into static analyzer tools
perhaps throwing an exception with some stacktrace will do the right thing automatically
and then clj-kondo will report it on the next lint (not sure in the case of clojure-lsp, it should refresh the config if one of the hook code has changed, which it should do anyway)
:thinking_face: the flow is:
1. you call mallli.dev/start!
in repl
2. you define function schemas
3. dev-toolong listens to registry changes and runs tests for that -> know if it's not right (var + error)
4. now, just prints that
ok in the case of 4, I think throwing an exception would probably be what triggers CIDER to render the error in the code
thanks, need to test. The checking is done in background on var watcher, so not sure where the exception would end up.
Sometimes people have setup an uncaught exception handler which makes it log somewhere
For Nix users: Latest clojure-lsp is available on nixpkgs unstable channel. FYI @huxley @suskeyhose
Thanks!