]> gitweb.factorcode.org Git - factor.git/commitdiff
editors.codium: Add codium support
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 16 Jun 2022 12:38:22 +0000 (07:38 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 16 Jun 2022 15:39:29 +0000 (10:39 -0500)
basis/editors/codium/authors.txt [new file with mode: 0644]
basis/editors/codium/codium.factor [new file with mode: 0644]

diff --git a/basis/editors/codium/authors.txt b/basis/editors/codium/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/editors/codium/codium.factor b/basis/editors/codium/codium.factor
new file mode 100644 (file)
index 0000000..d39eab7
--- /dev/null
@@ -0,0 +1,20 @@
+! Copyright (C) 2020 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: combinators editors editors.visual-studio-code
+io.pathnames io.standard-paths kernel namespaces system
+tools.which ;
+IN: editors.codium
+
+TUPLE: codium < visual-studio-code ;
+
+T{ codium } editor-class set-global
+
+M: codium find-visual-studio-code-path
+    os {
+        { linux [ "codium" which ] }
+        { macosx [
+            "com.visualstudio.code.oss" find-native-bundle
+            [ "Contents/MacOS/Electron" append-path ] [ f ] if* ] }
+        { windows [
+            { "Microsoft VS Codium" } "codium.cmd" find-in-applications ] }
+    } case ;