This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-16
Channels
- # babashka (53)
- # beginners (61)
- # biff (2)
- # cherry (15)
- # cider (28)
- # clj-kondo (17)
- # clojure (57)
- # clojure-europe (27)
- # clojure-nl (13)
- # clojure-norway (6)
- # clojure-uk (4)
- # clojurescript (30)
- # core-async (2)
- # data-science (39)
- # datomic (16)
- # docker (34)
- # emacs (4)
- # events (1)
- # figwheel-main (9)
- # guix (5)
- # hiccdown (2)
- # honeysql (5)
- # hyperfiddle (5)
- # interceptors (1)
- # jobs (2)
- # joyride (5)
- # lsp (36)
- # midje (1)
- # minimallist (1)
- # nbb (21)
- # off-topic (45)
- # polylith (42)
- # rum (1)
- # shadow-cljs (24)
- # sql (1)
- # squint (62)
- # vrac (1)
- # xtdb (6)
Does CIDER provide js autocompletion with clj-suitable and shadow-cljs?
The README says no: https://github.com/clojure-emacs/clj-suitable#emacs-cider
But the issue referenced seems closed/fixed
*Edit*: After poking everywhere in the stack (cider, cider.piggyback, suitable.js_introspection, …) it’s now working. But I haven’t actually changed anything so I’m a bit worried it just randomly started working.
I see js_introspection
being loaded when I try to auto-complete
shadow-cljs: load JS cider/nrepl/inlined_deps/suitable/v0v4v1/suitable/js_introspection.cljs
I which I think I didn’t see beforeBut if I manually eval the functions inside cider.nrepl.inlined-deps.suitable.v0v4v1.suitable.js-introspection
completion works on emacs
@U7S5E44DB do you use clojure-lsp or solely CIDER?
ah okay. i'm trying to get this to work myself too, but i use lsp. going to try the eval trick you did
Loading the file via normal means doesn’t work, but I don’t know enough about load-file
to know if that’s expected:
(cljs.core/load-file "/Users/solf/.m2/repository/cider/cider-nrepl/0.28.5/cider-nrepl-0.28.5.jar:cider/nrepl/inlined_deps/suitable/v0v4v1/suitable/js_introspection.cljs")
FileNotFoundException: /Users/solf/.m2/repository/cider/cider-nrepl/0.28.5/cider-nrepl-0.28.5.jar:cider/nrepl/inlined_deps/suitable/v0v4v1/suitable/js_introspection.cljs (No such file or directory)
"/Users/solf/.m2/repository/cider/cider-nrepl/0.28.5/cider-nrepl-0.28.5.jar:cider/nrepl/inlined_deps/suitable/v0v4v1/suitable/js_introspection.cljs"
is not a file (note the jar:
bit)
if you find a trick feel free to mention it in the issue you linked.
Other than that most things related to suitable and shadow-cljs are not quite maintained 😞 someone who actively uses those would ideally step up(I contributed some things to Suitable, but I just don't use cljs at work so it's harder for me to maintain a motivation)
I noticed it’s in a jar, but then it’s a mistery how shadow-cljs managed to load it at some point ❓
shadow-cljs: load JS cider/nrepl/inlined_deps/suitable/v0v4v1/suitable/js_introspection.cljs
if you get stuck feel free to create an issue in suitable and cc/ the Shadow author (`@thheller`) i.e. if you solve this, just mention it in https://github.com/clojure-emacs/clj-suitable/issues/15; if you don't, create a new issue
I am trying to use
((clojure-mode . ((cider-clojure-cli-aliases . "-A:dev"))))
in .dir-locals.el to inject an alias for cider-jack-in. it doesn't work, but there is no error eitherThat looks right to me. Try restarting emacs to make sure it has taken effect. In spacemacs i can do SPC o R to rever the buffer and that seems to work (though it might have some cases where it doesn't).
err maybe you dont need the first "." with clojure-mode?
((nil . ((cider-clojure-cli-aliases . "-A:dev"))))
nil just means "match any mode" so if you only use it for clojure it will behave the samethis website is helpful, your dir-locals.el looks fine based on the examples and what i use as well... https://practical.li/spacemacs/clojure-projects/project-configuration.html
It actually did work after restarting emacs. I didn't realize .dir-locals.el wasn't reread every time i reran cider-jack-in. I had been restarting emacs so many times I just sort of assumed I had tried that already.
what does the . do in elisp btw?
https://www.gnu.org/software/emacs/manual/html_node/elisp/Dotted-Pair-Notation.html
I'm not sure why the list syntax isn't used
I very much don't know any elisp so apologies