This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-01
Channels
- # announcements (20)
- # babashka (3)
- # beginners (30)
- # calva (28)
- # cider (3)
- # circleci (4)
- # clerk (27)
- # clj-kondo (72)
- # cljdoc (15)
- # cljs-dev (1)
- # clojure (85)
- # clojure-europe (37)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-spec (7)
- # clojurescript (19)
- # clr (1)
- # conjure (11)
- # datahike (2)
- # datomic (11)
- # emacs (26)
- # events (4)
- # hoplon (35)
- # hyperfiddle (41)
- # jobs (7)
- # lsp (10)
- # nrepl (3)
- # off-topic (57)
- # portal (47)
- # practicalli (1)
- # rdf (3)
- # reitit (21)
- # releases (1)
- # testing (6)
- # tools-build (16)
- # wasm (1)
- # xtdb (16)
Is it the editor or clojure-lsp adding new require to the ns form when selecting option from autocomplete which is from non-required namespace, or in this case JS library?
When I select e.g. Typography
I get require to [material/Typography$default :as Typography]
though the correct one is ["@mui/material/Typography$default" :as Typography]
. And in this case the correct require already exists.
If that alias was already required elsewhere, yes, it could be clojure-lsp (clj-refactor has a similar feature)
Might be my nvim autocomplete setup that does this based on the information in the autocomplete results, but I don't know how it would know if the require is already present
And in this case I'm using the same alias in other files, so it could be that
Yeah, if I try rrefering to MUI component that isn't used elsewhere in the codebase I don't get a completion result
https://github.com/clojure-lsp/clojure-lsp/issues/1586 & https://github.com/clojure-lsp/clojure-lsp/issues/1587
I might continue later but until then the draft PR hopefully gives some idea where those JS lib requires are broken