From: John Benediktsson Date: Tue, 6 Dec 2022 18:35:04 +0000 (-0800) Subject: editors.lapce: adding Lapce editor integration X-Git-Tag: 0.99~1021 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=6fd68c1c52ae4ec41ea1111d1e7c7ff918d92de2 editors.lapce: adding Lapce editor integration --- diff --git a/basis/editors/lapce/authors.txt b/basis/editors/lapce/authors.txt new file mode 100644 index 0000000000..e091bb8164 --- /dev/null +++ b/basis/editors/lapce/authors.txt @@ -0,0 +1 @@ +John Benediktsson diff --git a/basis/editors/lapce/lapce.factor b/basis/editors/lapce/lapce.factor new file mode 100644 index 0000000000..6777e7bfcb --- /dev/null +++ b/basis/editors/lapce/lapce.factor @@ -0,0 +1,27 @@ +USING: editors io.pathnames io.standard-paths kernel make +math.parser namespaces sequences system ; + +IN: editors.lapce + +SINGLETON: lapce + +editor-class [ lapce ] initialize + +HOOK: find-lapce-path os ( -- path ) + +M: object find-lapce-path f ; + +M: macosx find-lapce-path + "io.lapce" find-native-bundle [ + "Contents/MacOS/lapce" append-path + ] [ + f + ] if* ; + +: lapce-path ( -- path ) + \ lapce-path get [ + find-lapce-path [ "lapce" ?find-in-path ] unless* + ] unless* ; + +M: lapce editor-command + [ lapce-path , drop , ] { } make ; diff --git a/basis/editors/lapce/summary.txt b/basis/editors/lapce/summary.txt new file mode 100644 index 0000000000..bf4c1acf8d --- /dev/null +++ b/basis/editors/lapce/summary.txt @@ -0,0 +1 @@ +Lapce editor integration