Skip to content

Commit

Permalink
Fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mk committed Jun 21, 2023
1 parent 0bf559b commit cc90f90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/nextjournal/clerk/render/window.cljs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
(ns nextjournal.clerk.render.window
(:require ["@codemirror/view" :as cm-view :refer [keymap highlightActiveLine]]
(:require ["@codemirror/view" :as cm-view :refer [keymap]]
[applied-science.js-interop :as j]
[clojure.string :as str]
[nextjournal.clerk.render.code :as code]
[nextjournal.clerk.render.hooks :as hooks]
[nextjournal.clerk.sci-env.completions :as completions]
[nextjournal.clojure-mode.keymap :as clojure-mode.keymap]
[nextjournal.clojure-mode.extensions.eval-region :as eval-region]
[sci.core :as sci]
[sci.ctx-store]))
Expand Down Expand Up @@ -173,7 +174,7 @@
!results (hooks/use-state ())]
[:div.flex.flex-col.bg-gray-50
[:div.w-full.border-t.border-b.border-slate-300.shadow-inner.px-2.py-1.bg-slate-100
[code/editor !code-str {:extensions #js [(.of keymap nextjournal.clojure-mode.keymap/paredit)
[code/editor !code-str {:extensions #js [(.of keymap clojure-mode.keymap/paredit)
completions/completion-source
(sci-extension {:modifier "Alt"
:on-result #(swap! !results conj {:result %
Expand Down
2 changes: 1 addition & 1 deletion src/nextjournal/clerk/sci_env/completions.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns nextjournal.clerk.sci-env.completions
(:require ["@codemirror/autocomplete" :as cm-autocomplete :refer [CompletionContext]]
(:require ["@codemirror/autocomplete" :as cm-autocomplete]
["@codemirror/language" :as cm-lang]
[clojure.string :as str]
[goog.object :as gobject]
Expand Down
14 changes: 7 additions & 7 deletions src/nextjournal/clerk/window.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
(defn open!
([id]
(case id
::clerk/taps (open! id {:title "🚰 Taps" :css-class "p-0 relative overflow-auto"}
(v/with-viewers (v/add-viewers [tap/tap-viewer])
(v/with-viewer taps-viewer {:nextjournal/opts {:taps-view @!taps-view}}
@tap/!taps)))
::clerk/sci-repl (open! id {:title "SCI REPL" :css-class "p-0 relative overflow-auto"}
(v/with-viewer {:render-fn 'nextjournal.clerk.render.window/sci-repl
:transform-fn clerk/mark-presented} nil))))
:nextjournal.clerk/taps (open! id {:title "🚰 Taps" :css-class "p-0 relative overflow-auto"}
(v/with-viewers (v/add-viewers [tap/tap-viewer])
(v/with-viewer taps-viewer {:nextjournal/opts {:taps-view @!taps-view}}
@tap/!taps)))
:nextjournal.clerk/sci-repl (open! id {:title "SCI REPL" :css-class "p-0 relative overflow-auto"}
(v/with-viewer {:render-fn 'nextjournal.clerk.render.window/sci-repl
:transform-fn v/mark-presented} nil))))
([id content] (open! id {} content))
([id opts content]
;; TODO: consider calling v/transform-result
Expand Down

0 comments on commit cc90f90

Please sign in to comment.