Skip to content

Commit 78ac80e

Browse files
committed
Improve clojure snippets.
1 parent f72814a commit 78ac80e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

neosnippets/clojure.snip

+2-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ options head
4949

5050
snippet deftest
5151
options head
52-
(deftest ${1:a-test}
52+
(deftest ${1:a}-test
5353
(testing "${2:hello}"
5454
${0:TARGET:(is (= 0 1))}))
5555

@@ -81,8 +81,7 @@ options head
8181
snippet ns
8282
options head
8383
(ns ${1:`substitute(substitute(substitute(expand('%:p:r'), '.*/\(src\|test\)/', '', ''), '/', '.', 'g'), '_', '-', 'g')`}
84-
(:require [${2:clojure.string} :as ${3:s}]
85-
[clojure.pprint :refer [pprint]]))
84+
(:require `expand('%:r') =~ '_test$' ? '[clojure.test :refer :all]' : ''`${2:}))
8685

8786
snippet bench
8887
(let [bench-before (System/currentTimeMillis)]

0 commit comments

Comments
 (0)