This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-02
Channels
- # announcements (3)
- # aws (2)
- # babashka (60)
- # beginners (21)
- # cljs-dev (35)
- # cljsrn (3)
- # clojure (53)
- # clojure-android (2)
- # clojure-australia (3)
- # clojure-europe (45)
- # clojure-france (4)
- # clojure-nl (4)
- # clojure-uk (6)
- # clojurescript (33)
- # core-typed (1)
- # cursive (13)
- # datomic (6)
- # duct (1)
- # emacs (2)
- # fulcro (10)
- # introduce-yourself (3)
- # jobs (2)
- # jobs-discuss (13)
- # leiningen (1)
- # malli (19)
- # missionary (63)
- # music (1)
- # off-topic (21)
- # pathom (3)
- # polylith (18)
- # practicalli (12)
- # proletarian (1)
- # reagent (40)
- # reitit (23)
- # releases (1)
- # remote-jobs (1)
- # ring (14)
- # ring-swagger (1)
- # shadow-cljs (13)
- # sql (30)
- # testing (27)
- # tools-deps (31)
- # vim (10)
- # xtdb (4)
Anyone making their own clojure snippets? I have a few for some specific clojurescript code I kept repeating, and I just added one for add-libs+find-deps (which act more as a how-to, I keep forgetting their fully-qualified name)
;; snippet definitions, only KEY and TEMPLATE are actually mandatory.
;; (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV LOAD-FILE KEYBINDING UUID SAVE-FILE)
(yas-define-snippets
'clojure-mode
'(
(":d" "[:div $0]" "hiccup div")
(":p" "[:p $0]" "hiccup p")
("f" "#($1 % $0)" "f-shorthand")
("ctw" "{:class (tw $0)}" "class-tw")
("add-libs"
"
(require '[clojure.tools.deps.alpha.repl :refer [add-libs]]
'[find-deps.core :refer [query*]])
(:deps (query* $0\"metosin/malli\" \"clojure data.json\"
{:sources [:clojars :mvn]
:rank :fuzzy
:limit 1
:format :deps}))
(add-libs '{})"
"add-libs")
))