From: John Benediktsson Date: Sun, 7 Aug 2022 15:02:42 +0000 (-0700) Subject: editors.kate: adding Kate editor integration X-Git-Tag: 0.99~1180 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=48bd065e19c341ffd853241a51a5faf9fb776de6 editors.kate: adding Kate editor integration --- diff --git a/basis/editors/kate/authors.txt b/basis/editors/kate/authors.txt new file mode 100644 index 0000000000..e091bb8164 --- /dev/null +++ b/basis/editors/kate/authors.txt @@ -0,0 +1 @@ +John Benediktsson diff --git a/basis/editors/kate/kate.factor b/basis/editors/kate/kate.factor new file mode 100644 index 0000000000..79e54d8e36 --- /dev/null +++ b/basis/editors/kate/kate.factor @@ -0,0 +1,31 @@ +USING: editors io.pathnames io.standard-paths kernel make +math.parser namespaces sequences system ; + +IN: editors.kate + +SINGLETON: kate + +editor-class [ kate ] initialize + +HOOK: find-kate-path os ( -- path ) + +M: object find-kate-path f ; + +M: windows find-kate-path + { "Kate" } "kate.exe" find-in-applications + [ "kate.exe" ] unless* ; + +M: macosx find-kate-path + "org.kde.Kate" find-native-bundle [ + "Contents/MacOS/kate" append-path + ] [ + f + ] if* ; + +: kate-path ( -- path ) + \ kate-path get [ + find-kate-path [ "kate" ?find-in-path ] unless* + ] unless* ; + +M: kate editor-command + [ kate-path , drop , ] { } make ; diff --git a/basis/editors/kate/summary.txt b/basis/editors/kate/summary.txt new file mode 100644 index 0000000000..ddc8d4a835 --- /dev/null +++ b/basis/editors/kate/summary.txt @@ -0,0 +1 @@ +Kate editor integration