File tree 4 files changed +20
-21
lines changed
src-shared/nextjournal/clojure_mode
4 files changed +20
-21
lines changed Original file line number Diff line number Diff line change 23
23
"@lezer/highlight" : " ^1.0.0" ,
24
24
"@lezer/lr" : " ^1.0.0" ,
25
25
"@nextjournal/lezer-clojure" : " 1.0.0" ,
26
- "squint-cljs" : " 0.7.105 " ,
26
+ "squint-cljs" : " 0.7.111 " ,
27
27
"w3c-keyname" : " ^2.2.4"
28
28
},
29
29
"comments" : {
Original file line number Diff line number Diff line change 112
112
(defn nav [dir]
113
113
(fn [state]
114
114
(u/update-ranges state
115
- (j/fn [^:js {:as range : keys [from to empty]}]
115
+ (j/fn [^:js {:keys [from to empty]}]
116
116
(if empty
117
117
{:cursor (nav-position state from dir)}
118
118
{:cursor (j/get (u/from-to from to) (case dir -1 :from 1 :to ))})))))
119
119
120
120
(defn nav-select [dir]
121
121
(fn [^js state]
122
122
(u/update-ranges state
123
- (j/fn [^:js {:as range : keys [from to empty]}]
123
+ (j/fn [^:js {:keys [from to empty]}]
124
124
(if empty
125
125
{:range (n/balanced-range state from (nav-position state from dir))}
126
126
{:range (j/let [^:js {:keys [from to]} (u/from-to from to)]
158
158
:changes (case direction
159
159
1
160
160
(let [edge (n/down-last parent)]
161
- [ {:from (-> target n/end)
162
- :insert (n/name edge)}
161
+ #js [#js {:from (-> target n/end)
162
+ :insert (n/name edge)}
163
163
(-> edge
164
164
n/from-to
165
165
(cond->
166
166
(not str?) (j/assoc! :insert " " )))])
167
167
-1
168
168
(let [^string edge (n/left-edge-with-prefix state parent)
169
169
start (n/start (n/with-prefix parent))]
170
- (prn :parent (n/string state parent) :str str?)
171
- [(cond-> {:from start
172
- :to (+ start (count edge))
173
- #_#_:insert " " }
174
- (not str?) (j/assoc! :insert " " ))
175
- {:from (n/start target)
176
- :insert edge}]))}))))))))
170
+ #js [(cond-> #js {:from start
171
+ :to (+ start (count edge))}
172
+ (not str?) (j/assoc! :insert " " ))
173
+ #js {:from (n/start target)
174
+ :insert edge}]))}))))))))
177
175
178
176
(defn barf [direction]
179
177
(fn [^js state]
Original file line number Diff line number Diff line change 4
4
[nextjournal.clojure-mode.extensions.eval-region :as eval-region]
5
5
[nextjournal.clojure-mode.test-utils :as test-utils]))
6
6
7
- (def extensions
8
- (.concat cm-clojure/default-extensions (eval-region/extension #js {})))
7
+ (comment
8
+ (def extensions
9
+ (.concat cm-clojure/default-extensions (eval-region/extension #js {})))
9
10
10
- (def apply-f (partial test-utils/apply-f extensions))
11
+ (def apply-f (partial test-utils/apply-f extensions))
11
12
12
- (js/console.log " a ;; hello\n (|)" )
13
- (js/console.log (apply-f (commands/slurp -1 ) " a ;; hello\n (|)" ))
13
+ (js/console.log " a ;; hello\n (|)" )
14
+ (js/console.log (apply-f (commands/slurp -1 ) " a ;; hello\n (|)" ) ))
14
15
Original file line number Diff line number Diff line change @@ -1176,10 +1176,10 @@ source-map@^0.5.6:
1176
1176
resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz"
1177
1177
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
1178
1178
1179
-
1180
- version "0.7.105 "
1181
- resolved "https://registry.yarnpkg.com/squint-cljs/-/squint-cljs-0.7.105 .tgz#848a588aaf5d19593b2d8b24bad026382435a4ff "
1182
- integrity sha512-YtnPewo1ZM5p9kaC6j/rNw4F/FzsLaAS61Vhikw6z6dRJvns/Y/3rwGcb8BCoD6Abx23/frlk0B4/xhedgCbUw ==
1179
+
1180
+ version "0.7.111 "
1181
+ resolved "https://registry.yarnpkg.com/squint-cljs/-/squint-cljs-0.7.111 .tgz#1441933ed7162d5590570875394c12b181db9427 "
1182
+ integrity sha512-BZSq3OxqdRN1xpIYBOWDI03tppaOLxtmapUDsS32ViKg2anu6fo44qh3qGAvXcapDwc1mkIS6A2y2GA+SgB2Rw ==
1183
1183
dependencies :
1184
1184
chokidar "^3.5.3"
1185
1185
You can’t perform that action at this time.
0 commit comments