Created
June 18, 2022 09:14
-
-
Save armed/b5e8fd111b080587fd6a36f103eb333b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clear-repl | |
(:require ["vscode" :as vscode] | |
["fs" :as fs] | |
[joyride.core :as joyride])) | |
(defn main [] | |
(doseq [e vscode/window.visibleTextEditors] | |
(let [f-name (.. e -document -fileName)] | |
(when (.endsWith f-name "output.calva-repl") | |
(fs.writeFileSync f-name "", "utf8"))))) | |
(when (= (joyride/invoked-script) joyride/*file*) | |
(main)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment