This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-13
Channels
- # aleph (1)
- # announcements (14)
- # aws (8)
- # babashka (3)
- # beginners (49)
- # cider (6)
- # clara (7)
- # clj-kondo (58)
- # cljs-dev (17)
- # clojure (65)
- # clojure-dev (45)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (25)
- # clojure-norway (3)
- # clojure-uk (68)
- # clojurescript (10)
- # cursive (5)
- # datomic (12)
- # emacs (24)
- # fulcro (149)
- # hoplon (56)
- # kaocha (2)
- # luminus (18)
- # malli (7)
- # off-topic (12)
- # other-languages (82)
- # reagent (16)
- # reitit (7)
- # shadow-cljs (44)
- # spacemacs (4)
- # tools-deps (48)
- # xtdb (17)
https://github.com/borkdude/clj-kondo/blob/master/doc/config.md "lint a custom macro like a built in macro"
"def" would be a macro that creates and binds new vars. "let" would be a macro that binds symbols
@bfabry I don’t know that I see how that can work for that symbol then being recognized as available
which is somewhat similar to perhaps the way a defrecord Foo
makes fn’s map->Foo
& ->Foo
you can also use a local namespace config which excludes those symbols from being reported, but that would be almost the same amount of work as the declare
I’m a little surprised I guess since perhaps people may want to know if they are referring to bogus symbols in other ns’s though
there is an issue for it to make this work: https://github.com/borkdude/clj-kondo/issues/634 it's just not there yet and I'm not sure if we should ever do this. feel free to respond in that ticket with your opinion
given that clj-kondo might not have a complete picture of your "other-ns", it will probably lead to false positives
Yeah in my case with this sort of macro I think it’d be pretty bad for me on false positives now that I think of it.
could clj-kondo be used to configure code completion? i ask b/c what think i'll miss about Typescript/Static Typing isn't necessarily error detection but improve Intellisense
I believe @sogaiu has developed some tooling for emacs using the clj-kondo analysis output
the following instructions are for use with emacs: https://gist.github.com/sogaiu/6cb947b00ae13d00d4ae16ab7aaf97e4 but there is a piece that can generate either a TAGS (etags) or tags (ctags) file. i have used the ctags version successfully with vscode (but i needed to add an appropriate plugin for it). i've also used it with atom, but there the built-in "jump-to" functionality appears to be on the broken side.
i haven't tried to get the generated content to work with completion (on vscode and atom) -- i'm not sure what is involved.
the linked file is only navigation, correct? also, i'm using vscode so maybe I'd be more appropriate for me to continue discussion there? just thought that clj-kondo might be a more generic way of adding this feature since calva already uses it for linting
@alidcastano calva only bundles the clj-kondo vscode plugin, but doesn't really interact with it on a program level
the link is to a description that explains how to get navigation to work for emacs (though as a side effect, it may allow other things). there are both #calva-dev and #vscode if interested in discussing in other places 🙂
fwiw, i got a bare-bones vscode extension that uses the generated ctags file to provide completion. the main drawback currently is that this uses node-ctags which is a native node module.
Small "critical" update with regards to with-redefs
: https://github.com/borkdude/clj-kondo/releases/tag/v2020.01.13