From 48bd065e19c341ffd853241a51a5faf9fb776de6 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 7 Aug 2022 08:02:42 -0700 Subject: [PATCH] editors.kate: adding Kate editor integration --- basis/editors/kate/authors.txt | 1 + basis/editors/kate/kate.factor | 31 +++++++++++++++++++++++++++++++ basis/editors/kate/summary.txt | 1 + 3 files changed, 33 insertions(+) create mode 100644 basis/editors/kate/authors.txt create mode 100644 basis/editors/kate/kate.factor create mode 100644 basis/editors/kate/summary.txt 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 -- 2.34.1