This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-30
Channels
- # babashka (18)
- # beginners (90)
- # calva (33)
- # clara (6)
- # cljfx (11)
- # cljs-dev (22)
- # cljsrn (9)
- # clojure (71)
- # clojure-australia (2)
- # clojure-czech (15)
- # clojure-europe (27)
- # clojure-germany (9)
- # clojure-nl (4)
- # clojure-serbia (3)
- # clojure-uk (10)
- # clojurescript (17)
- # conjure (12)
- # data-oriented-programming (2)
- # deps-new (6)
- # fulcro (29)
- # graphql (10)
- # hugsql (6)
- # jobs (1)
- # lsp (59)
- # malli (8)
- # off-topic (76)
- # pathom (15)
- # polylith (130)
- # re-frame (9)
- # reagent (15)
- # releases (4)
- # rewrite-clj (6)
- # ring (6)
- # rum (9)
- # shadow-cljs (116)
- # specter (5)
- # testing (7)
- # tools-deps (24)
- # vim (6)
- # xtdb (17)
quick vim-iced
question: I have a namespace that refers a function from another namespace. i want to move that function into this namespace. so i delete it from the other file, copy it into this file, remove the :refer
part of the ns
macro, and then use vim-iced to evaluate the function definition in the new file/namespace.
however, this throws the error CompilerException java.lang.IllegalStateException: private-card already refers to: #'game.core.card/private-card in namespace: game.core.diffs
i solved it by using the repl to run (ns-unmap *ns* 'private-card)
, and then reevaluate the function, but that feels messy
@UEENNMX0T IcedUndef
maybe useful ( <Leader>eu
by default)
https://liquidz.github.io/vim-iced/vim-iced.html#%3AIcedUndef
from clojure's point of view your options are the ns-unmap, or to delete and recreate the entire ns
(I might be wrongheaded about this, but to me the clojure specific solution (delete the var or ns) is simple enough that binding it to editor shortcuts is just obfuscation - it is almost as if it's imitating the hoops you need to jump through in a language that isn't dynamic and introspective)