From 6d9f253d8c788c0c6ce6274aef8733c767d5dd1d Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Wed, 10 Apr 2024 22:45:24 +0100 Subject: [PATCH] Remoe all the v3 modules --- Makefile | 65 - build.el | 95 -- config/fg42.user.el | 90 -- docs/images/.keep | 0 docs/site/assets/js/highlight.pack.js | 1178 ----------------- docs/site/assets/styles/arta.css | 73 - docs/site/assets/styles/dark.css | 800 ----------- docs/site/assets/styles/main.css | 40 - docs/site/config.org | 10 - docs/site/pages/code-of-conduct.org | 65 - docs/site/pages/contributors.org | 22 - docs/site/pages/how-to-contribute.org | 59 - docs/site/templates/blog.html | 52 - docs/site/templates/categories.org | 7 - docs/site/templates/cube.org | 6 - docs/site/templates/cubes.org | 13 - docs/site/templates/footer.html | 1 - docs/site/templates/header.html | 1 - docs/site/templates/index.org | 21 - docs/site/templates/links_template.org | 7 - docs/site/templates/page-preamble.html | 1 - docs/site/templates/post-preamble.html | 2 - docs/site/templates/tags.html | 3 - docs/site/templates/tags.org | 8 - fg42.app | 4 - lisp/fg42/build/core.el | 198 --- lisp/fg42/build/docs.el | 434 ------ lisp/fg42/build/ox-template.el | 163 --- lisp/fg42/build/rss.el | 94 -- lisp/fg42/build/utils.el | 110 -- lisp/fg42/cube.el | 234 ---- lisp/fg42/cubes/agda.el | 42 - lisp/fg42/cubes/all.el | 46 - lisp/fg42/cubes/autocompletion.el | 100 -- lisp/fg42/cubes/bookmark.el | 101 -- lisp/fg42/cubes/clojure.el | 51 - lisp/fg42/cubes/clojure/core.el | 49 - lisp/fg42/cubes/cpp.el | 70 - lisp/fg42/cubes/editor.el | 388 ------ lisp/fg42/cubes/eldoc.el | 45 - lisp/fg42/cubes/elisp.el | 44 - lisp/fg42/cubes/elisp/core.el | 40 - lisp/fg42/cubes/fg42.el | 85 -- lisp/fg42/cubes/git.el | 70 - lisp/fg42/cubes/godot3d.el | 40 - lisp/fg42/cubes/golang.el | 51 - lisp/fg42/cubes/golang/core.el | 64 - lisp/fg42/cubes/graph.el | 59 - lisp/fg42/cubes/groovy.el | 39 - lisp/fg42/cubes/haml.el | 40 - lisp/fg42/cubes/iconspack.el | 41 - lisp/fg42/cubes/irc.el | 41 - lisp/fg42/cubes/irc/core.el | 46 - lisp/fg42/cubes/java.el | 69 - lisp/fg42/cubes/julia.el | 50 - lisp/fg42/cubes/keyboard.el | 28 - lisp/fg42/cubes/langtool.el | 52 - lisp/fg42/cubes/mastodon.el | 61 - lisp/fg42/cubes/meissa.el | 80 -- lisp/fg42/cubes/meson.el | 42 - lisp/fg42/cubes/modeline.el | 158 --- lisp/fg42/cubes/modeline/statusbar-default.el | 147 -- lisp/fg42/cubes/nix.el | 43 - lisp/fg42/cubes/noether.el | 46 - lisp/fg42/cubes/notifications.el | 42 - lisp/fg42/cubes/org.el | 231 ---- lisp/fg42/cubes/project.el | 55 - lisp/fg42/cubes/proof.el | 49 - lisp/fg42/cubes/python.el | 142 -- lisp/fg42/cubes/region-expansion.el | 36 - lisp/fg42/cubes/rigel.el | 58 - lisp/fg42/cubes/rigel/core.el | 105 -- lisp/fg42/cubes/rust.el | 64 - lisp/fg42/cubes/scheme.el | 50 - lisp/fg42/cubes/snippets.el | 52 - lisp/fg42/cubes/terminal.el | 41 - lisp/fg42/cubes/terraform.el | 57 - lisp/fg42/cubes/themes.el | 71 - lisp/fg42/cubes/verilog.el | 67 - lisp/fg42/cubes/wm.el | 50 - lisp/fg42/cubes/wm/core.el | 161 --- lisp/fg42/cubes/zig.el | 43 - 82 files changed, 7558 deletions(-) delete mode 100644 Makefile delete mode 100755 build.el delete mode 100644 config/fg42.user.el delete mode 100644 docs/images/.keep delete mode 100644 docs/site/assets/js/highlight.pack.js delete mode 100644 docs/site/assets/styles/arta.css delete mode 100644 docs/site/assets/styles/dark.css delete mode 100644 docs/site/assets/styles/main.css delete mode 100644 docs/site/config.org delete mode 100644 docs/site/pages/code-of-conduct.org delete mode 100644 docs/site/pages/contributors.org delete mode 100644 docs/site/pages/how-to-contribute.org delete mode 100644 docs/site/templates/blog.html delete mode 100644 docs/site/templates/categories.org delete mode 100644 docs/site/templates/cube.org delete mode 100644 docs/site/templates/cubes.org delete mode 100644 docs/site/templates/footer.html delete mode 100644 docs/site/templates/header.html delete mode 100644 docs/site/templates/index.org delete mode 100644 docs/site/templates/links_template.org delete mode 100644 docs/site/templates/page-preamble.html delete mode 100644 docs/site/templates/post-preamble.html delete mode 100644 docs/site/templates/tags.html delete mode 100644 docs/site/templates/tags.org delete mode 100755 fg42.app delete mode 100644 lisp/fg42/build/core.el delete mode 100644 lisp/fg42/build/docs.el delete mode 100644 lisp/fg42/build/ox-template.el delete mode 100644 lisp/fg42/build/rss.el delete mode 100644 lisp/fg42/build/utils.el delete mode 100644 lisp/fg42/cube.el delete mode 100644 lisp/fg42/cubes/agda.el delete mode 100644 lisp/fg42/cubes/all.el delete mode 100644 lisp/fg42/cubes/autocompletion.el delete mode 100644 lisp/fg42/cubes/bookmark.el delete mode 100644 lisp/fg42/cubes/clojure.el delete mode 100644 lisp/fg42/cubes/clojure/core.el delete mode 100644 lisp/fg42/cubes/cpp.el delete mode 100644 lisp/fg42/cubes/editor.el delete mode 100644 lisp/fg42/cubes/eldoc.el delete mode 100644 lisp/fg42/cubes/elisp.el delete mode 100644 lisp/fg42/cubes/elisp/core.el delete mode 100644 lisp/fg42/cubes/fg42.el delete mode 100644 lisp/fg42/cubes/git.el delete mode 100644 lisp/fg42/cubes/godot3d.el delete mode 100644 lisp/fg42/cubes/golang.el delete mode 100644 lisp/fg42/cubes/golang/core.el delete mode 100644 lisp/fg42/cubes/graph.el delete mode 100644 lisp/fg42/cubes/groovy.el delete mode 100644 lisp/fg42/cubes/haml.el delete mode 100644 lisp/fg42/cubes/iconspack.el delete mode 100644 lisp/fg42/cubes/irc.el delete mode 100644 lisp/fg42/cubes/irc/core.el delete mode 100644 lisp/fg42/cubes/java.el delete mode 100644 lisp/fg42/cubes/julia.el delete mode 100644 lisp/fg42/cubes/keyboard.el delete mode 100644 lisp/fg42/cubes/langtool.el delete mode 100644 lisp/fg42/cubes/mastodon.el delete mode 100644 lisp/fg42/cubes/meissa.el delete mode 100644 lisp/fg42/cubes/meson.el delete mode 100644 lisp/fg42/cubes/modeline.el delete mode 100644 lisp/fg42/cubes/modeline/statusbar-default.el delete mode 100644 lisp/fg42/cubes/nix.el delete mode 100644 lisp/fg42/cubes/noether.el delete mode 100644 lisp/fg42/cubes/notifications.el delete mode 100644 lisp/fg42/cubes/org.el delete mode 100644 lisp/fg42/cubes/project.el delete mode 100644 lisp/fg42/cubes/proof.el delete mode 100644 lisp/fg42/cubes/python.el delete mode 100644 lisp/fg42/cubes/region-expansion.el delete mode 100644 lisp/fg42/cubes/rigel.el delete mode 100644 lisp/fg42/cubes/rigel/core.el delete mode 100644 lisp/fg42/cubes/rust.el delete mode 100644 lisp/fg42/cubes/scheme.el delete mode 100644 lisp/fg42/cubes/snippets.el delete mode 100644 lisp/fg42/cubes/terminal.el delete mode 100644 lisp/fg42/cubes/terraform.el delete mode 100644 lisp/fg42/cubes/themes.el delete mode 100644 lisp/fg42/cubes/verilog.el delete mode 100644 lisp/fg42/cubes/wm.el delete mode 100644 lisp/fg42/cubes/wm/core.el delete mode 100644 lisp/fg42/cubes/zig.el diff --git a/Makefile b/Makefile deleted file mode 100644 index c02d2b1..0000000 --- a/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# Fg42 - Emacs Editor for advance users -# -# Copyright (c) 2010-2024 Sameer Rahmani -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 2. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -my_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) - -.PHONY: update -update: - @git pull origin master - -.PHONY: install -install: - /bin/sh $(my_dir)/scripts/install_files.sh runners - @echo " " - @echo "------------------------------------------------------------------------------------" - @echo "Make sure to install external dependencies of FG42. For more info checkout README.org" - @echo "Enjoy the bless of GNU/Emacs and FG42 :)" - -.PHONY: install-fonts -install-fonts: - /bin/sh $(my_dir)/scripts/install_files.sh fonts - -.PHONY: install-extras -install-extras: - /bin/sh $(my_dir)/scripts/install_files.sh extras - - -.PHONY: doc-clean -clean: - @rm -rf $(shell find `pwd` -iname "*~") - @rm -rf build - -.PHONY: dev-docs -dev-docs: clean - ./build.el docs :d - -.PHONY: docs -docs: - ./build.el docs - -serve: build - npx http-server ./build/site-build/ - -.PHONY: deploy-docs -deploy-docs: clean docs - rsync -vlcr --delete-after ./build/site-build/* core.lxsameer.com:/home/www/public/fg42/ - -.PHONY: dummy-x -dummy-x: - Xephyr -br -ac -noreset -screen 800x600 :1 -.PHONY: test-wm -test-wm: - DISPLAY=:1 FG42_WM=true FG42_V3=true ./fg42-wm diff --git a/build.el b/build.el deleted file mode 100755 index aea9c0c..0000000 --- a/build.el +++ /dev/null @@ -1,95 +0,0 @@ -:;exec `echo $EMACS_PATH` --no-site-file --no-site-lisp --batch -L ./ -l "$0" -f main "$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)" "$@" -;;; Buid --- The builder for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with thnis program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: - -(setq debug-on-error t) - -(defconst fg42/CORE_DIR (concat (getenv "HOME") "/.fg42/core")) -(add-to-list 'load-path fg42/CORE_DIR) - -(setenv "FG42_HOME" (concat (getenv "HOME") "/.fg42/")) -(setq user-emacs-directory (concat (getenv "FG42_HOME") "emacs.d")) - -(require 'fg42/build/core) -(require 'fg42/build/utils) - -(defvar FG42-VERSION "3.0.0-snapshot" - "The version number of the current build of FG42.") - -(defconst build/usage " -Usage: - -build.el [PARAMS] COMMAND [...] - -COMMANDS: - clean [DIRS] - Clean up the given list of directories (default: \"code\" \"fbt\"). - docs - Build the documents and convert them to HTML - -PARAMS: - :d - Turns on the debug mode. - :e expr - Run the given `expr' before any operation. -") - - -(defun print-help (command) - "Print out a usage instructions and print out the invalid msg for COMMAND." - (when command - (warn "I don't know about '%s' command.\n" command)) - (message build/usage)) - - -(defproject FG42 - project-root (nth 2 command-line-args-left) - docs-actions '(fg42/build-prepare-docs)) - - -(command-> command args - ((string= command "docs") - (do-command - (require 'fg42/build/docs) - (fg42/build-docs build-dir))) - - ;; TODO: create a new command to update the license headers for - ;; the copyright years. Hint: just run: - ;; sed 's/2010-2024/2010-2024/' -i `git ls-tree -r master --name-only' - - ((string= command "compile") - (do-command - (native-compile-async fg42/CORE_DIR 'recursively) - (native-compile-async "~/.fg42.el") - - (print "Compiling FG42 files ...") - (while (or comp-files-queue - (> (comp-async-runnings) 0)) - (print ".") - (sleep-for 1)) - - (message "Done")))) - -(provide 'build) -;;; build.el ends here diff --git a/config/fg42.user.el b/config/fg42.user.el deleted file mode 100644 index 9b444cf..0000000 --- a/config/fg42.user.el +++ /dev/null @@ -1,90 +0,0 @@ -;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani -;; -;; Author: Sameer Rahmani -;; URL: https://gitlab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: - -;; Uncomment this line for debugging -;; (setq debug-on-error t) - -(require 'fg42/flags) -(require 'cubes/fg42) - -(defvar global-font-size 12) - -(use-flags - (fg42/merge-with-default-flags - wm - fg42/region-expansion-cube)) - - -;TODO: Move this block to a macro or something =========== -(when-wm - (setq global-font-size 8) - (custom-set-faces - '(mini-modeline-mode-line - ((((background light)) - :background "#aa0000" :height 0.1 :box nil) - (t - :background "#6272a4" :height 0.1 :box nil)))) - (fg42/wm-cube :number-of-workspaces 9) - - ;; Uncomment the following section if need a easy way to control the resolution - ;; Change the resolution and monitors to your need - ;; (require 'fg42/x) - ;; (setq fg42/monitors - ;; '(:hdmi-only - ;; ("--output HDMI-1 --primary" - ;; "--output eDP-1 --off") - ;; :hdmi-main - ;; ("--output HDMI-1 --primary" - ;; "--output eDP-1 --mode 1920x1080 --left-of HDMI-1") - ;; :edp-only - ;; ("--output eDP-1 --mode 1920x1080" - ;; "--output HDMI-1 --off"))) - ;; (comment - ;; ;; how to run it via elisp or just `M-x monitor' - ;; (monitor :hdmi-only)) - - - (use-flags - (fg42/merge-with-default-flags - wm - -python - -golang - rcirc - vterm - -company - -projectile - -lsp - -flycheck - fg42/region-expansion-cube))) - - -(fg42/editor - :fg42/cursor-cube '(:type 'bar :color "#bd93f9") - :fg42/font-cube '(:font-name "Fira code" :font-size global-font-size)) - -(when (file-exists-p "~/.fg42.user.el") - (load "~/.fg42.user.el")) - -(provide '.fg42) -;;; .fg42.el ends here diff --git a/docs/images/.keep b/docs/images/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/docs/site/assets/js/highlight.pack.js b/docs/site/assets/js/highlight.pack.js deleted file mode 100644 index 1c62da8..0000000 --- a/docs/site/assets/js/highlight.pack.js +++ /dev/null @@ -1,1178 +0,0 @@ -/* - Highlight.js 10.5.0 (af20048d) - License: BSD-3-Clause - Copyright (c) 2006-2020, Ivan Sagalaev -*/ -var hljs=function(){"use strict";function e(t){ -return t instanceof Map?t.clear=t.delete=t.set=()=>{ -throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{ -throw Error("set is read-only") -}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{var s=t[n] -;"object"!=typeof s||Object.isFrozen(s)||e(s)})),t}var t=e,n=e;t.default=n -;class s{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data} -ignoreMatch(){this.ignore=!0}}function r(e){ -return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") -}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] -;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const i=e=>!!e.kind -;class o{constructor(e,t){ -this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ -this.buffer+=r(e)}openNode(e){if(!i(e))return;let t=e.kind -;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){ -i(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ -this.buffer+=``}}class l{constructor(){this.rootNode={ -children:[]},this.stack=[this.rootNode]}get top(){ -return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ -this.top.children.push(e)}openNode(e){const t={kind:e,children:[]} -;this.add(t),this.stack.push(t)}closeNode(){ -if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ -for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} -walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ -return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), -t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ -"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ -l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e} -addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} -addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root -;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){ -return new o(this,this.options).value()}finalize(){return!0}}function u(e){ -return e?"string"==typeof e?e:e.source:null} -const g="[a-zA-Z]\\w*",d="[a-zA-Z_]\\w*",h="\\b\\d+(\\.\\d+)?",f="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",p="\\b(0b[01]+)",m={ -begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'", -illegal:"\\n",contains:[m]},x={className:"string",begin:'"',end:'"', -illegal:"\\n",contains:[m]},E={ -begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ -},v=(e,t,n={})=>{const s=a({className:"comment",begin:e,end:t,contains:[]},n) -;return s.contains.push(E),s.contains.push({className:"doctag", -begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),s -},N=v("//","$"),w=v("/\\*","\\*/"),R=v("#","$");var y=Object.freeze({ -__proto__:null,IDENT_RE:g,UNDERSCORE_IDENT_RE:d,NUMBER_RE:h,C_NUMBER_RE:f, -BINARY_NUMBER_RE:p, -RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", -SHEBANG:(e={})=>{const t=/^#![ ]*\// -;return e.binary&&(e.begin=((...e)=>e.map((e=>u(e))).join(""))(t,/.*\b/,e.binary,/\b.*/)), -a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{ -0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:m,APOS_STRING_MODE:b, -QUOTE_STRING_MODE:x,PHRASAL_WORDS_MODE:E,COMMENT:v,C_LINE_COMMENT_MODE:N, -C_BLOCK_COMMENT_MODE:w,HASH_COMMENT_MODE:R,NUMBER_MODE:{className:"number", -begin:h,relevance:0},C_NUMBER_MODE:{className:"number",begin:f,relevance:0}, -BINARY_NUMBER_MODE:{className:"number",begin:p,relevance:0},CSS_NUMBER_MODE:{ -className:"number", -begin:h+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", -relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp", -begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[m,{begin:/\[/,end:/\]/, -relevance:0,contains:[m]}]}]},TITLE_MODE:{className:"title",begin:g,relevance:0 -},UNDERSCORE_TITLE_MODE:{className:"title",begin:d,relevance:0},METHOD_GUARD:{ -begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ -"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ -t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function _(e,t){ -"."===e.input[e.index-1]&&t.ignoreMatch()}function k(e,t){ -t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", -e.__beforeBegin=_,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords) -}function M(e,t){ -Array.isArray(e.illegal)&&(e.illegal=((...e)=>"("+e.map((e=>u(e))).join("|")+")")(...e.illegal)) -}function O(e,t){if(e.match){ -if(e.begin||e.end)throw Error("begin & end are not supported with match") -;e.begin=e.match,delete e.match}}function A(e,t){ -void 0===e.relevance&&(e.relevance=1)} -const L=["of","and","for","in","not","or","if","then","parent","list","value"] -;function B(e,t){return t?Number(t):(e=>L.includes(e.toLowerCase()))(e)?0:1} -function I(e,{plugins:t}){function n(t,n){ -return RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class s{ -constructor(){ -this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} -addRule(e,t){ -t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), -this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){ -0===this.regexes.length&&(this.exec=()=>null) -;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(((e,t="|")=>{ -const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let s=0,r="" -;for(let a=0;a0&&(r+=t),r+="(";o.length>0;){const e=n.exec(o);if(null==e){r+=o;break} -r+=o.substring(0,e.index), -o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+i):(r+=e[0], -"("===e[0]&&s++)}r+=")"}return r})(e),!0),this.lastIndex=0}exec(e){ -this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e) -;if(!t)return null -;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),s=this.matchIndexes[n] -;return t.splice(0,n),Object.assign(t,s)}}class r{constructor(){ -this.rules=[],this.multiRegexes=[], -this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ -if(this.multiRegexes[e])return this.multiRegexes[e];const t=new s -;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), -t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ -return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ -this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ -const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex -;let n=t.exec(e) -;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ -const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} -return n&&(this.regexIndex+=n.position+1, -this.regexIndex===this.count&&this.considerAll()),n}} -if(e.compilerExtensions||(e.compilerExtensions=[]), -e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") -;return e.classNameAliases=a(e.classNameAliases||{}),function t(s,i){const o=s -;if(s.compiled)return o -;[O].forEach((e=>e(s,i))),e.compilerExtensions.forEach((e=>e(s,i))), -s.__beforeBegin=null,[k,M,A].forEach((e=>e(s,i))),s.compiled=!0;let l=null -;if("object"==typeof s.keywords&&(l=s.keywords.$pattern, -delete s.keywords.$pattern),s.keywords&&(s.keywords=((e,t)=>{const n={} -;return"string"==typeof e?s("keyword",e):Object.keys(e).forEach((t=>{s(t,e[t]) -})),n;function s(e,s){t&&(s=s.toLowerCase()),s.split(" ").forEach((t=>{ -const s=t.split("|");n[s[0]]=[e,B(s[0],s[1])]}))} -})(s.keywords,e.case_insensitive)), -s.lexemes&&l)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ") -;return l=l||s.lexemes||/\w+/, -o.keywordPatternRe=n(l,!0),i&&(s.begin||(s.begin=/\B|\b/), -o.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin), -s.end||s.endsWithParent||(s.end=/\B|\b/), -s.end&&(o.endRe=n(s.end)),o.terminatorEnd=u(s.end)||"", -s.endsWithParent&&i.terminatorEnd&&(o.terminatorEnd+=(s.end?"|":"")+i.terminatorEnd)), -s.illegal&&(o.illegalRe=n(s.illegal)), -s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>a(e,{ -variants:null},t)))),e.cachedVariants?e.cachedVariants:T(e)?a(e,{ -starts:e.starts?a(e.starts):null -}):Object.isFrozen(e)?a(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{t(e,o) -})),s.starts&&t(s.starts,i),o.matcher=(e=>{const t=new r -;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" -}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" -}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(o),o}(e)}function T(e){ -return!!e&&(e.endsWithParent||T(e.starts))}function j(e){const t={ -props:["language","code","autodetect"],data:()=>({detectedLanguage:"", -unknownLanguage:!1}),computed:{className(){ -return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){ -if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`), -this.unknownLanguage=!0,r(this.code);let t={} -;return this.autoDetect?(t=e.highlightAuto(this.code), -this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals), -this.detectedLanguage=this.language),t.value},autoDetect(){ -return!(this.language&&(e=this.autodetect,!e&&""!==e));var e}, -ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{ -class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{ -Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const S={ -"after:highlightBlock":({block:e,result:t,text:n})=>{const s=D(e) -;if(!s.length)return;const a=document.createElement("div") -;a.innerHTML=t.value,t.value=((e,t,n)=>{let s=0,a="";const i=[];function o(){ -return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function c(e){ -a+=""}function u(e){("start"===e.event?l:c)(e.node)} -for(;e.length||t.length;){let t=o() -;if(a+=r(n.substring(s,t[0].offset)),s=t[0].offset,t===e){i.reverse().forEach(c) -;do{u(t.splice(0,1)[0]),t=o()}while(t===e&&t.length&&t[0].offset===s) -;i.reverse().forEach(l) -}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])} -return a+r(n.substr(s))})(s,D(a),n)}};function P(e){ -return e.nodeName.toLowerCase()}function D(e){const t=[];return function e(n,s){ -for(let r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(t.push({ -event:"start",offset:s,node:r}),s=e(r,s),P(r).match(/br|hr|img|input/)||t.push({ -event:"stop",offset:s,node:r}));return s}(e,0),t}const C=e=>{console.error(e) -},H=(e,...t)=>{console.log("WARN: "+e,...t)},$=(e,t)=>{ -console.log(`Deprecated as of ${e}. ${t}`)},U=r,z=a,K=Symbol("nomatch") -;return(e=>{const n=Object.create(null),r=Object.create(null),a=[];let i=!0 -;const o=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",u={ -disableAutodetect:!0,name:"Plain text",contains:[]};let g={ -noHighlightRe:/^(no-?highlight)$/i, -languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", -tabReplace:null,useBR:!1,languages:null,__emitter:c};function d(e){ -return g.noHighlightRe.test(e)}function h(e,t,n,s){const r={code:t,language:e} -;_("before:highlight",r);const a=r.result?r.result:f(r.language,r.code,n,s) -;return a.code=r.code,_("after:highlight",a),a}function f(e,t,r,o){const c=t -;function u(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0] -;return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]} -function d(){null!=_.subLanguage?(()=>{if(""===O)return;let e=null -;if("string"==typeof _.subLanguage){ -if(!n[_.subLanguage])return void M.addText(O) -;e=f(_.subLanguage,O,!0,k[_.subLanguage]),k[_.subLanguage]=e.top -}else e=p(O,_.subLanguage.length?_.subLanguage:null) -;_.relevance>0&&(A+=e.relevance),M.addSublanguage(e.emitter,e.language) -})():(()=>{if(!_.keywords)return void M.addText(O);let e=0 -;_.keywordPatternRe.lastIndex=0;let t=_.keywordPatternRe.exec(O),n="";for(;t;){ -n+=O.substring(e,t.index);const s=u(_,t);if(s){const[e,r]=s -;M.addText(n),n="",A+=r;const a=w.classNameAliases[e]||e;M.addKeyword(t[0],a) -}else n+=t[0];e=_.keywordPatternRe.lastIndex,t=_.keywordPatternRe.exec(O)} -n+=O.substr(e),M.addText(n)})(),O=""}function h(e){ -return e.className&&M.openNode(w.classNameAliases[e.className]||e.className), -_=Object.create(e,{parent:{value:_}}),_}function m(e,t,n){let r=((e,t)=>{ -const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(r){if(e["on:end"]){ -const n=new s(e);e["on:end"](t,n),n.ignore&&(r=!1)}if(r){ -for(;e.endsParent&&e.parent;)e=e.parent;return e}} -if(e.endsWithParent)return m(e.parent,t,n)}function b(e){ -return 0===_.matcher.regexIndex?(O+=e[0],1):(T=!0,0)}function x(e){ -const t=e[0],n=c.substr(e.index),s=m(_,e,n);if(!s)return K;const r=_ -;r.skip?O+=t:(r.returnEnd||r.excludeEnd||(O+=t),d(),r.excludeEnd&&(O=t));do{ -_.className&&M.closeNode(),_.skip||_.subLanguage||(A+=_.relevance),_=_.parent -}while(_!==s.parent) -;return s.starts&&(s.endSameAsBegin&&(s.starts.endRe=s.endRe), -h(s.starts)),r.returnEnd?0:t.length}let E={};function v(t,n){const a=n&&n[0] -;if(O+=t,null==a)return d(),0 -;if("begin"===E.type&&"end"===n.type&&E.index===n.index&&""===a){ -if(O+=c.slice(n.index,n.index+1),!i){const t=Error("0 width match regex") -;throw t.languageName=e,t.badRule=E.rule,t}return 1} -if(E=n,"begin"===n.type)return function(e){ -const t=e[0],n=e.rule,r=new s(n),a=[n.__beforeBegin,n["on:begin"]] -;for(const n of a)if(n&&(n(e,r),r.ignore))return b(t) -;return n&&n.endSameAsBegin&&(n.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")), -n.skip?O+=t:(n.excludeBegin&&(O+=t), -d(),n.returnBegin||n.excludeBegin||(O=t)),h(n),n.returnBegin?0:t.length}(n) -;if("illegal"===n.type&&!r){ -const e=Error('Illegal lexeme "'+a+'" for mode "'+(_.className||"")+'"') -;throw e.mode=_,e}if("end"===n.type){const e=x(n);if(e!==K)return e} -if("illegal"===n.type&&""===a)return 1 -;if(B>1e5&&B>3*n.index)throw Error("potential infinite loop, way more iterations than matches") -;return O+=a,a.length}const w=N(e) -;if(!w)throw C(l.replace("{}",e)),Error('Unknown language: "'+e+'"') -;const R=I(w,{plugins:a});let y="",_=o||R;const k={},M=new g.__emitter(g);(()=>{ -const e=[];for(let t=_;t!==w;t=t.parent)t.className&&e.unshift(t.className) -;e.forEach((e=>M.openNode(e)))})();let O="",A=0,L=0,B=0,T=!1;try{ -for(_.matcher.considerAll();;){ -B++,T?T=!1:_.matcher.considerAll(),_.matcher.lastIndex=L -;const e=_.matcher.exec(c);if(!e)break;const t=v(c.substring(L,e.index),e) -;L=e.index+t}return v(c.substr(L)),M.closeAllNodes(),M.finalize(),y=M.toHTML(),{ -relevance:A,value:y,language:e,illegal:!1,emitter:M,top:_}}catch(t){ -if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{ -msg:t.message,context:c.slice(L-100,L+100),mode:t.mode},sofar:y,relevance:0, -value:U(c),emitter:M};if(i)return{illegal:!1,relevance:0,value:U(c),emitter:M, -language:e,top:_,errorRaised:t};throw t}}function p(e,t){ -t=t||g.languages||Object.keys(n);const s=(e=>{const t={relevance:0, -emitter:new g.__emitter(g),value:U(e),illegal:!1,top:u} -;return t.emitter.addText(e),t})(e),r=t.filter(N).filter(R).map((t=>f(t,e,!1))) -;r.unshift(s);const a=r.sort(((e,t)=>{ -if(e.relevance!==t.relevance)return t.relevance-e.relevance -;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1 -;if(N(t.language).supersetOf===e.language)return-1}return 0})),[i,o]=a,l=i -;return l.second_best=o,l}const m={"before:highlightBlock":({block:e})=>{ -g.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")) -},"after:highlightBlock":({result:e})=>{ -g.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},b=/^(<[^>]+>|\t)+/gm,x={ -"after:highlightBlock":({result:e})=>{ -g.tabReplace&&(e.value=e.value.replace(b,(e=>e.replace(/\t/g,g.tabReplace))))}} -;function E(e){let t=null;const n=(e=>{let t=e.className+" " -;t+=e.parentNode?e.parentNode.className:"";const n=g.languageDetectRe.exec(t) -;if(n){const t=N(n[1]) -;return t||(H(l.replace("{}",n[1])),H("Falling back to no-highlight mode for this block.",e)), -t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>d(e)||N(e)))})(e) -;if(d(n))return;_("before:highlightBlock",{block:e,language:n}),t=e -;const s=t.textContent,a=n?h(n,s,!0):p(s);_("after:highlightBlock",{block:e, -result:a,text:s}),e.innerHTML=a.value,((e,t,n)=>{const s=t?r[t]:n -;e.classList.add("hljs"),s&&e.classList.add(s)})(e,n,a.language),e.result={ -language:a.language,re:a.relevance,relavance:a.relevance -},a.second_best&&(e.second_best={language:a.second_best.language, -re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{ -v.called||(v.called=!0,document.querySelectorAll("pre code").forEach(E))} -;function N(e){return e=(e||"").toLowerCase(),n[e]||n[r[e]]} -function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e]=t -}))}function R(e){const t=N(e);return t&&!t.disableAutodetect}function _(e,t){ -const n=e;a.forEach((e=>{e[n]&&e[n](t)}))}Object.assign(e,{highlight:h, -highlightAuto:p,fixMarkup:e=>{ -return $("10.2.0","fixMarkup will be removed entirely in v11.0"), -$("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"), -t=e, -g.tabReplace||g.useBR?t.replace(o,(e=>"\n"===e?g.useBR?"
":e:g.tabReplace?e.replace(/\t/g,g.tabReplace):e)):t -;var t},highlightBlock:E,configure:e=>{ -e.useBR&&($("10.3.0","'useBR' will be removed entirely in v11.0"), -$("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")), -g=z(g,e)},initHighlighting:v,initHighlightingOnLoad:()=>{ -window.addEventListener("DOMContentLoaded",v,!1)},registerLanguage:(t,s)=>{ -let r=null;try{r=s(e)}catch(e){ -if(C("Language definition for '{}' could not be registered.".replace("{}",t)), -!i)throw e;C(e),r=u} -r.name||(r.name=t),n[t]=r,r.rawDefinition=s.bind(null,e),r.aliases&&w(r.aliases,{ -languageName:t})},listLanguages:()=>Object.keys(n),getLanguage:N, -registerAliases:w,requireLanguage:e=>{ -$("10.4.0","requireLanguage will be removed entirely in v11."), -$("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844") -;const t=N(e);if(t)return t -;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))}, -autoDetection:R,inherit:z,addPlugin:e=>{a.push(e)},vuePlugin:j(e).VuePlugin -}),e.debugMode=()=>{i=!1},e.safeMode=()=>{i=!0},e.versionString="10.5.0" -;for(const e in y)"object"==typeof y[e]&&t(y[e]) -;return Object.assign(e,y),e.addPlugin(m),e.addPlugin(S),e.addPlugin(x),e})({}) -}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);hljs.registerLanguage("latex",(()=>{"use strict";return e=>{const n=[{ -begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/ -},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{ -begin:/\^{2}[\u0000-\u007f]/}],a=[{className:"keyword",begin:/\\/,relevance:0, -contains:[{endsParent:!0,begin:((...e)=>"("+e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("|")+")")(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map((e=>e+"(?![a-zA-Z@:_])"))) -},{endsParent:!0, -begin:RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map((e=>e+"(?![a-zA-Z:_])")).join("|")) -},{endsParent:!0,variants:n},{endsParent:!0,relevance:0,variants:[{ -begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}]}]},{className:"params",relevance:0, -begin:/#+\d?/},{variants:n},{className:"built_in",relevance:0,begin:/[$&^_]/},{ -className:"meta",begin:"% !TeX",end:"$",relevance:10},e.COMMENT("%","$",{ -relevance:0})],i={begin:/\{/,end:/\}/,relevance:0,contains:["self",...a] -},t=e.inherit(i,{relevance:0,endsParent:!0,contains:[i,...a]}),r={begin:/\[/, -end:/\]/,endsParent:!0,relevance:0,contains:[i,...a]},s={begin:/\s+/,relevance:0 -},c=[t],l=[r],o=(e,n)=>({contains:[s],starts:{relevance:0,contains:e,starts:n} -}),d=(e,n)=>({begin:"\\\\"+e+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/, -keyword:"\\"+e},relevance:0,contains:[s],starts:n}),g=(n,a)=>e.inherit({ -begin:"\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{"+n+"\\})",keywords:{ -$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0 -},o(c,a)),m=(n="string")=>e.END_SAME_AS_BEGIN({className:n,begin:/(.|\r?\n)/, -end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),b=e=>({ -className:"string",end:"(?=\\\\end\\{"+e+"\\})"}),p=(e="string")=>({relevance:0, -begin:/\{/,starts:{endsParent:!0,contains:[{className:e,end:/(?=\})/, -endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]} -});return{name:"LaTeX",aliases:["TeX"], -contains:[...["verb","lstinline"].map((e=>d(e,{contains:[m()]}))),d("mint",o(c,{ -contains:[m()]})),d("mintinline",o(c,{contains:[p(),m()]})),d("url",{ -contains:[p("link"),p("link")]}),d("hyperref",{contains:[p("link")] -}),d("href",o(l,{contains:[p("link")] -})),...[].concat(...["","\\*"].map((e=>[g("verbatim"+e,b("verbatim"+e)),g("filecontents"+e,o(c,b("filecontents"+e))),...["","B","L"].map((n=>g(n+"Verbatim"+e,o(l,b(n+"Verbatim"+e)))))]))),g("minted",o(l,o(c,b("minted")))),...a] -}}})());hljs.registerLanguage("lisp",(()=>{"use strict";return e=>{ -var n="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",a="\\|[^]*?\\|",i="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",s={ -className:"literal",begin:"\\b(t{1}|nil)\\b"},l={className:"number",variants:[{ -begin:i,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{ -begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{ -begin:"#(c|C)\\("+i+" +"+i,end:"\\)"}]},b=e.inherit(e.QUOTE_STRING_MODE,{ -illegal:null}),g=e.COMMENT(";","$",{relevance:0}),r={begin:"\\*",end:"\\*"},t={ -className:"symbol",begin:"[:&]"+n},c={begin:n,relevance:0},d={begin:a},o={ -contains:[l,b,r,t,{begin:"\\(",end:"\\)",contains:["self",s,b,l,c]},c], -variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{ -name:"quote"}},{begin:"'"+a}]},v={variants:[{begin:"'"+n},{ -begin:"#'"+n+"(::"+n+")*"}]},m={begin:"\\(\\s*",end:"\\)"},u={endsWithParent:!0, -relevance:0};return m.contains=[{className:"name",variants:[{begin:n,relevance:0 -},{begin:a}]},u],u.contains=[o,v,m,s,l,b,g,r,t,d,c],{name:"Lisp",illegal:/\S/, -contains:[l,e.SHEBANG(),s,b,g,o,v,m,c]}}})());hljs.registerLanguage("haskell",(()=>{"use strict";return e=>{const n={ -variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},i={ -className:"meta",begin:/\{-#/,end:/#-\}/},a={className:"meta",begin:"^#",end:"$" -},s={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},l={begin:"\\(", -end:"\\)",illegal:'"',contains:[i,a,{className:"type", -begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{ -begin:"[_a-z][\\w']*"}),n]};return{name:"Haskell",aliases:["hs"], -keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec", -contains:[{beginKeywords:"module",end:"where",keywords:"module where", -contains:[l,n],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$", -keywords:"import qualified as hiding",contains:[l,n],illegal:"\\W\\.|;"},{ -className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where", -keywords:"class family instance where",contains:[s,l,n]},{className:"class", -begin:"\\b(data|(new)?type)\\b",end:"$", -keywords:"data family type newtype deriving",contains:[i,s,l,{begin:/\{/, -end:/\}/,contains:l.contains},n]},{beginKeywords:"default",end:"$", -contains:[s,l,n]},{beginKeywords:"infix infixl infixr",end:"$", -contains:[e.C_NUMBER_MODE,n]},{begin:"\\bforeign\\b",end:"$", -keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe", -contains:[s,e.QUOTE_STRING_MODE,n]},{className:"meta", -begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$" -},i,a,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,s,e.inherit(e.TITLE_MODE,{ -begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}]}}})());hljs.registerLanguage("properties",(()=>{"use strict";return e=>{ -var n="[ \\t\\f]*",a=n+"[:=]"+n,t="("+a+"|[ \\t\\f]+)",r="([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",s="([^\\\\:= \\t\\f\\n]|\\\\.)+",i={ -end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{ -begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties", -case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{ -returnBegin:!0,variants:[{begin:r+a,relevance:1},{begin:r+"[ \\t\\f]+", -relevance:0}],contains:[{className:"attr",begin:r,endsParent:!0,relevance:0}], -starts:i},{begin:s+t,returnBegin:!0,relevance:0,contains:[{className:"meta", -begin:s,endsParent:!0,relevance:0}],starts:i},{className:"attr",relevance:0, -begin:s+n+"$"}]}}})());hljs.registerLanguage("scala",(()=>{"use strict";return e=>{const n={ -className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}] -},a={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n", -contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{ -begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{ -className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},s={ -className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},t={ -className:"title", -begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/, -relevance:0},i={className:"class",beginKeywords:"class object trait type", -end:/[:={\[\n;]/,excludeEnd:!0, -contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{ -beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0, -excludeEnd:!0,relevance:0,contains:[s]},{className:"params",begin:/\(/,end:/\)/, -excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},t]},l={ -className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0, -contains:[t]};return{name:"Scala",keywords:{literal:"true false null", -keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit" -},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"symbol", -begin:"'\\w[\\w\\d_]*(?!')"},s,l,i,e.C_NUMBER_MODE,{className:"meta", -begin:"@[A-Za-z]+"}]}}})());hljs.registerLanguage("diff",(()=>{"use strict";return e=>({name:"Diff", -aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{ -begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{ -begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /, -end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/ -},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{ -begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{ -className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, -end:/$/}]})})());hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const n=(t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] -}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" -},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(i,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, -relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},p=[o,s,n,t.C_BLOCK_COMMENT_MODE,c,i],m={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:p.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:p.concat(["self"]),relevance:0}]), -relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,i,c,s,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",n,t.C_BLOCK_COMMENT_MODE,i,c,s]}] -},s,n,t.C_BLOCK_COMMENT_MODE,o]};return{ -aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, -disableAutodetect:!0,illegal:"",keywords:u,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:o,strings:i,keywords:u}}})(t) -;return n.disableAutodetect=!1,n.name="C++", -n.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],n}})());hljs.registerLanguage("kotlin",(()=>{"use strict" -;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ -className:"number",variants:[{ -begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ -begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ -begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ -begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], -relevance:0};return e=>{const n={ -keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", -built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", -literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" -},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},t={ -className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", -variants:[{begin:'"""',end:'"""(?=[^"])',contains:[t,s]},{begin:"'",end:"'", -illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, -contains:[e.BACKSLASH_ESCAPE,t,s]}]};s.contains.push(r);const l={ -className:"meta", -begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" -},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, -end:/\)/,contains:[e.inherit(r,{className:"meta-string"})]}] -},o=a,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),E={ -variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, -contains:[]}]},d=E;return d.variants[1].contains=[E],E.variants[1].contains=[d], -{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{ -relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}] -}),e.C_LINE_COMMENT_MODE,b,{className:"keyword", -begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", -begin:/@\w+/}]}},i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$", -returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://, -keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, -endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, -endsWithParent:!0,contains:[E,e.C_LINE_COMMENT_MODE,b],relevance:0 -},e.C_LINE_COMMENT_MODE,b,l,c,r,e.C_NUMBER_MODE]},b]},{className:"class", -beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, -illegal:"extends implements",contains:[{ -beginKeywords:"public protected internal private constructor" -},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0, -excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/, -excludeBegin:!0,returnEnd:!0},l,c]},r,{className:"meta",begin:"^#!/usr/bin/env", -end:"$",illegal:"\n"},o]}}})());hljs.registerLanguage("ruby",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{ -var a,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s={ -keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", -built_in:"proc lambda",literal:"true false nil"},r={className:"doctag", -begin:"@[A-Za-z]+"},b={begin:"#<",end:">"},t=[n.COMMENT("#","$",{contains:[r] -}),n.COMMENT("^=begin","^=end",{contains:[r],relevance:10 -}),n.COMMENT("^__END__","\\n$")],c={className:"subst",begin:/#\{/,end:/\}/, -keywords:s},d={className:"string",contains:[n.BACKSLASH_ESCAPE,c],variants:[{ -begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/, -end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{ -begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/, -end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{ -begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{ -begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{ -begin:/<<[-~]?'?/},n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, -contains:[n.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",l={className:"number", -relevance:0,variants:[{ -begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ -begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" -},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ -begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ -begin:"\\b0(_?[0-7])+r?i?\\b"}]},o={className:"params",begin:"\\(",end:"\\)", -endsParent:!0,keywords:s},_=[d,{className:"class",beginKeywords:"class module", -end:"$|;",illegal:/=/,contains:[n.inherit(n.TITLE_MODE,{ -begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{ -begin:"("+n.IDENT_RE+"::)?"+n.IDENT_RE}]}].concat(t)},{className:"function", -begin:e(/def\s*/,(a=i+"\\s*(\\(|;|$)",e("(?=",a,")"))),keywords:"def",end:"$|;", -contains:[n.inherit(n.TITLE_MODE,{begin:i}),o].concat(t)},{begin:n.IDENT_RE+"::" -},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{ -className:"symbol",begin:":(?!\\s)",contains:[d,{begin:i}],relevance:0},l,{ -className:"variable", -begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ -className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:s},{ -begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{ -className:"regexp",contains:[n.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{ -begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(", -end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}] -}].concat(b,t),relevance:0}].concat(b,t);c.contains=_,o.contains=_;var E=[{ -begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta", -begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", -starts:{end:"$",contains:_}}];return t.unshift(b),{name:"Ruby", -aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/, -contains:[n.SHEBANG({binary:"ruby"})].concat(E).concat(t).concat(_)}}})());hljs.registerLanguage("scheme",(()=>{"use strict";return e=>{ -const t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n={$pattern:t, -"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?" -},r={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},a={ -className:"number",variants:[{begin:"(-|\\+)?\\d+([./]\\d+)?",relevance:0},{ -begin:"(-|\\+)?\\d+([./]\\d+)?[+\\-](-|\\+)?\\d+([./]\\d+)?i",relevance:0},{ -begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{ -begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},i=e.QUOTE_STRING_MODE,c=[e.COMMENT(";","$",{ -relevance:0}),e.COMMENT("#\\|","\\|#")],s={begin:t,relevance:0},l={ -className:"symbol",begin:"'"+t},o={endsWithParent:!0,relevance:0},g={variants:[{ -begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)", -contains:["self",r,i,a,s,l]}]},u={className:"name",relevance:0,begin:t, -keywords:n},d={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}], -contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[u,{ -endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}], -contains:[s]}]},u,o]};return o.contains=[r,a,i,s,l,g,d].concat(c),{ -name:"Scheme",illegal:/\S/,contains:[e.SHEBANG(),a,i,l,g,d].concat(c)}}})());hljs.registerLanguage("http",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{const a="HTTP/(2|1\\.[01])",s=[{className:"attribute", -begin:e("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{ -className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]} -},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{ -name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})", -end:/$/,contains:[{className:"meta",begin:a},{className:"number", -begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:s}},{ -begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string", -begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{ -className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:s} -}]}}})());hljs.registerLanguage("elixir",(()=>{"use strict";return e=>{ -const n="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",i={$pattern:n, -keyword:"and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0" -},a={className:"subst",begin:/#\{/,end:/\}/,keywords:i},s={className:"number", -begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)", -relevance:0},b={className:"string",begin:"~[a-z](?=[/|([{<\"'])",contains:[{ -endsParent:!0,contains:[{contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/"/, -end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{ -begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin://}]}]}]},d={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{ -begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/, -contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/, -contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/, -end:/"/}]},r={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/, -contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},g=e.inherit(r,{ -className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord", -end:/\bdo\b|$|;/}),t=[d,{className:"string",begin:"~[A-Z](?=[/|([{<\"'])", -contains:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{ -begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/, -end:/\}/},{begin://}]},b,e.HASH_COMMENT_MODE,g,r,{begin:"::"},{ -className:"symbol",begin:":(?![\\s:])",contains:[d,{ -begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?" -}],relevance:0},{className:"symbol",begin:n+":(?!:)",relevance:0},s,{ -className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"},{begin:"->"},{ -begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{ -begin:/\/: (?=\d+\s*[,\]])/,relevance:0,contains:[s]},{className:"regexp", -illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"/",end:"/[a-z]*" -},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return a.contains=t,{ -name:"Elixir",keywords:i,contains:t}}})());hljs.registerLanguage("arduino",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const r=function(t){const r=(t=>{const r=t.COMMENT("//","$",{ -contains:[{begin:/\\\n/}] -}),n="[a-zA-Z_]\\w*::",i="(decltype\\(auto\\)|"+e(n)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",a={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" -},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},l={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},r,t.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:e(n)+t.IDENT_RE, -relevance:0},d=e(n)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},m=[l,a,r,t.C_BLOCK_COMMENT_MODE,o,s],p={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), -relevance:0},g={className:"function",begin:"("+i+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[c],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,s,o,a,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",r,t.C_BLOCK_COMMENT_MODE,s,o,a]}] -},a,r,t.C_BLOCK_COMMENT_MODE,l]};return{ -aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, -disableAutodetect:!0,illegal:"",keywords:u,contains:["self",a]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:l,strings:s,keywords:u}}})(t) -;return r.disableAutodetect=!1,r.name="C++", -r.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],r}(t),n=r.keywords -;return n.keyword+=" boolean byte word String", -n.literal+=" DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW", -n.built_in+=" setup loop KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put", -r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}})());hljs.registerLanguage("python",(()=>{"use strict";return e=>{const n={ -keyword:"and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal|10 not or pass raise return try while with yield", -built_in:"__import__ abs all any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip", -literal:"__debug__ Ellipsis False None NotImplemented True"},a={ -className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/, -end:/\}/,keywords:n,illegal:/#/},i={begin:/\{\{/,relevance:0},r={ -className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, -contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ -begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, -end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([uU]|[rR])'/,end:/'/, -relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ -begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, -end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, -contains:[e.BACKSLASH_ESCAPE,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, -contains:[e.BACKSLASH_ESCAPE,i,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},t="[0-9](_?[0-9])*",l=`(\\b(${t}))?\\.(${t})|\\b(${t})\\.`,b={ -className:"number",relevance:0,variants:[{ -begin:`(\\b(${t})|(${l}))[eE][+-]?(${t})[jJ]?\\b`},{begin:`(${l})[jJ]?`},{ -begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{ -begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{ -begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${t})[jJ]\\b`}]},o={ -className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{ -begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n, -contains:["self",a,b,r,e.HASH_COMMENT_MODE]}]};return s.contains=[r,b,a],{ -name:"Python",aliases:["py","gyp","ipython"],keywords:n, -illegal:/(<\/|->|\?)|=>/,contains:[a,b,{begin:/\bself\b/},{beginKeywords:"if", -relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function", -beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/, -illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,o,{begin:/->/, -endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/, -end:/(?=#)|$/,contains:[b,o,r]},{begin:/\b(print|exec)\(/}]}}})());hljs.registerLanguage("python-repl",(()=>{"use strict";return s=>({ -aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$", -subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{ -begin:/^\.\.\.(?=[ ]|$)/}]}]})})());hljs.registerLanguage("sml",(()=>{"use strict";return e=>({ -name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?", -keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while", -built_in:"array bool char exn int list option order real ref string substring vector unit word", -literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/, -contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0 -},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol", -begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{ -className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{ -begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string", -relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", -begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", -relevance:0},{begin:/[-=]>/}]})})());hljs.registerLanguage("java",(()=>{"use strict" -;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ -className:"number",variants:[{ -begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ -begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ -begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ -begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], -relevance:0};return e=>{ -var n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={ -className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", -contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const r=a;return{ -name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/, -contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, -relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ -begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ -className:"class",beginKeywords:"class interface enum",end:/[{;=]/, -excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{ -beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ -beginKeywords:"new throw return else",relevance:0},{className:"class", -begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0, -end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, -keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function", -begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(", -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, -keywords:n,relevance:0, -contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,s]}}})());hljs.registerLanguage("nginx",(()=>{"use strict";return e=>{const n={ -className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/\}/},{ -begin:/[$@]/+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{ -$pattern:"[a-z/_]+", -literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" -},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string", -contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/ -}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n] -},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^", -end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{ -begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number", -begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{ -className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{ -name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{ -begin:e.UNDERSCORE_IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\{/,contains:[{ -className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{ -begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|\\{",returnBegin:!0,contains:[{ -className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}], -illegal:"[^\\s\\}]"}}})());hljs.registerLanguage("xml",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} -function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ -return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ -const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]+:/,")?"),/[A-Z0-9_.-]*/),i={ -className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/, -contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] -},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ -className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{ -className:"meta-string"}),m={endsWithParent:!0,illegal:/`]+/}]}] -}]};return{name:"HTML, XML", -aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], -case_insensitive:!0,contains:[{className:"meta",begin://, -relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta", -begin://,contains:[r,c,g,l]}]}]},e.COMMENT(//,{ -relevance:10}),{begin://,relevance:10},i,{ -className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag", -begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{ -end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", -begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{ -end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ -className:"tag",begin:/<>|<\/>/},{className:"tag", -begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name", -begin:t,relevance:0,starts:m}]},{className:"tag",begin:a(/<\//,n(a(t,/>/))), -contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0}]}]}} -})());hljs.registerLanguage("markdown",(()=>{"use strict";function n(...n){ -return n.map((n=>{return(e=n)?"string"==typeof e?e:e.source:null;var e -})).join("")}return e=>{const a={begin:/<\/?[A-Za-z_]/,end:">", -subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0 -},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, -relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), -relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ -begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{ -className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, -returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", -excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", -end:"\\]",excludeBegin:!0,excludeEnd:!0}]},s={className:"strong",contains:[], -variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},c={ -className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{ -begin:/_(?!_)/,end:/_/,relevance:0}]};s.contains.push(c),c.contains.push(s) -;let t=[a,i] -;return s.contains=s.contains.concat(t),c.contains=c.contains.concat(t), -t=t.concat(s,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ -className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:t},{ -begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", -contains:t}]}]},a,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", -end:"\\s+",excludeEnd:!0},s,c,{className:"quote",begin:"^>\\s+",contains:t, -end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ -begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ -begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", -contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ -begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ -className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ -className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})());hljs.registerLanguage("yaml",(()=>{"use strict";return e=>{ -var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={ -className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ -},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", -variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(s,{ -variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={ -end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={ -begin:/\{/,end:/\}/,contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[", -end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr", -variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{ -begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)" -}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string", -begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ -begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, -relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type", -begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a -},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", -begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", -relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ -className:"number", -begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" -},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},t,g,s],r=[...b] -;return r.pop(),r.push(i),l.contains=r,{name:"YAML",case_insensitive:!0, -aliases:["yml","YAML"],contains:b}}})());hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s -})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{ -begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{ -begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={ -className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={ -begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/, -end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, -contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/, -end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n] -},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 -}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, -contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ -name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/, -keyword:"if then else elif fi for while in do done case esac function", -literal:"true false", -built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" -},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/ -},{className:"string",begin:/'/,end:/'/},n]}}})());hljs.registerLanguage("go",(()=>{"use strict";return e=>{const n={ -keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", -literal:"true false iota nil", -built_in:"append cap close complex copy imag len make new panic print println real recover delete" -};return{name:"Go",aliases:["golang"],keywords:n,illegal:"{"use strict" -;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;return r=>{const t={ -keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"], -e=>!i.includes(e))).join(" "), -literal:n.concat(["yes","no","on","off"]).join(" "), -built_in:a.concat(["npm","print"]).join(" ")};var i -;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={className:"subst",begin:/#\{/,end:/\}/, -keywords:t},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{ -end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/, -end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/, -contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/, -contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, -contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", -end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", -relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s -},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ -begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c -;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ -className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, -end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript", -aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/, -contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{ -className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0, -contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function", -begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class", -beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{ -beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l] -},{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}})());hljs.registerLanguage("clojure",(()=>{"use strict";return e=>{ -var t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",a={ -$pattern:n, -"builtin-name":r+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize" -},s={begin:n,relevance:0},o={className:"number",begin:"[-+]?\\d+(\\.\\d+)?", -relevance:0},i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null -}),c=e.COMMENT(";","$",{relevance:0}),d={className:"literal", -begin:/\b(true|false|nil)\b/},l={begin:"[\\[\\{]",end:"[\\]\\}]"},m={ -className:"comment",begin:"\\^"+n},p=e.COMMENT("\\^\\{","\\}"),u={ -className:"symbol",begin:"[:]{1,2}"+n},f={begin:"\\(",end:"\\)"},h={ -endsWithParent:!0,relevance:0},y={keywords:a,className:"name",begin:n, -relevance:0,starts:h},g=[f,i,m,p,c,u,l,o,d,s],b={beginKeywords:r,lexemes:n, -end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:n, -relevance:0,excludeEnd:!0,endsParent:!0}].concat(g)} -;return f.contains=[e.COMMENT("comment",""),b,y,h], -h.contains=g,l.contains=g,p.contains=[l],{name:"Clojure",aliases:["clj"], -illegal:/\S/,contains:[f,i,m,p,c,u,l,o,d]}}})());hljs.registerLanguage("clojure-repl",(()=>{"use strict";return e=>({ -name:"Clojure REPL",contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)?=>/, -starts:{end:/$/,subLanguage:"clojure"}}]})})());hljs.registerLanguage("scss",(()=>{"use strict";return e=>{var t="@[a-z-]+",i={ -className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},r={ -className:"number",begin:"#[0-9A-Fa-f]+"} -;return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE, -e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0, -illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{ -className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ -className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{ -className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{ -className:"selector-tag", -begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b", -relevance:0},{className:"selector-pseudo", -begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)" -},{className:"selector-pseudo", -begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)" -},i,{className:"attribute", -begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b", -illegal:"[^\\s]"},{ -begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" -},{begin:":",end:";", -contains:[i,r,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{ -className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:t, -keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0, -keywords:"and or not only",contains:[{begin:t,className:"keyword" -},i,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,r,e.CSS_NUMBER_MODE]}]}}})());hljs.registerLanguage("dockerfile",(()=>{"use strict";return e=>({ -name:"Dockerfile",aliases:["docker"],case_insensitive:!0, -keywords:"from maintainer expose env arg user onbuild stopsignal", -contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ -beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell", -starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"{"use strict";return e=>({name:"CMake", -aliases:["cmake.in"],case_insensitive:!0,keywords:{ -keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined" -},contains:[{className:"variable",begin:/\$\{/,end:/\}/ -},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]})})());hljs.registerLanguage("less",(()=>{"use strict";return e=>{ -var n="([\\w-]+|@\\{[\\w-]+\\})",a=[],s=[],t=e=>({className:"string", -begin:"~?"+e+".*?"+e}),r=(e,n,a)=>({className:e,begin:n,relevance:a}),i={ -begin:"\\(",end:"\\)",contains:s,relevance:0} -;s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{ -begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", -excludeEnd:!0} -},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@\\{[\\w-]+\\}"),r("built_in","~?`[^`]*?`"),{ -className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0 -},{className:"meta",begin:"!important"});var c=s.concat({begin:/\{/,end:/\}/, -contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{ -beginKeywords:"and not"}].concat(s)},g={begin:n+"\\s*:",returnBegin:!0, -end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":", -excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s} -}]},d={className:"keyword", -begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", -starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},o={ -className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{ -begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{ -begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:/\{/}],returnBegin:!0, -returnEnd:!0,illegal:"[<='$\"]",relevance:0, -contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@\\{[\\w-]+\\}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{ -className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo", -begin:/:(:)?[a-zA-Z0-9_\-+()"'.]+/},{begin:"\\(",end:"\\)",contains:c},{ -begin:"!important"}]} -;return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,o,g,b),{ -name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}})());hljs.registerLanguage("plaintext",(()=>{"use strict";return t=>({ -name:"Plain text",aliases:["text","txt"],disableAutodetect:!0})})());hljs.registerLanguage("json",(()=>{"use strict";return n=>{const e={ -literal:"true false null" -},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],a=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],l={ -end:",",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:e},t={begin:/\{/, -end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/, -contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(l,{begin:/:/ -})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(l)], -illegal:"\\S"};return a.push(t,s),i.forEach((n=>{a.push(n)})),{name:"JSON", -contains:a,keywords:e,illegal:"\\S"}}})());hljs.registerLanguage("awk",(()=>{"use strict";return e=>({name:"Awk",keywords:{ -keyword:"BEGIN END if else while do for in break continue delete next nextfile function func exit|10" -},contains:[{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{ -begin:/\$\{(.*?)\}/}]},{className:"string",contains:[e.BACKSLASH_ESCAPE], -variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/, -end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{ -begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{ -begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]})})());hljs.registerLanguage("shell",(()=>{"use strict";return s=>({ -name:"Shell Session",aliases:["console"],contains:[{className:"meta", -begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,starts:{end:/[^\\](?=\s*$)/, -subLanguage:"bash"}}]})})());hljs.registerLanguage("lua",(()=>{"use strict";return e=>{ -const t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"] -},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n], -relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, -literal:"true false nil", -keyword:"and break do else elseif end for goto if in local not or repeat return then until while", -built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" -},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)", -contains:[e.inherit(e.TITLE_MODE,{ -begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", -begin:"\\(",endsWithParent:!0,contains:o}].concat(o) -},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", -begin:t,end:a,contains:[n],relevance:5}])}}})());hljs.registerLanguage("makefile",(()=>{"use strict";return e=>{const i={ -className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", -contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{"use strict";return e=>{ -const n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!" -;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?", -keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield", -literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}})());hljs.registerLanguage("gradle",(()=>{"use strict";return e=>({name:"Gradle", -case_insensitive:!0,keywords:{ -keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine" -}, -contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE] -})})());hljs.registerLanguage("c",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const n=(t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] -}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" -},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(i,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, -relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},m=[c,s,n,t.C_BLOCK_COMMENT_MODE,o,i],p={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), -relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,i,o,s,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",n,t.C_BLOCK_COMMENT_MODE,i,o,s]}] -},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{ -aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, -disableAutodetect:!0,illegal:"",keywords:u,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:c,strings:i,keywords:u}}})(t) -;return n.name="C",n.aliases=["c","h"],n}})());hljs.registerLanguage("css",(()=>{"use strict";return e=>{ -var n="[a-zA-Z-][a-zA-Z0-9_-]*",a={ -begin:/([*]\s?)?(?:[A-Z_.\-\\]+|--[a-zA-Z0-9_-]+)\s*(\/\*\*\/)?:/, -returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute", -begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0, -contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in", -begin:/[\w-]+/},{begin:/\(/,end:/\)/, -contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}] -},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{ -className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}] -}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/, -contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id", -begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:"\\."+n},{ -className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", -contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo", -begin:/:(:)?[a-zA-Z0-9_+()"'.-]+/},{begin:"@(page|font-face)", -lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]", -illegal:/:/,returnBegin:!0,contains:[{className:"keyword", -begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0, -relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/, -className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE] -}]},{className:"selector-tag",begin:n,relevance:0},{begin:/\{/,end:/\}/, -illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,{begin:/;/},a]}]}}})());hljs.registerLanguage("llvm",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{const a=/([-a-zA-Z$._][\w$.-]*)/,t={ -className:"variable",variants:[{begin:e(/%/,a)},{begin:/%\d+/},{begin:/#\d+/}] -},i={className:"title",variants:[{begin:e(/@/,a)},{begin:/@\d+/},{begin:e(/!/,a) -},{begin:e(/!\d+/,a)},{begin:/!\d+/}]};return{name:"LLVM IR", -keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double", -contains:[{className:"type",begin:/\bi\d+(?=\s|\b)/},n.COMMENT(/;\s*$/,null,{ -relevance:0}),n.COMMENT(/;/,/$/),n.QUOTE_STRING_MODE,{className:"string", -variants:[{begin:/"/,end:/[^\\]"/}]},i,{className:"punctuation",relevance:0, -begin:/,/},{className:"operator",relevance:0,begin:/=/},t,{className:"symbol", -variants:[{begin:/^\s*[a-z]+:/}],relevance:0},{className:"number",variants:[{ -begin:/0[xX][a-fA-F0-9]+/},{begin:/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/ -}],relevance:0}]}}})());hljs.registerLanguage("sql",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function r(...r){ -return r.map((r=>e(r))).join("")}function t(...r){ -return"("+r.map((r=>e(r))).join("|")+")"}return e=>{ -const n=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],s=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],c=s,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!s.includes(e))),u={ -begin:r(/\b/,t(...c),/\s*\(/),keywords:{built_in:c.join(" ")}};return{ -name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ -$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t -;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) -})(l,{when:e=>e.length<3}).join(" "),literal:a.join(" "),type:i.join(" "), -built_in:"current_catalog current_date current_default_transform_group current_path current_role current_schema current_transform_group_for_type current_user session_user system_time system_user current_time localtime current_timestamp localtimestamp" -},contains:[{begin:t(...o),keywords:{$pattern:/[\w\.]+/, -keyword:l.concat(o).join(" "),literal:a.join(" "),type:i.join(" ")}},{ -className:"type", -begin:t("double precision","large object","with timezone","without timezone") -},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ -begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ -begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator", -begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})());hljs.registerLanguage("ini",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(...n){ -return n.map((n=>e(n))).join("")}return s=>{const a={className:"number", -relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}] -},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={ -className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/ -}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={ -className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''", -end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"' -},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"], -relevance:0 -},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")" -;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, -contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{ -begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", -starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})());hljs.registerLanguage("javascript",(()=>{"use strict" -;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;function r(e){return i("(?=",e,")")}function i(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return t=>{ -const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, -isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a] -;"<"!==s?">"===s&&(((e,{after:n})=>{const a="", -returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ -begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 -},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:A}]}] -},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ -variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, -end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, -contains:["self"]}]}],relevance:0},{className:"function", -beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, -contains:["self",t.inherit(t.TITLE_MODE,{begin:c}),p],illegal:/%/},{ -beginKeywords:"while if switch catch for"},{className:"function", -begin:t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", -returnBegin:!0,contains:[p,t.inherit(t.TITLE_MODE,{begin:c})]},{variants:[{ -begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", -beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ -beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, -end:/[{;]/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:c}),"self",p] -},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", -contains:[t.inherit(t.TITLE_MODE,{begin:c}),{begin:/\(\)/},p]},{begin:/\$[(.]/}] -}}})()); \ No newline at end of file diff --git a/docs/site/assets/styles/arta.css b/docs/site/assets/styles/arta.css deleted file mode 100644 index f536ee5..0000000 --- a/docs/site/assets/styles/arta.css +++ /dev/null @@ -1,73 +0,0 @@ -/* -Date: 17.V.2011 -Author: pumbur -*/ - -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - background: #222; -} - -.hljs, -.hljs-subst { - color: #aaa; -} - -.hljs-section { - color: #fff; -} - -.hljs-comment, -.hljs-quote, -.hljs-meta { - color: #666; -} - -.hljs-string, -.hljs-symbol, -.hljs-bullet, -.hljs-regexp { - color: #ffcc33; -} - -.hljs-number, -.hljs-addition { - color: #00cc66; -} - -.hljs-built_in, -.hljs-builtin-name, -.hljs-literal, -.hljs-type, -.hljs-template-variable, -.hljs-attribute, -.hljs-link { - color: #32aaee; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-name, -.hljs-selector-id, -.hljs-selector-class { - color: #8866cc; -} - -.hljs-title, -.hljs-variable, -.hljs-deletion, -.hljs-template-tag { - color: #bb1166; -} - -.hljs-section, -.hljs-doctag, -.hljs-strong { - font-weight: bold; -} - -.hljs-emphasis { - font-style: italic; -} diff --git a/docs/site/assets/styles/dark.css b/docs/site/assets/styles/dark.css deleted file mode 100644 index 1d78ae1..0000000 --- a/docs/site/assets/styles/dark.css +++ /dev/null @@ -1,800 +0,0 @@ -/** - * Forced dark theme version - */ - -:root { - --background-body: #202b38; - --background: #161f27; - --background-alt: #1a242f; - --selection: #1c76c5; - --text-main: #dbdbdb; - --text-bright: #fff; - --text-muted: #a9b1ba; - --links: #41adff; - --focus: #0096bfab; - --border: #526980; - --code: #ffbe85; - --animation-duration: 0.1s; - --button-hover: #324759; - --scrollbar-thumb: var(--button-hover); - --scrollbar-thumb-hover: rgb(65, 92, 115); - --form-placeholder: #a9a9a9; - --form-text: #fff; - --variable: #d941e2; - --highlight: #efdb43; - --select-arrow: url("data:image/svg+xml;charset=utf-8,%3C?xml version='1.0' encoding='utf-8'?%3E %3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' height='62.5' width='116.9' fill='%23efefef'%3E %3Cpath d='M115.3,1.6 C113.7,0 111.1,0 109.5,1.6 L58.5,52.7 L7.4,1.6 C5.8,0 3.2,0 1.6,1.6 C0,3.2 0,5.8 1.6,7.4 L55.5,61.3 C56.3,62.1 57.3,62.5 58.4,62.5 C59.4,62.5 60.5,62.1 61.3,61.3 L115.2,7.4 C116.9,5.8 116.9,3.2 115.3,1.6Z'/%3E %3C/svg%3E"); -} - -html { - scrollbar-color: #324759 #202b38; - scrollbar-color: var(--scrollbar-thumb) var(--background-body); - scrollbar-width: thin; -} - -body { - font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; - line-height: 1.4; - max-width: 800px; - margin: 20px auto; - padding: 0 10px; - word-wrap: break-word; - color: #dbdbdb; - color: var(--text-main); - background: #202b38; - background: var(--background-body); - text-rendering: optimizeLegibility; -} - -button { - transition: - background-color 0.1s linear, - border-color 0.1s linear, - color 0.1s linear, - box-shadow 0.1s linear, - transform 0.1s ease; - transition: - background-color var(--animation-duration) linear, - border-color var(--animation-duration) linear, - color var(--animation-duration) linear, - box-shadow var(--animation-duration) linear, - transform var(--animation-duration) ease; -} - -input { - transition: - background-color 0.1s linear, - border-color 0.1s linear, - color 0.1s linear, - box-shadow 0.1s linear, - transform 0.1s ease; - transition: - background-color var(--animation-duration) linear, - border-color var(--animation-duration) linear, - color var(--animation-duration) linear, - box-shadow var(--animation-duration) linear, - transform var(--animation-duration) ease; -} - -textarea { - transition: - background-color 0.1s linear, - border-color 0.1s linear, - color 0.1s linear, - box-shadow 0.1s linear, - transform 0.1s ease; - transition: - background-color var(--animation-duration) linear, - border-color var(--animation-duration) linear, - color var(--animation-duration) linear, - box-shadow var(--animation-duration) linear, - transform var(--animation-duration) ease; -} - -h1 { - font-size: 2.2em; - margin-top: 0; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin-bottom: 12px; - margin-top: 24px; -} - -h1 { - color: #fff; - color: var(--text-bright); -} - -h2 { - color: #fff; - color: var(--text-bright); -} - -h3 { - color: #fff; - color: var(--text-bright); -} - -h4 { - color: #fff; - color: var(--text-bright); -} - -h5 { - color: #fff; - color: var(--text-bright); -} - -h6 { - color: #fff; - color: var(--text-bright); -} - -strong { - color: #fff; - color: var(--text-bright); -} - -h1, -h2, -h3, -h4, -h5, -h6, -b, -strong, -th { - font-weight: 600; -} - -q::before { - content: none; -} - -q::after { - content: none; -} - -blockquote { - border-left: 4px solid #0096bfab; - border-left: 4px solid var(--focus); - margin: 1.5em 0; - padding: 0.5em 1em; - font-style: italic; -} - -q { - border-left: 4px solid #0096bfab; - border-left: 4px solid var(--focus); - margin: 1.5em 0; - padding: 0.5em 1em; - font-style: italic; -} - -blockquote > footer { - font-style: normal; - border: 0; -} - -blockquote cite { - font-style: normal; -} - -address { - font-style: normal; -} - -a[href^='mailto\:']::before { - content: '📧 '; -} - -a[href^='tel\:']::before { - content: '📞 '; -} - -a[href^='sms\:']::before { - content: '💬 '; -} - -mark { - background-color: #efdb43; - background-color: var(--highlight); - border-radius: 2px; - padding: 0 2px 0 2px; - color: #000; -} - -button, -select, -input[type='submit'], -input[type='button'], -input[type='checkbox'], -input[type='range'], -input[type='radio'] { - cursor: pointer; -} - -input:not([type='checkbox']):not([type='radio']), -select { - display: block; -} - -input { - color: #fff; - color: var(--form-text); - background-color: #161f27; - background-color: var(--background); - font-family: inherit; - font-size: inherit; - margin-right: 6px; - margin-bottom: 6px; - padding: 10px; - border: none; - border-radius: 6px; - outline: none; -} - -button { - color: #fff; - color: var(--form-text); - background-color: #161f27; - background-color: var(--background); - font-family: inherit; - font-size: inherit; - margin-right: 6px; - margin-bottom: 6px; - padding: 10px; - border: none; - border-radius: 6px; - outline: none; -} - -textarea { - color: #fff; - color: var(--form-text); - background-color: #161f27; - background-color: var(--background); - font-family: inherit; - font-size: inherit; - margin-right: 6px; - margin-bottom: 6px; - padding: 10px; - border: none; - border-radius: 6px; - outline: none; -} - -select { - color: #fff; - color: var(--form-text); - background-color: #161f27; - background-color: var(--background); - font-family: inherit; - font-size: inherit; - margin-right: 6px; - margin-bottom: 6px; - padding: 10px; - border: none; - border-radius: 6px; - outline: none; -} - -input[type='checkbox'], -input[type='radio'] { - height: 1em; - width: 1em; -} - -input[type='radio'] { - border-radius: 100%; -} - -input { - vertical-align: top; -} - -label { - vertical-align: middle; - margin-bottom: 4px; - display: inline-block; -} - -input:not([type='checkbox']):not([type='radio']), -input[type='range'], -select, -button, -textarea { - -webkit-appearance: none; -} - -textarea { - display: block; - margin-right: 0; - box-sizing: border-box; - resize: vertical; -} - -textarea:not([cols]) { - width: 100%; -} - -textarea:not([rows]) { - min-height: 40px; - height: 140px; -} - -select { - background: #161f27 url("data:image/svg+xml;charset=utf-8,%3C?xml version='1.0' encoding='utf-8'?%3E %3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' height='62.5' width='116.9' fill='%23efefef'%3E %3Cpath d='M115.3,1.6 C113.7,0 111.1,0 109.5,1.6 L58.5,52.7 L7.4,1.6 C5.8,0 3.2,0 1.6,1.6 C0,3.2 0,5.8 1.6,7.4 L55.5,61.3 C56.3,62.1 57.3,62.5 58.4,62.5 C59.4,62.5 60.5,62.1 61.3,61.3 L115.2,7.4 C116.9,5.8 116.9,3.2 115.3,1.6Z'/%3E %3C/svg%3E") calc(100% - 12px) 50% / 12px no-repeat; - background: var(--background) var(--select-arrow) calc(100% - 12px) 50% / 12px no-repeat; - padding-right: 35px; -} - -select::-ms-expand { - display: none; -} - -select[multiple] { - padding-right: 10px; - background-image: none; - overflow-y: auto; -} - -button, -input[type='submit'], -input[type='button'] { - padding-right: 30px; - padding-left: 30px; -} - -button:hover { - background: #324759; - background: var(--button-hover); -} - -input[type='submit']:hover { - background: #324759; - background: var(--button-hover); -} - -input[type='button']:hover { - background: #324759; - background: var(--button-hover); -} - -input:focus { - box-shadow: 0 0 0 2px #0096bfab; - box-shadow: 0 0 0 2px var(--focus); -} - -select:focus { - box-shadow: 0 0 0 2px #0096bfab; - box-shadow: 0 0 0 2px var(--focus); -} - -button:focus { - box-shadow: 0 0 0 2px #0096bfab; - box-shadow: 0 0 0 2px var(--focus); -} - -textarea:focus { - box-shadow: 0 0 0 2px #0096bfab; - box-shadow: 0 0 0 2px var(--focus); -} - -input[type='checkbox']:active, -input[type='radio']:active, -input[type='submit']:active, -input[type='button']:active, -input[type='range']:active, -button:active { - transform: translateY(2px); -} - -input:disabled, -select:disabled, -button:disabled, -textarea:disabled { - cursor: not-allowed; - opacity: 0.5; -} - -::-moz-placeholder { - color: #a9a9a9; - color: var(--form-placeholder); -} - -:-ms-input-placeholder { - color: #a9a9a9; - color: var(--form-placeholder); -} - -::-ms-input-placeholder { - color: #a9a9a9; - color: var(--form-placeholder); -} - -::placeholder { - color: #a9a9a9; - color: var(--form-placeholder); -} - -fieldset { - border: 1px #0096bfab solid; - border: 1px var(--focus) solid; - border-radius: 6px; - margin: 0; - margin-bottom: 12px; - padding: 10px; -} - -legend { - font-size: 0.9em; - font-weight: 600; -} - -input[type='range'] { - margin: 10px 0; - padding: 10px 0; - background: transparent; -} - -input[type='range']:focus { - outline: none; -} - -input[type='range']::-webkit-slider-runnable-track { - width: 100%; - height: 9.5px; - -webkit-transition: 0.2s; - transition: 0.2s; - background: #161f27; - background: var(--background); - border-radius: 3px; -} - -input[type='range']::-webkit-slider-thumb { - box-shadow: 0 1px 1px #000, 0 0 1px #0d0d0d; - height: 20px; - width: 20px; - border-radius: 50%; - background: #526980; - background: var(--border); - -webkit-appearance: none; - margin-top: -7px; -} - -input[type='range']:focus::-webkit-slider-runnable-track { - background: #161f27; - background: var(--background); -} - -input[type='range']::-moz-range-track { - width: 100%; - height: 9.5px; - -moz-transition: 0.2s; - transition: 0.2s; - background: #161f27; - background: var(--background); - border-radius: 3px; -} - -input[type='range']::-moz-range-thumb { - box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d; - height: 20px; - width: 20px; - border-radius: 50%; - background: #526980; - background: var(--border); -} - -input[type='range']::-ms-track { - width: 100%; - height: 9.5px; - background: transparent; - border-color: transparent; - border-width: 16px 0; - color: transparent; -} - -input[type='range']::-ms-fill-lower { - background: #161f27; - background: var(--background); - border: 0.2px solid #010101; - border-radius: 3px; - box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d; -} - -input[type='range']::-ms-fill-upper { - background: #161f27; - background: var(--background); - border: 0.2px solid #010101; - border-radius: 3px; - box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d; -} - -input[type='range']::-ms-thumb { - box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d; - border: 1px solid #000; - height: 20px; - width: 20px; - border-radius: 50%; - background: #526980; - background: var(--border); -} - -input[type='range']:focus::-ms-fill-lower { - background: #161f27; - background: var(--background); -} - -input[type='range']:focus::-ms-fill-upper { - background: #161f27; - background: var(--background); -} - -a { - text-decoration: none; - color: #41adff; - color: var(--links); -} - -a:hover { - text-decoration: underline; -} - -code { - background: #161f27; - background: var(--background); - color: #ffbe85; - color: var(--code); - padding: 2.5px 5px; - border-radius: 6px; - font-size: 1em; -} - -samp { - background: #161f27; - background: var(--background); - color: #ffbe85; - color: var(--code); - padding: 2.5px 5px; - border-radius: 6px; - font-size: 1em; -} - -time { - background: #161f27; - background: var(--background); - color: #ffbe85; - color: var(--code); - padding: 2.5px 5px; - border-radius: 6px; - font-size: 1em; -} - -pre > code { - padding: 10px; - display: block; - overflow-x: auto; -} - -var { - color: #d941e2; - color: var(--variable); - font-style: normal; - font-family: monospace; -} - -kbd { - background: #161f27; - background: var(--background); - border: 1px solid #526980; - border: 1px solid var(--border); - border-radius: 2px; - color: #dbdbdb; - color: var(--text-main); - padding: 2px 4px 2px 4px; -} - -img, -video { - max-width: 100%; - height: auto; -} - -hr { - border: none; - border-top: 1px solid #526980; - border-top: 1px solid var(--border); -} - -table { - border-collapse: collapse; - margin-bottom: 10px; - width: 100%; - table-layout: fixed; -} - -table caption { - text-align: left; -} - -td, -th { - padding: 6px; - text-align: left; - vertical-align: top; - word-wrap: break-word; -} - -thead { - border-bottom: 1px solid #526980; - border-bottom: 1px solid var(--border); -} - -tfoot { - border-top: 1px solid #526980; - border-top: 1px solid var(--border); -} - -tbody tr:nth-child(even) { - background-color: #1a242f; - background-color: var(--background-alt); -} - -::-webkit-scrollbar { - height: 10px; - width: 10px; -} - -::-webkit-scrollbar-track { - background: #161f27; - background: var(--background); - border-radius: 6px; -} - -::-webkit-scrollbar-thumb { - background: #324759; - background: var(--scrollbar-thumb); - border-radius: 6px; -} - -::-webkit-scrollbar-thumb:hover { - background: rgb(65, 92, 115); - background: var(--scrollbar-thumb-hover); -} - -::-moz-selection { - background-color: #1c76c5; - background-color: var(--selection); - color: #fff; - color: var(--text-bright); -} - -::selection { - background-color: #1c76c5; - background-color: var(--selection); - color: #fff; - color: var(--text-bright); -} - -details { - display: flex; - flex-direction: column; - align-items: flex-start; - background-color: #1a242f; - background-color: var(--background-alt); - padding: 10px 10px 0; - margin: 1em 0; - border-radius: 6px; - overflow: hidden; -} - -details[open] { - padding: 10px; -} - -details > :last-child { - margin-bottom: 0; -} - -details[open] summary { - margin-bottom: 10px; -} - -summary { - display: list-item; - background-color: #161f27; - background-color: var(--background); - padding: 10px; - margin: -10px -10px 0; - cursor: pointer; - outline: none; -} - -summary:hover, -summary:focus { - text-decoration: underline; -} - -details > :not(summary) { - margin-top: 0; -} - -summary::-webkit-details-marker { - color: #dbdbdb; - color: var(--text-main); -} - -footer { - border-top: 1px solid #526980; - border-top: 1px solid var(--border); - padding-top: 10px; - color: #a9b1ba; - color: var(--text-muted); -} - -body > footer { - margin-top: 40px; -} - -@media print { - body, - pre, - code, - summary, - details, - button, - input, - textarea { - background-color: #fff; - } - - button, - input, - textarea { - border: 1px solid #000; - } - - body, - h1, - h2, - h3, - h4, - h5, - h6, - pre, - code, - button, - input, - textarea, - footer, - summary, - strong { - color: #000; - } - - summary::marker { - color: #000; - } - - summary::-webkit-details-marker { - color: #000; - } - - tbody tr:nth-child(even) { - background-color: #f2f2f2; - } - - a { - color: #00f; - text-decoration: underline; - } -} - -/*# sourceMappingURL=dark.css.map */ diff --git a/docs/site/assets/styles/main.css b/docs/site/assets/styles/main.css deleted file mode 100644 index 7bdd728..0000000 --- a/docs/site/assets/styles/main.css +++ /dev/null @@ -1,40 +0,0 @@ -.row { - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; -} - -body { - margin: 20px auto; - max-width: 800px; - padding: 0 10px; - background: var(--background-body); -} - - -pre.src { - background: #1a242f; - padding: 10px 20px; - border-radius: 2px; -} - -.timestamp { - background: #161f27; - background: var(--background); - color: #ffbe85; - color: var(--code); - padding: 2.5px 5px; - border-radius: 6px; - font-size: 1em; -} - -.footdef { - display: flex; - flex-direction: row; - align-items: start; -} - -p.footpara { - margin: 2px 5px; -} diff --git a/docs/site/config.org b/docs/site/config.org deleted file mode 100644 index a24ec21..0000000 --- a/docs/site/config.org +++ /dev/null @@ -1,10 +0,0 @@ -#+AUTHOR: Sameer Rahmani -#+EMAIL: lxsameer@gnu.org -#+LANGUAGE: en -#+OPTIONS: toc:nil <:t -#+options: html5-fancy:t tex:t -#+html_doctype: html5 -#+HTML_CONTAINER: div class="column" -#+HTML_CONTENT_CLASS: row -#+creator: Emacs 27.1 (Org mode ) -#+HTML_LINK_HOME: https://fg42.org/ diff --git a/docs/site/pages/code-of-conduct.org b/docs/site/pages/code-of-conduct.org deleted file mode 100644 index 2bdfb6f..0000000 --- a/docs/site/pages/code-of-conduct.org +++ /dev/null @@ -1,65 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: code-of-conduct.html -#+DATE: 2021-07-01 -#+TITLE: Contributor Covenant Code of Conduct -#+PAGE: true -#+DESC: An GNU/Emacs based editor for hackers - - -** Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers -pledge to making participation in our project and our community a harassment-free experience for everyone, -regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and orientation. - -** Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery and unwelcome sexual attention or advances -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting - -** Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to -take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, -code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban -temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -** Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing -the project or its community. Examples of representing a project or community include using an official project -e-mail address, posting via an official social media account, or acting as an appointed representative at an -online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -** Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project -team at devs@codamic.tech. The project team will review and investigate all complaints, and will respond in -a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality -with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent -repercussions as determined by other members of the project's leadership. - -** Attribution - -This Code of Conduct is adapted from the [[http://contributor-covenant.org][Contributor Covenant]], version [[http://contributor-covenant.org/version/1/4/][1.4]], available -at http://contributor-covenant.org/version/1/4 diff --git a/docs/site/pages/contributors.org b/docs/site/pages/contributors.org deleted file mode 100644 index 8af2010..0000000 --- a/docs/site/pages/contributors.org +++ /dev/null @@ -1,22 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: contributors.html -#+DATE: 2021-07-01 -#+TITLE: Contributors -#+PAGE: true -#+DESC: An GNU/Emacs based editor for hackers - -People how contributed to *FG42* sorted by their number of contribution at the time -of generating the list: - - Sameer Rahmani ([[https://twitter.com/lxsameer][@lxsameer]]) - - Amir Reza Askarpour ([[https://twitter.com/amirrezaask][@amirrezaask]]) - - Mary Salehi - - Amir Hooshangi ([[https://twitter.com/amirhoshangi][@amirhoshangi]]) - - Behnam Ahmad Khan Beigi ([[https://twitter.com/yottanami][@yottanami]]) - - Danial Parsi ([[https://twitter.com/intuxticated][@intuxticated]]) - - Pouya Abbassi - - Keyvan Hedayati ([[https://twitter.com/k1-hedayati][@k1-hedayati]]) - - Nima Nazari ([[https://twitter.com/mandrivan][@mandrivan]]) - - Pouria - - Delaram Sobhani ([[https://twitter.com/DelaRam90][@DelaRam90]]) - - Ehsan Mahmoudi ([[https://twitter.com/jeyem90][@jeyem90]]) diff --git a/docs/site/pages/how-to-contribute.org b/docs/site/pages/how-to-contribute.org deleted file mode 100644 index 4a27853..0000000 --- a/docs/site/pages/how-to-contribute.org +++ /dev/null @@ -1,59 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: how-to-contribute.html -#+DATE: 2021-07-01 -#+TITLE: How to contribute to FG42 -#+PAGE: true -#+DESC: An GNU/Emacs based editor for hackers - -Wow, thanks for your interest in helping out with FG42. Let this document -serve as your guide. - -** Looking for work? - -If you're looking for a task to work on, check out [[https://devheroes.codes/FG42/FG42/src/branch/master/dev.org][the dev]] file. We keepe our -big TODOs there. Or reach out to [[https://lxsameer.com][@lxsameer]] to talk about the possiblities. - -** New Features - -FG42 is the thinking persons editor, so for major contribution, start with some *deeeep* -thoughts. Finished? - -Alright, your next step is to start a discussion. - -Create an [[https://devheroes.codes/FG42/FG42/issues][issue]] to start a conversation. Tell us what you're trying to accomplish -and how you think you might do it. If all is well, we will collaborate on delivering -the feature. - -** Bugs - -Of course, if you run into any straight-up bugs or weirdness feel free to skip -the thinking (or at least too much of it) and immediately submit an [[https://devheroes.codes/FG42/FG42/issues][issue]]. - -We have an issue template in place that will ask you some details -about the platform you are running and how to reproduce the bug. (If -you can reproduce it reliably. If not, go ahead and file the issue -anyway so we can start looking at it.) - -Some of the usual stuff we'll want to know: - -- What happened? - "I manifested a being from the outer dimensions." - -- What did you expect to happen? - "Hello, world." - -- How can you reprodice it? - "I created a new FG42 cube with the template, then installed some code that Bob Howard gave me." - -- What operating system and version are you using? - e.g. "Gentoo stable" - -- What version of Emacs are you using? - e.g. "Emacs 27.1" - -- What FG42 version are you using? - e.g. "3.0.0" - -Even better, include a link to a gist or repository where we can jump straight -to the problem. diff --git a/docs/site/templates/blog.html b/docs/site/templates/blog.html deleted file mode 100644 index 15acb39..0000000 --- a/docs/site/templates/blog.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - {{title}} - - - - - - - {{{head}}} - - - - - - -
- -
-
- -
- {{{preamble}}} -
- -
- {{{content}}} -
- -
- © 2010-2024 Sameer Rahmani
- Version: {{version}}
- Built with Emacs Lisp and org-mode.
-
- - - - - diff --git a/docs/site/templates/categories.org b/docs/site/templates/categories.org deleted file mode 100644 index 10a5fef..0000000 --- a/docs/site/templates/categories.org +++ /dev/null @@ -1,7 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: index.html -#+PAGE: true -#+TITLE: Categories - -<<<:links>>> diff --git a/docs/site/templates/cube.org b/docs/site/templates/cube.org deleted file mode 100644 index 0061c72..0000000 --- a/docs/site/templates/cube.org +++ /dev/null @@ -1,6 +0,0 @@ -#+SETUPFILE: ../../../config.org -#+OPTIONS: toc:nil -#+TITLE: <<<:title>>> -#+PAGE: true - -<<<:docs>>> diff --git a/docs/site/templates/cubes.org b/docs/site/templates/cubes.org deleted file mode 100644 index 432f0db..0000000 --- a/docs/site/templates/cubes.org +++ /dev/null @@ -1,13 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: index.html -#+PAGE: true -#+TITLE: Cubes - -*FG42* is built on top of an abstraction unit called *Cube* that logically groups a set of feature related -to a functionality in a single callable and function like entity. For more info on cubes check out their -[[../manual/cube.html -][documentation]]. Here is a list of available cubes: - - -<<<:links>>> diff --git a/docs/site/templates/footer.html b/docs/site/templates/footer.html deleted file mode 100644 index 8b13789..0000000 --- a/docs/site/templates/footer.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/site/templates/header.html b/docs/site/templates/header.html deleted file mode 100644 index 61294ec..0000000 --- a/docs/site/templates/header.html +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/docs/site/templates/index.org b/docs/site/templates/index.org deleted file mode 100644 index b38d486..0000000 --- a/docs/site/templates/index.org +++ /dev/null @@ -1,21 +0,0 @@ -#+SETUPFILE: ../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: index.html -#+DATE: 2021-07-01 -#+TITLE: FG42, The ultimate editor for true believers -#+PAGE: true -#+DESC: An GNU/Emacs based editor for hackers - -#+INCLUDE: "../../README.org::*Future Gadgets 42" :only-contents t - -* Contribute -FG42 made possible by the effort of the community of [[<<<:base-url>>>/pages/contributors.html][Contributors]]. - -If you're interested in *FG42* and wants to contribute to the project please follow -the [[<<<:base-url>>>/pages/how-to-contribute.html][How to Contribute Guitd]]. Also please read our [[<<<:base-url>>>/pages/code-of-conduct.html][Code of Conduct]] as well. - -* Recent updates: -<<<:links>>> - - -#+INCLUDE: "../../README.org::*License" diff --git a/docs/site/templates/links_template.org b/docs/site/templates/links_template.org deleted file mode 100644 index 0cbfd12..0000000 --- a/docs/site/templates/links_template.org +++ /dev/null @@ -1,7 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+TITLE: <<<:title>>> -#+PAGE: true - - -<<<:links>>> diff --git a/docs/site/templates/page-preamble.html b/docs/site/templates/page-preamble.html deleted file mode 100644 index 6213adc..0000000 --- a/docs/site/templates/page-preamble.html +++ /dev/null @@ -1 +0,0 @@ -

{{title}}

diff --git a/docs/site/templates/post-preamble.html b/docs/site/templates/post-preamble.html deleted file mode 100644 index aadb50d..0000000 --- a/docs/site/templates/post-preamble.html +++ /dev/null @@ -1,2 +0,0 @@ -

{{title}}

-{{{tags}}} - diff --git a/docs/site/templates/tags.html b/docs/site/templates/tags.html deleted file mode 100644 index 02ee88b..0000000 --- a/docs/site/templates/tags.html +++ /dev/null @@ -1,3 +0,0 @@ -
- {{tags}} -
diff --git a/docs/site/templates/tags.org b/docs/site/templates/tags.org deleted file mode 100644 index ca28a44..0000000 --- a/docs/site/templates/tags.org +++ /dev/null @@ -1,8 +0,0 @@ -#+SETUPFILE: ../../config.org -#+OPTIONS: toc:nil -#+EXPORT_FILE_NAME: index.html -#+PAGE: true -#+TITLE: Tags - - -<<<:links>>> diff --git a/fg42.app b/fg42.app deleted file mode 100755 index f799698..0000000 --- a/fg42.app +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh -#export FG42_HOME=/Users/sameer.rahmani/.fg42 -#open -a emacs --args ' --no-splash --title FG42 -l $FG42_HOME/fg42-config.el "$@"' -do shell script "/usr/bin/emacs --name FG42 --no-splash --title FG42 -l /Users/sameer.rahmani/.fg42/fg42-config.el" diff --git a/lisp/fg42/build/core.el b/lisp/fg42/build/core.el deleted file mode 100644 index 8e7ddeb..0000000 --- a/lisp/fg42/build/core.el +++ /dev/null @@ -1,198 +0,0 @@ -;;; Buid --- The builder for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with thnis program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: - -(require 'seq) - - -(defvar fg42/build-project-name "FG42" - "The name to be uesd with in the output as as the project name") - -(defvar fg42/build-project-root nil - "Root directory of the website source code.") - -(defvar fg42/build-debug-mode nil) - -(defvar fg42/build-author-name "Sameer Rahmani") -(defvar fg42/build-author-email "lxsameer@gnu.org") - -(defvar fg42/build-docs-root "/docs/site" - "Where to find the docs. It sould be relative to the -project root.") - -(defvar fg42/build-dev-base-url "http://localhost:3003" - "The base url to use with the docs for dev.") - -(defvar fg42/build-prod-base-url "https://fg42.org" - "The base url to use with the docs for production.") - -(defvar fg42/build-docs-pages-dir "/pages" - "Where to find the pages (relative to docs dir)") - -(defvar fg42/build-docs-ignore-category-check nil - "A list of files that should be ignored by category/tag checks") - -(defvar fg42/build-docs-actions nil - "Set of actions to run before building the -main docs.") -(defvar fg42/build-output-dir "/build" - "The path to the build directory.") - -(defvar fg42/build-docs-title "FG42" - "Title of the generated docs. Like the website title") - - -(defvar fg42/build-docs-desc "The ultimate editor for true believers" - "Description of the generated docs. Like the website description") - -(defvar fg42/build-usage "./builder.el SUBCOMMAND" - "Title of the generated docs. Like the website title") - - -(defmacro defproject (prject-name &rest details) - "Create a project with the given DETAILS. - -The build system will consum these details for various purposes." - (declare (indent defun)) - (cons 'progn - (cons `(setq fg42/bulid-project-name - ,(symbol-name prject-name)) - (seq-reduce - (lambda (forms pair) - (let* ((varname (intern (format "fg42/build-%s" (car pair)))) - (val (cadr pair)) - (form `(setq ,varname ,val))) - (cons form forms))) - (seq-partition details 2) - nil)))) - - -(defmacro command-> (command-var args-var &rest body) - - (declare (indent defun)) - `(defun main () - "The entry point to the build script." - (message (fg42/version)) - (message "\nFG42 Build tool v%s\n\n" (fg42/version)) - - ;; UTF-8 as default encoding - (prefer-coding-system 'utf-8) - (set-default-coding-systems 'utf-8) - (set-terminal-coding-system 'utf-8) - (set-keyboard-coding-system 'utf-8) - - (let* ((fg42-home (car command-line-args-left)) - (build-dir (from-root ,fg42/build-output-dir)) - (parsed-args (read-args (cdr command-line-args-left))) - (eval-string (plist-get (car parsed-args) :e)) - (,command-var (caadr parsed-args)) - (,args-var (cdadr parsed-args))) - - ;; Evaluate the expression provided by :e - (when eval-string - (eval (car (read-from-string eval-string)))) - - (setq fg42/build-debug-mode (plist-get (car parsed-args) :d)) - - (cond - ,@body - (t (print-help ,command-var)))))) - - -(defun print-help (_) - "Print out the usage for the build script" - (message fg42/build-usage)) - -(defun from-root (path) - "Return the full path of the given PATH in the project root." - (concat fg42/build-project-root path)) - - -(defun from-docs (path) - "Return the full path of the given PATH in the docs root." - (concat (from-root fg42/build-docs-root) path)) - - -(defun prod-p () - "Return non-nil if debug mode is turned off" - (not fg42/build-debug-mode)) - - -(defun read-args (args) - "Parse the give ARGS list and return a list in the following -format: -(FLAGS (COMMAND ARGES))" - (seq-reduce - (lambda (acc arg) - (let ((flags (car acc)) - (commands (cadr acc)) - (i (caddr acc)) - (skip (cadddr acc))) - - (if skip - (list flags commands (1+ i) ()) - (progn - (cond - ((string= arg ":d") (plist-put flags :d t)) - ((string= arg ":e") (progn - (plist-put flags :e (nth (1+ i) args)) - (setq skip (1+ i)))) - (t (push arg commands))) - (list flags commands (1+ i) skip))))) - args - '((:d () :e ()) () 0 ()))) - - -(defun replace-in-buffer (str replacement) - "Replace the given STR with its REPLACEMENT in current buffer." - (with-current-buffer (current-buffer) - (goto-char (point-min)) - (while (search-forward str nil t) - (replace-match replacement)))) - - -(defun copy-template (src dest context) - "Replace the placeholder in SRC with list of pairs given in CONTEXT -and write it to DEST." - (make-directory (file-name-directory dest) t) - (message "Copy template: '%s' -> '%s'" src dest) - (with-temp-file dest - (insert-file-contents src) - (dolist (pair context) - (replace-in-buffer (format "<<<%s>>>" (car pair)) (cdr pair))))) - - -(defmacro do-command (&rest body) - "Run the BODY after loading FG42." - `(progn - (require 'fg42) - (fg42/before-initialize) - ,@body)) - - -(provide 'fg42/build/core) -;;; core.el ends here diff --git a/lisp/fg42/build/docs.el b/lisp/fg42/build/docs.el deleted file mode 100644 index ed62598..0000000 --- a/lisp/fg42/build/docs.el +++ /dev/null @@ -1,434 +0,0 @@ -;;; Buid --- The builder for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with thnis program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(fpkg/use dash) -(fpkg/use mustache) -(fpkg/use ht) -(fpkg/use htmlize) - -(require 'ox-html) - -(require 'fg42/cubes/all) -(require 'fg42/build/core) -(require 'fg42/build/utils) -(require 'fg42/build/ox-template) -(require 'fg42/build/rss) - -(defvar cube-template (from-root "/docs/site/templates/cube.org")) -(defvar cubes-index-template (from-root "/docs/site/templates/cubes.org")) - - -(defun fg42/build-docs-for-cube (build-dir cube) - "Build the given CUBE's doc in BUILD-DIR." - (let* ((cubes-dir (expand-file-name "site/fg42/cubes/" build-dir)) - (props (symbol-plist cube)) - (docs (plist-get props :docs)) - (cube-file (concat (expand-file-name (symbol-name cube) cubes-dir) - ".org"))) - (copy-template cube-template - cube-file - `((:title . ,(plist-get props :title)) - (:docs . ,docs))))) - - -(defun fg42/build-docs-copy-base (build-dir) - "Copy the base structure of the website to the BUILD-DIR." - (copy-directory (from-docs fg42/build-docs-pages-dir) - (expand-file-name (format "site/%s" fg42/build-docs-pages-dir) - build-dir) - nil t)) - - -(defun fg42/build-prepare-docs (build-dir host) - "Prepare the documents and the website in the given BUILD-DIR and HOST." - - ;; Build the org files for each cube - (message "Processing the docs for all the cubes") - (mapcar (lambda (cube) - (fg42/build-docs-for-cube build-dir cube)) - fg42/available-cubes) - - ;; Build the cubes list index file - (message "Processing cubes index file") - (copy-template cubes-index-template - (expand-file-name "site/fg42/cubes/index.org" build-dir) - (list - (cons :links (mapconcat (lambda (c) - (format "- [[%s][%s]]\n" - ;; href - (format "%s/fg42/cubes/%s.html" host c) - ;; title - (plist-get (symbol-plist c) :title))) - (sort fg42/available-cubes 'string<)))))) - - -(defun all-org-files () - "Return a list of all the org files in the orgs directory." - - (split-string - (shell-command-to-string (format "find %s -iname \"*.org\"" org-directory)) - "\n" t)) - - -(defun get-all-tags () - "Return a list of all the tags in the org files." - (seq-reduce - ;; all-tags is in (tags . tags->files) form - (lambda (all-tags file) - (if (get-file-global-props file "PAGE") - ;; Ignore pages - all-tags - (with-temp-buffer - (insert-file-contents file) - (let ((tags (mapcar #'car (org-get-buffer-tags)))) - (seq-reduce - (lambda (result tag) - (let ((tag-list (car result)) - (tag->file (cdr result))) - (cons - ;; Tag list - (if (member tag tag-list) tag-list (sort (cons tag tag-list) 'string<)) - ;; tag->file - (cons (cons tag - ;; Current value of the the given tag (all the files - ;; that contain that tag) - (append (list file) (cdr (assoc tag tag->file)))) - tag->file)))) - tags - all-tags))))) - (all-org-files) - '())) - - -(defun get-all-posts () - "Return all the post org files. -Not pages." - (let ((files (all-org-files))) - (seq-reduce - (lambda (result file) - (let ((is-page? (string= (get-file-global-props file "PAGE") "true"))) - (if (not is-page?) - ;; It's a post - (cons - (list - ;; This is not effecient since we parse the file - ;; on each query, but who cares :D ? - (->epoch (get-file-global-props file "DATE")) - (get-file-global-props file "TITLE") - (replace-regexp-in-string "\\.org" ".html" - (file-name-nondirectory file)) - (list file (fg42/exctract-keywords file '("TITLE" "DATE" "DESC" "AUTHOR" "CATEGORY")))) - result) - result))) - files - '()))) - -(defun get-all-posts-files () - "Return all the post org files. -Not pages." - (let ((files (all-org-files))) - (seq-reduce - (lambda (result file) - (let ((is-page? (string= (get-file-global-props file "PAGE") "true"))) - (if (not is-page?) - ;; It's a post - (cons - file - result) - result))) - files - '()))) - - -(defun get-all-sorted-posts () - "Return all posts in sorted order." - (sort - (get-all-posts) - (lambda (x y) (> (car x) (car y))))) - - -(defun latest-org-list (base-url) - "Return a list of links (using BASE-URL) to the tags in org format." - (let ((posts (get-all-sorted-posts))) - (mapconcat - (lambda (post) - (format " - [[%s%s/%s?%s][%s]]" - base-url - fg42/build-docs-pages-dir - ;; Path - (nth 2 post) - ;; Hash - (car post) - ;; Title - (nth 1 post))) - posts - "\n"))) - - -(defun get-all-categories () - "Return all the categories of the org files." - (seq-reduce - ;; all-cats is in (cats . cat->files) form - (lambda (all-cats file) - (if (not (member (file-relative-name file org-directory) - fg42/build-docs-ignore-category-check)) - (let ((is-page? (string= (get-file-global-props file "PAGE") "true")) - (cat (get-file-global-props file "CATEGORY")) - (cat-list (car all-cats)) - (cat->file (cdr all-cats))) - - (if (not is-page?) - (cons - ;; Category list - (if (member cat cat-list) cat-list (sort (cons cat cat-list) 'string<)) - ;; cat->file - (cons (cons cat - ;; Current value of the the given cat (all the files - ;; under that category) - (append (list file) (cdr (assoc cat cat->file)))) - cat->file)) - all-cats)) - all-cats)) - (all-org-files) - '())) - - -(defun category-org-list () - "Return a list of links to the categories in org format." - (let ((categories (get-all-categories))) - (mapconcat - (lambda (cat) - (let ((count (length (cdr (assoc cat (cdr categories)))))) - (format " - [[./%s.html][%s(%s)]]" cat cat count))) - (car categories) - "\n"))) - - -(defun tags-org-list () - "Return a list of links to the tags in org format." - (let ((tags (get-all-tags))) - (mapconcat - (lambda (tag) - (let ((count (length (cdr (assoc tag (cdr tags)))))) - (format " - [[./%s.html][%s(%s)]]" tag tag count))) - (car tags) - "\n"))) - - -(defun create-tag-pages (build-dir) - "Create all the tag files in the BUILD-DIR." - (let ((tags (get-all-tags))) - (mapcar - (lambda (tag) - (let ((out (format "%s/site/tags/%s.org" build-dir (or tag "Uncategorized"))) - (files (cdr (assoc tag (cdr tags))))) - (copy-template - (from-docs "/templates/links_template.org") - out - (list - (cons :links - (mapconcat - (lambda (file-pair) - (format "- [[file:..%s][%s]]" - (replace-regexp-in-string (regexp-quote (from-root "/build/site")) - "" - (cdr file-pair) - nil - 'literal) - (get-file-global-props (cdr file-pair) "TITLE"))) - - (sort - (mapcar #'pair-file-with-date files) - (lambda (x y) (> (car x) (car y)))) - "\n")) - (cons :title (or tag "Uncategorized")))))) - (car tags)))) - - -(defun create-category-pages (build-dir) - "Create all the category files in the BUILD-DIR." - (let ((tags (get-all-categories))) - (mapcar - (lambda (tag) - (let ((out (format "%s/site/categories/%s.org" build-dir (or tag "Uncategorized"))) - (files (cdr (assoc tag (cdr tags))))) - (when (null tag) - (message "[Error]: The following files are missig a category: %s" - (mapconcat - (lambda (x) (format " %s" x)) - (sort - (mapcar #'pair-file-with-date files) - (lambda (x y) (> (car x) (car y)))) - "\n")) - (error "The above list of files are missing a category")) - - (copy-template - (from-docs "/templates/links_template.org") - out - (list - (cons :links - (mapconcat - (lambda (file-pair) - (format "- [[file:..%s][%s]]" - (replace-regexp-in-string (regexp-quote (from-root "/build/site")) - "" (cdr file-pair) nil 'literal) - (get-file-global-props (cdr file-pair) "TITLE"))) - (sort - (mapcar #'pair-file-with-date files) - (lambda (x y) (> (car x) (car y)))) - "\n")) - (cons :title (or tag "Uncategorized")))))) - (car tags)))) - - -(defun fg42/build-docs (build-dir) - "Build the documents and the website in the given BUILD-DIR." - - (let ((base-url (if (prod-p) fg42/build-prod-base-url fg42/build-dev-base-url)) - (stage1-dir (expand-file-name "site" build-dir)) - (final-dir (expand-file-name "site-build" build-dir))) - - (fg42/build-docs-copy-base build-dir) - - ;; Apply all the actions - (mapcar (lambda (f) - (funcall f build-dir base-url)) - fg42/build-docs-actions) - - ;; Copy the assets - (copy-directory (from-docs "/assets") - (expand-file-name "assets" stage1-dir) nil t) - - ;; We will use the org-agenda to extract all the tags - ;;; Set the dir containing org the org-files - (setq org-directory (expand-file-name "site" build-dir)) - - ;;; Discover all the org files - (setq org-agenda-files (all-org-files)) - - (setf user-full-name fg42/build-author-name) - (setf user-mail-address fg42/build-author-email) - - ;; Disable default header links (top, next) - (setf org-html-home/up-format "") - (setf org-html-link-up "") - (setf org-html-link-home "") - (setf org-html-scripts "") - - (copy-template (from-docs "/config.org") - (expand-file-name "config.org" build-dir) - '()) - - (message "Creating the main index file") - (copy-template (from-docs "/templates/index.org") - (expand-file-name "site/index.org" build-dir) - `((:links . ,(latest-org-list base-url)) - (:base-url . ,base-url))) - - (message "Creating categories") - (copy-template (from-docs "/templates/categories.org") - (expand-file-name "site/categories/index.org" build-dir) - `((:links . ,(category-org-list)))) - - (create-category-pages build-dir) - - (message "Creating tags") - (copy-template (from-docs "/templates/tags.org") - (expand-file-name "site/tags/index.org" build-dir) - `((:links . ,(tags-org-list)))) - - (create-tag-pages build-dir) - - (setq org-html-preamble #'preamble-fn) - (setq org-html-htmlize-output-type nil) - (setq org-latex-listings t) - - (setq org-publish-project-alist - `(("website" - :base-directory ,stage1-dir - :root-directory ,stage1-dir - :recursive t - :base-extension "org" - :publishing-directory ,final-dir - ;; Exclude the blog archive index autogenerated below - ;; Note that the regexp is relative to :base-directory - ;; :exclude "^index.org" - :section-numbers nil - :with-author t - :with-drawers t - :html-format-drawer-function custom-drawer-format - :with-properties t - :with-tags t - :with-timestamps t - :with-toc nil - :base-url ,base-url - :html-link-home "/" - :html-template ,(from-docs "/templates/blog.html") - :html-page-preamble-template ,(from-docs "/templates/page-preamble.html") - :html-post-preabmle-template ,(from-docs "/templates/post-preamble.html") - :html-tags-template ,(from-docs "/templates/tags.html") - :publishing-function org-html-publish-to-templated-html - :auto-sitemap t - :htmlized-source nil - :sitemap-folders ignore - :sitemap-style list - :sitemap-title ,fg42/build-docs-title - :sitemap-filename "sitemap.inc" - :sitemap-sort-files anti-chronologically - :html-format-headline-function headline-format - :exclude "rss.org" - :makeindex nil) - - ("rss" - :base-directory ,stage1-dir - :base-extension "org" - :html-link-home ,base-url - :html-link-use-abs-url t - :rss-extension "xml" - :publishing-directory ,final-dir - :publishing-function (org-rss-publish-to-rss) - :org-rss-use-entry-url-as-guid t - :section-numbers nil - :exclude ".*" ;; To exclude all files... - :include ("rss.org") ;; ... except index.org. - :table-of-contents nil) - - ("statics" - :base-directory ,stage1-dir - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|svg" - :publishing-directory ,final-dir - :recursive t - :publishing-function org-publish-attachment) - ("build" :components ("website" "statics")))) - - (org-publish-project "build" t nil) - (fg42/rss-create (get-all-sorted-posts) base-url (expand-file-name "rss.xml" final-dir)) - (message "Build complete."))) - -(provide 'fg42/build/docs) -;;; docs.el ends here diff --git a/lisp/fg42/build/ox-template.el b/lisp/fg42/build/ox-template.el deleted file mode 100644 index 983b55a..0000000 --- a/lisp/fg42/build/ox-template.el +++ /dev/null @@ -1,163 +0,0 @@ -;;; ox-template.el --- A HTML exporter via templates for org-mode -;; Copyright (C) 2021-2022 Sameer Rahmani -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/lxsameer/lxhome -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;;; Commentary: -;; Inspired by Juan Jose Garcia Ripoll work. -;;; Code: -;; We ensure the org infrastructure - -(require 'org) -(require 'seq) -(require 'ox-publish) -(require 'mustache) -(require 'pp) -(require 'ht) -(require 'fg42/build/utils) - - -(defun use-html (path-to-template) - "Use the given template at PATH-TO-TEMPLATE as a template." - (with-temp-buffer - (insert-file-contents path-to-template) - (buffer-string))) - - -(defun render-tags (tags) - "Return a string representing TAGS html." - (if tags - (mapconcat (lambda (x) (format "#%s" x x)) - tags - " | ") - "")) - - -(defun preamble-fn (info) - "Return a string for the header section of pages using INFO plist." - (let* ((file (plist-get info :input-file)) - (page-template (or (plist-get info :html-page-preamble-template) "page-preamble.html")) - (post-template (or (plist-get info :html-post-preabmle-template) "post-preamble.html")) - (is-page? (string= (get-file-global-props file "PAGE") "true")) - (tags (get-file-tags file))) - - (let ((title (get-file-global-props file "TITLE")) - (date (get-file-global-props file "DATE"))) - - (when (not title) - (message "'#+TITLE' is missing from '%s'" file) - (error "'#+TITLE' is missing from '%s'" file)) - - (if is-page? - (mustache-render (use-html page-template) - (ht ("title" title))) - (progn - - (mustache-render (use-html post-template) - (ht - ("title" title) - ("date" (or date "")) - ("tags" (render-tags tags))))))))) - - -(defun org-html-render-tag-template (tags info) - "Render the given TAGS and INFO using the :html-headline-template." - (let ((template (plist-get info :html-tags-template)) - (ctx (ht ("tags" (format "%s" tags)) - ("base-url" (plist-get info :base-url))))) - (if (null tags) - "" - (mustache-render (use-html template) ctx)))) - - -;; Replace org-html--tags with our impelementation if the -;; `:html-headline-template' configuration exists -(advice-add 'org-html--tags :around 'org-html-tag-template) - -(defun org-html-tag-template (orig-fn &rest args) - "Decide whether to run ORIG-FN with ARGS or the org-html-render-tag-template. -It looks for `:html-tags-template' in the info and if i exists it will -call `org-html-render-tag-template' otherwise will call ORIG-FN." - (let ((template (plist-get (cadr args) :html-tags-template))) - (if template - (apply #'org-html-render-tag-template args) - (apply orig-fn args)))) - - - -(org-export-define-derived-backend 'templated-html 'html - :translate-alist '((template . templated-html-template-fn))) - - -(defun headline-format (todo todo-type priority text tags info) - "Format the headline using TODO TODO-TYPE PRIORITY TEXT TAGS and INFO." - (let ((todo (org-html--todo todo info)) - (priority (org-html--priority priority info)) - ;; We don't care about the tags here since we put the in the preamble - (tags nil)) - - (concat todo (and todo " ") - priority (and priority " ") - text - (and tags "   ") tags))) - - -(defun render-template (template-name contents info) - "Render the given template TEMPLATE-NAME using CONTENTS and INFO." - (let ((ctx (ht ("content" contents) - ("head" (plist-get info :html-head-extra)) - ("base-url" (plist-get info :base-url)) - ("preamble" (org-html--build-pre/postamble 'preamble info)) - ("title" (get-file-global-props (plist-get info :input-file) "TITLE")) - ("version" (fg42/project-version)) - ("description" (or (get-file-global-props (plist-get info :input-file) "DESC") - "")) - ("postamble" (org-html--build-pre/postamble 'postamble info))))) - (mustache-render (use-html template-name) ctx))) - - -(defun templated-html-template-fn (contents info) - "Return the finalized html CONTENTS using the INFO and templates." - (let ((template (plist-get info :html-template))) - (if template - (render-template template contents info) - (org-html-template contents info)))) - - -(defun custom-drawer-format (name content) - "Return the drawer format for the given drawer NAME and CONTENT." - (format "

%s

%s
" - (downcase name) - (capitalize name) - content)) - - -(defun org-html-publish-to-templated-html (plist filename pub-dir) - "Publish an org file to HTML. - -FILENAME is the filename of the Org file to be published. PLIST -is the property list for the given project. PUB-DIR is the -publishing directory. - -Return output file name." - (org-publish-org-to 'templated-html filename - (concat "." (or (plist-get plist :html-extension) - org-html-extension - "html")) - plist pub-dir)) - - -(provide 'fg42/build/ox-template) -;;; ox-template.el ends here diff --git a/lisp/fg42/build/rss.el b/lisp/fg42/build/rss.el deleted file mode 100644 index 511d994..0000000 --- a/lisp/fg42/build/rss.el +++ /dev/null @@ -1,94 +0,0 @@ -;;; Buid --- The builder for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with thnis program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'seq) -(require 'fg42/build/core) - -(defun fg42/rss-map-items (file-and-props link) - "Create a RSS item from the given org FILE with the give http LINK." - (let* ((file (car file-and-props)) - (values (cadr file-and-props))) - (format - (concat - " \n" - " %s\n" - " %s\n" - " %s\n" - " %s\n" - " %s\n" - " \n" - " \n") - (cadr (assoc "TITLE" values)) - link - (or - (cadr (assoc "AUTHOR" values)) - fg42/build-author-name) - link - (or - (cadr (assoc "DATE" values)) - (error "'DATE' is missing from '%s'" file)) - (or - (cadr (assoc "DESC" values)) - (error "'DESC' is missing from '%s'" file))))) - - -(defun fg42/rss-create-item (post base-url) - (fg42/rss-map-items - (car (last post)) - (format "%s%s/%s" - base-url - fg42/build-docs-pages-dir - ;; Path - (nth 2 post)))) - -(defun fg42/rss-create (posts base-url dest) - "Create a RSS xml file via POSTS for the give BASE-URL and save to DEST." - (with-temp-file dest - (insert - (format - (concat - "\n" - "\n" - "\n" - " %s\n" - " %s\n" - " %s\n" - "%s\n" - "\n" - "\n") - fg42/build-docs-title - base-url - fg42/build-docs-desc - (mapconcat - (lambda (post) - (fg42/rss-create-item post base-url)) - posts - ""))))) - - -(provide 'fg42/build/rss) -;;; rss.el ends here diff --git a/lisp/fg42/build/utils.el b/lisp/fg42/build/utils.el deleted file mode 100644 index 1b4e8d7..0000000 --- a/lisp/fg42/build/utils.el +++ /dev/null @@ -1,110 +0,0 @@ -;;; Buid --- The builder for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with thnis program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: - -(require 'org-element) -(require 'fg42/build/core) - - -(defmacro comment (&rest _) - "Ignore the given BODY." - nil) - - -(defun ->epoch (date-str) - "Convert the given DATE-STR to epoch seconds." - ;; Just because it's easier to deal with date in bash rather than elisp - (string-to-number - (shell-command-to-string (concat (format "date -d %s" date-str) " +%s")))) - - -(defun get-buffer-global-props (prop) - "Get a plists of global org properties PROP of current buffer." - (car - (org-element-map - (org-element-parse-buffer) - 'keyword - (lambda (el) - (when (string-match prop (org-element-property :key el)) - (org-element-property :value el)))))) - - -(defun get-file-global-props (file prop) - "Return the value of the given global PROP in the given org FILE." - (with-temp-buffer - (insert-file-contents file) - (get-buffer-global-props prop))) - -(defmacro with-cwd (path &rest body) - "Run the BODY with PATH as the current working dir." - `(let ((cwd (getenv "PWD")) - (default-directory ,path)) - (cd default-directory) - (prog1 - ,@body - (cd cwd)))) - -(defun fg42/exctract-keywords (file keys) - "Create a RSS item from the given org FILE for the give KEYS." - (with-cwd (file-name-directory file) - (with-temp-buffer - (insert-file-contents file) - (org-collect-keywords keys)))) - - -(defun pair-file-with-date (file) - "Return a pair for the given FILE with date as car and file as cdr." - (cons - (->epoch (get-file-global-props file "DATE")) - file)) - - -(defun get-file-tags (file) - "Returna list of tags for the given FILE." - (with-temp-buffer - (insert-file-contents file) - (mapcar #'car (org-get-buffer-tags)))) - - -(defun fg42/git-branch () - "Return the branch name of the project." - (let ((default-directory fg42/build-project-root)) - (shell-command-to-string "git branch --show-current"))) - - -(defun fg42/project-version () - "Return the current version of the project." - (let ((default-directory fg42/build-project-root)) - (shell-command-to-string (format "git describe %s" (fg42/git-branch))))) - -(defun fg42/version () - "Return the current version of the project." - (let ((default-directory (getenv "FG42_HOME"))) - (shell-command-to-string (format "git describe %s" (fg42/git-branch))))) - -(provide 'fg42/build/utils) -;;; utils.el ends here diff --git a/lisp/fg42/cube.el b/lisp/fg42/cube.el deleted file mode 100644 index 2390d7c..0000000 --- a/lisp/fg42/cube.el +++ /dev/null @@ -1,234 +0,0 @@ -;;; Cube --- Cube library of FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'seq) -(require 'fg42/utils) -(require 'fg42/themes) - -(defvar fg42/after-cubes-setup-hook nil - "A hook that will be run after all the active cubes got setup. -This hook is dedicated for the codes that need to do stuff based on other cubes -presence. With this hook we eliminate the need for cube ordering. - -It will be called in the `fg42-config' and the proper way to use -it is to use `fg42/after-cubes' macro.") - - -(defvar fg42/available-cubes '() - "A list of all the registered cubes.") - -(defvar fg42/-cubes-body-hook nil - "A Hook that is internal to FG42 and will be used to run the cub bodies. -The execution happens after Emacs is initialized.") - - -(defun fg42/extract-props (body-list &optional acc) - "Extract the props pairs from BODY-LIST with an optional accumulator ACC. - -It will returen a pair in form of (body . props)." - (let ((k (car body-list)) - (rest (cdr body-list))) - - (if (and k (keywordp k)) - (fg42/extract-props - (cdr rest) - (cons (cdr rest) (plist-put (cdr acc) k (car rest)))) - (cons body-list (cdr acc))))) - - -(defun fg42/run-cube-after-initialization (f) - "Run the given Cube body function F after FG42's initialization. -If FG42 is already initialized, just run F." - (if (null fg42/initialized) - (add-hook 'fg42/-cubes-body-hook f) - (funcall f))) - - -(defmacro defcube (cube-name docs &rest props-n-body) - "Define a cube with the given CUBE-NAME, DOCS and a PROPS-N-BODY. - -TODO: Docs" - (declare (indent defun) (doc-string 2)) - - ;; Make sure that props is a plist and contains the `:docs' key - ;; TODO: Maybe use `cl-check-type' here - (when (not (stringp docs)) - (error "Missing docstring for '%s' cube" cube-name)) - - (let* ((parsed-body (fg42/extract-props props-n-body)) - (body (car parsed-body)) - (props (cdr parsed-body))) - - (when (not (plist-get props :title)) - (error "Missing :titel key for '%s' cube" cube-name)) - - (let ((complete-props (plist-put props :docs docs)) - (cube-name-internal (intern (format "%s-internal" cube-name))) - ;; prop hooks - (init-hook (plist-get props :init-hook)) - (ui-hook (plist-get props :ui-hook)) - - (params-var (intern (format "%s-params" cube-name))) - (active-var (intern (format "%s-active-p" cube-name))) - (pre-lang-server-up-hook (intern (format "%s-pre-lang-server-up-hook" cube-name))) - (post-lang-server-up-hook (intern (format "%s-post-lang-server-up-hook" cube-name))) - (pre-lang-server-down-hook (intern (format "%s-pre-lang-server-down-hook" cube-name))) - (post-lang-server-down-hook (intern (format "%s-post-lang-server-down-hook" cube-name))) - (pre-init-hook (intern (format "%s-pre-init-hook" cube-name))) - (post-init-hook (intern (format "%s-post-init-hook" cube-name))) - (post-init-hook (intern (format "%s-post-init-hook" cube-name))) - - (flag-var (or (plist-get props :flag) cube-name)) - (flag-docstring-var (or (plist-get props :flag-doc) - (format "The flag to enable/disable the '%s' cube." cube-name))) - (flag-default (plist-get props :flag-default)) - (flag-conflict (plist-get props :conflicts-with)) - (no-flag? (or (plist-get props :no-flag) ()))) - - (add-to-list 'fg42/available-cubes cube-name) - - `(progn - - ;; Create a new flag for each cube to control the cubes systemwide. - (when (not ,no-flag?) - (defflag ,flag-var ,flag-docstring-var ,flag-default)) - - ;; Params variable contains the list of params the is passed to - ;; the current cube call - (defvar ,params-var nil - ,(format "Parameters for the '%s' cube." cube-name)) - - ;; * Hooks - - ;; This hook can be used by others to run code just before running that - ;; cube's body - (defvar ,pre-init-hook nil - ,(format "The hook that runs befor the '%s' cube initialization." cube-name)) - - - ;; This hook can be used by others to run code just after the body of - ;; the cube - (defvar ,post-init-hook nil - ,(format "The hook that runs after the '%s' cube initialization." cube-name)) - - ;; TODO: Move language server related hooks to lang-server - ;; TODO: Provide a way to let different parts of the - ;; codebase to create cube hooks - - ;; ** Language Server - ;;; The hook that enables users to change the language server configuration - ;;; of the current cube before activating the server - (defvar ,pre-lang-server-up-hook nil - ,(format "The hook that runs befor the '%s' cube's language server activates ." cube-name)) - - ;;; The hook to do any post configuration for the lang server of the cube - (defvar ,post-lang-server-up-hook nil - ,(format "The hook that runs after the '%s' cube's language server activates." cube-name)) - - ;;; The hook to run code just before the language server is about to shutdown - (defvar ,pre-lang-server-down-hook nil - ,(format "The hook that runs befor the '%s' cube's language server shuts down." cube-name)) - - ;;; The hook to run code after the language server successfully shuts down - (defvar ,post-lang-server-down-hook nil - ,(format "The hook that runs after the '%s' cube's language server shuts down." cube-name)) - - ;; This way we can bypass the flag system if we really really want to. - (defun ,cube-name-internal (params) - (if (or (not (boundp (quote ,active-var))) - (not ,active-var)) - (progn - ;; Mark this cube as active - (setq ,active-var t) - - ;; Set the parameters in CUBE-NAME-params to be accessable - ;; in the body - (setq ,params-var params) - - ;; Run the pre init hook - (run-hooks (quote ,pre-init-hook)) - - (fg42/info "Initializing '%s' cube." (quote ,cube-name)) - ;; Run the body - (let ((result (progn ,@body))) - ;; Run the post init hook - (run-hooks (quote ,post-init-hook)) - result)) - (fg42/info "The '%s' cube is already active." ',cube-name))) - - (defun ,cube-name (&rest params) - (interactive) - (let ((fg42/---f-sym - (lambda () - (when (not (null ,ui-hook)) - (when-flag ,flag-var - (add-hook 'fg42/ui-hook #',ui-hook))) - - (when (not (null ,init-hook)) - (funcall #',init-hook params)) - - ;; Run the cube internal after initialization or - ;; if Emacs is already up, just run it. - (fg42/run-cube-after-initialization - (lambda () - (,cube-name-internal params)))))) - - (if ,no-flag? - ;; If no flag is need to control this cube - (funcall fg42/---f-sym) - ;; Otherwise check for the flag to be active - (if-flag ,flag-var - (funcall fg42/---f-sym) - (fg42/info "The flag for '%s' cube is disabled. Skiping." ,(symbol-name cube-name)))))) - - ;; Set the symbol-plist of the cube-name to its props - (setplist ',cube-name ',complete-props))))) - - -(defmacro fg42/after-cubes (&rest body) - "Add the BODY to `fg42/after-cubes-setup-hook' hook." - (declare (indent defun)) - `(add-hook 'fg42/after-cubes-setup-hook - (lambda () - ,@body))) - - -(defmacro ->cube (pkg docs &rest body) - "A wrapper to create a cube that use only a PKG. -It passes the BODY to `fpkg/use'. -And passes DOCS to `defcube' as the cube documentation." - (declare (indent defun) (doc-string 2)) - `(defcube ,(intern (format "fg42/%s-cube" pkg)) - ,docs - :title ,(format "%s cube" pkg) - :flag ,pkg - :flag-default t - (fpkg/use ,pkg ,@body))) - - -(provide 'fg42/cube) -;;; cube.el ends here diff --git a/lisp/fg42/cubes/agda.el b/lisp/fg42/cubes/agda.el deleted file mode 100644 index 043c707..0000000 --- a/lisp/fg42/cubes/agda.el +++ /dev/null @@ -1,42 +0,0 @@ -;;; Agdacube --- Agda support for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fg42/cube) -(require 'fg42/utils) - - -(defcube fg42/agda-cube - "Integrate Agda-mode with Fg42" - :title "Agda cube" - :flag-default nil - :flag agda - (load-file - (let* ((coding-system-for-read 'utf-8) - (home (getenv "HOME")) - (cabal-bin (concat home "/.cabal/bin/"))) - (add-to-list 'exec-path cabal-bin) - (shell-command-to-string (concat cabal-bin "agda-mode locate"))))) - - -(provide 'fg42/cubes/agda) -;;; agda.el ends here diff --git a/lisp/fg42/cubes/all.el b/lisp/fg42/cubes/all.el deleted file mode 100644 index 308541a..0000000 --- a/lisp/fg42/cubes/all.el +++ /dev/null @@ -1,46 +0,0 @@ -;;; AllCubes --- An index to use import all the cubes at once -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: - -(require 'fg42/flags) -(require 'fg42/cubes/editor) -(require 'fg42/cubes/elisp) -(require 'fg42/cubes/region-expansion) -(require 'fg42/cubes/wm) -(require 'fg42/cubes/modeline) -(require 'fg42/cubes/autocompletion) -(require 'fg42/cubes/golang) -(require 'fg42/cubes/project) -(require 'fg42/cubes/irc) -(require 'fg42/cubes/terminal) -(require 'fg42/cubes/java) -(require 'fg42/cubes/python) -(require 'fg42/cubes/snippets) -(require 'fg42/cubes/org) -(require 'fg42/cubes/git) -(require 'fg42/cubes/bookmark) -(require 'fg42/cubes/terraform) - - -(provide 'fg42/cubes/all) -;;; all.el ends here diff --git a/lisp/fg42/cubes/autocompletion.el b/lisp/fg42/cubes/autocompletion.el deleted file mode 100644 index 74cf897..0000000 --- a/lisp/fg42/cubes/autocompletion.el +++ /dev/null @@ -1,100 +0,0 @@ -;;; AutocompletionCubes --- The completion related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - -(defcube fg42/flycheck-cube - "This cube adds the `flycheck' support to fg42." - :title "Flycheck cube" - :flag flycheck - :flag-default t - (fpkg/use flycheck - :defer () - :init - (require 'flycheck) - (global-flycheck-mode))) - - -(defcube fg42/yaml-cube - "Yaml Support" - :title "Yaml Support" - :no-flag t - (fpkg/use yaml-mode)) - - -(defcube fg42/lsp-cube - "LSP cube" - :title "LSP cube" - :flag lsp - :flag-default t - - (fpkg/use lsp-mode - :commands lsp - :init - (setq lsp-headerline-breadcrumb-enable nil)) - - ;; TODO: Create a flag for lsp-ui or move it - ;; to a new cube - (fpkg/use lsp-ui - :init - (progn - (setq lsp-ui-doc-enable t - lsp-ui-doc-show-with-cursor t)) - :config - (add-hook 'lsp-mode-hook 'lsp-ui-mode))) - - -(defcube fg42/company-cube - "Auto complete using company mode" - :title "Company cube" - :flag company - :flag-default t - - (fpkg/use company - :bind (:map company-active-map - ("M-n" . company-select-next) - ("M-p" . company-select-previous) - ("TAB" . company-complete-common-or-cycle) - ("M-d" . company-show-doc-buffer)) - :config - (progn - ;; Use Company for completion - (bind-key [remap completion-at-point] #'company-complete company-mode-map) - (setq company-show-numbers t) - (setq company-idle-delay 0) - (setq company-tooltip-limit 20) - (setq company-echo-delay 0) - (setq company-tooltip-align-annotations t) - (setq company-dabbrev-downcase nil) - (global-company-mode))) - - ;; TODO: Move company box to a new cube - (fpkg/use company-box - :after company - :config - (add-hook 'company-mode-hook 'company-box-mode))) - - -(provide 'fg42/cubes/autocompletion) -;;; autocompletion.el ends here diff --git a/lisp/fg42/cubes/bookmark.el b/lisp/fg42/cubes/bookmark.el deleted file mode 100644 index ff996c5..0000000 --- a/lisp/fg42/cubes/bookmark.el +++ /dev/null @@ -1,101 +0,0 @@ -;;; Bookmark --- Bookmarks within the code -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with thnis program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/bookmark-cube - "bookmark cube" - :title "fg42/cubes/fg42/bookmark-cube.org" - :flag bookmark - :flag-default t - - (let* ((bnext (or (plist-get fg42/bookmark-cube-params :bm-next-key) "M-]")) - (bprev (or (plist-get fg42/bookmark-cube-params :bm-previous-key) "M-[")) - (btoggle (or (plist-get fg42/bookmark-cube-params :bm-toggel-key) "M-p")) - (keys `(list (,bnext . bm-next) - (,bprev . bm-previous) - (,btoggle . bm-toggle)))) - (eval - `(fpkg/use bm - :init - (require 'bm) - ;; restore on load (even before you require bm) - (setq bm-restore-repository-on-load t) - - - - :config - ;; Allow cross-buffer 'next' - (setq bm-cycle-all-buffers t) - - ;; where to store persistant files - (setq bm-repository-file (expand-file-name "bm-repository" user-emacs-directory)) - - ;; save bookmarks - (setq-default bm-buffer-persistence t) - - ;; Loading the repository from file when on start up. - (add-hook 'after-init-hook 'bm-repository-load) - - ;; Saving bookmarks - (add-hook 'kill-buffer-hook #'bm-buffer-save) - - ;; Saving the repository to file when on exit. - ;; kill-buffer-hook is not called when Emacs is killed, so we - ;; must save all bookmarks first. - (add-hook 'kill-emacs-hook #'(lambda nil - (bm-buffer-save-all) - (bm-repository-save))) - - ;; The `after-save-hook' is not necessary to use to achieve persistence, - ;; but it makes the bookmark data in repository more in sync with the file - ;; state. - (add-hook 'after-save-hook #'bm-buffer-save) - - ;; Restoring bookmarks - (add-hook 'find-file-hooks #'bm-buffer-restore) - (add-hook 'after-revert-hook #'bm-buffer-restore) - - ;; The `after-revert-hook' is not necessary to use to achieve persistence, - ;; but it makes the bookmark data in repository more in sync with the file - ;; state. This hook might cause trouble when using packages - ;; that automatically reverts the buffer (like vc after a check-in). - ;; This can easily be avoided if the package provides a hook that is - ;; called before the buffer is reverted (like `vc-before-checkin-hook'). - ;; Then new bookmarks can be saved before the buffer is reverted. - ;; Make sure bookmarks is saved before check-in (and revert-buffer) - (add-hook 'vc-before-checkin-hook #'bm-buffer-save) - - - :bind ((,bnext . bm-next) - (,bprev . bm-previous) - (,btoggle . bm-toggle)))))) - -(provide 'fg42/cubes/bookmark) -;;; bookmark.el ends here diff --git a/lisp/fg42/cubes/clojure.el b/lisp/fg42/cubes/clojure.el deleted file mode 100644 index cd3bdcb..0000000 --- a/lisp/fg42/cubes/clojure.el +++ /dev/null @@ -1,51 +0,0 @@ -;;; ClojureCubes --- The Clojure cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Pouya Abbassi -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - -(autoload-cube 'fg42/clojure-init "clojure/core.el" "Initalize the Clojure mode.") - -(defcube fg42/clojure-cube - "Clojure support cube for fg42. -Installs and activates clojure-mode, cider, paredit and rainbow-delimiters. -Also activates LSP and converts `fn` to λ." - :title "Clojure cube" - :flag clojure - :flag-default t - - (fpkg/use aggressive-indent - :config (paredit-mode +1)) - - (fg42/rainbow-delimiters-cube) - - (fpkg/use cider) - - (fpkg/use clojure-mode - :hook (clojure-mode . fg42/clojure-init) - :config (when-flag clojure - (setq lsp-enable-indentation nil)))) - -(provide 'fg42/cubes/clojure) -;;; clojure.el ends here diff --git a/lisp/fg42/cubes/clojure/core.el b/lisp/fg42/cubes/clojure/core.el deleted file mode 100644 index 5d1fdea..0000000 --- a/lisp/fg42/cubes/clojure/core.el +++ /dev/null @@ -1,49 +0,0 @@ -;;; ClojureCubes --- The Clojure cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Pouya Abbassi -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: - - -(defun fg42/fn-greek-lambda () - (font-lock-add-keywords nil `(("\\" - (0 (progn (compose-region (match-beginning 0) (match-end 0) - ,(make-char 'greek-iso8859-7 107)) - nil)))))) - - -(defun fg42/clojure-init () - (paredit-mode 1) - (aggressive-indent-mode 1) - (rainbow-delimiters-mode 1) - (when-flag lsp (lsp)) - (fg42/fn-greek-lambda) - (add-hook 'clojure-mode-hook (lambda () - (lsp) - (require 'company-capf) - (require 'company-box) - (setq company-backends - '((company-capf - company-keywords)))))) - - -(provide 'fg42/cubes/clojure/core) -;;; core.el ends here diff --git a/lisp/fg42/cubes/cpp.el b/lisp/fg42/cubes/cpp.el deleted file mode 100644 index e8922b5..0000000 --- a/lisp/fg42/cubes/cpp.el +++ /dev/null @@ -1,70 +0,0 @@ -;;; CPPCubes --- The C/C++ cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - -(defcube fg42/cmake-cube - "This cube enables CMake integration with FG42" - :title "CMake cube" - :flag-default t - :flag cmake - - (fpkg/use cmake-mode) - (fpkg/use eldoc-cmake)) - - - -(defcube fg42/ninja-cube - "This cube enables Ninja integration with FG42. For more info checkout: -https://github.com/ninja-build/ninja/blob/master/misc/ninja-mode.el" - :title "Ninja cube" - :flag-default t - :flag ninja - (fpkg/use ninja-mode)) - - -(defcube fg42/c++-cube - "C++ cube" - :title "C++ cube" - :no-flag t - - (fg42/cmake-cube) - (fg42/ninja-cube) - (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) - (add-hook 'c++-mode-hook (lambda () - (lsp) - (require 'company-capf) - (require 'company-box) - - (add-hook 'before-save-hook - (lambda () - (when (and lsp-mode (eq major-mode 'c++-mode)) - (lsp-format-buffer)))) - (setq company-backends - '((company-capf - company-keywords)))))) - -(provide 'fg42/cubes/cpp) -;;; cpp.el ends here diff --git a/lisp/fg42/cubes/editor.el b/lisp/fg42/cubes/editor.el deleted file mode 100644 index 412b6ee..0000000 --- a/lisp/fg42/cubes/editor.el +++ /dev/null @@ -1,388 +0,0 @@ -;;; EditorCubes --- The common cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'server) -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) -(require 'fg42/modeline) -(require 'fg42/cubes/modeline) -(require 'fg42/themes) -(require 'fg42/project) - -(defflag font-icons - "Enable the support for font icones in FG42." t) - - -(defflag server - "Enable the support for server mode in FG42." t) - - -(defcube fg42/folding-cube - "This cube install ~origami~ which let you collapse and expand regions of text. - -For more info checkout [[https://github.com/gregsexton/origami.el]]" - :title "Folding cube" - :flag folding - :flag-default t - (fpkg/use origami - :bind - (("C-c TAB" . origami-toggle-node)) - :config - (global-origami-mode t))) - - -(->cube dirvish - "Dirvish is an improved version of the Emacs inbuilt package Dired. -It not only gives Dired an appealing and highly customizable user interface, -but also comes together with almost all possible parts required for full usability -as a modern file manager." - :init - (require 'dirvish) - (dirvish-override-dired-mode)) - - -(->cube which-key - "which-key is a minor mode for Emacs that displays the key bindings following -your currently entered incomplete command (a prefix) in a popup. For example, -after enabling the minor mode if you enter ~C-x~ and wait for the default of -1 second the minibuffer will expand with all of the available key bindings -that follow ~C-x~ (or as many as space allows given your settings). -This includes prefixes like ~C-x 8~ which are shown in a different face." - :init - (require 'which-key) - :config - (which-key-setup-side-window-bottom) - (which-key-mode)) - - -(->cube helpful - "Helpful is an alternative to the built-in Emacs help that provides much more -contextual information." - :init - (require 'helpful) - :config - (global-set-key (kbd "C-h f") #'helpful-callable) - (global-set-key (kbd "C-h v") #'helpful-variable) - (global-set-key (kbd "C-h k") #'helpful-key) - (global-set-key (kbd "C-h x") #'helpful-command) - (global-set-key (kbd "C-c C-d") #'helpful-at-point)) - -(->cube envrc - "Activate direnv whenever encounter a `.envrc' file" - :init - (require 'envrc) - (envrc-global-mode)) - -(defcube fg42/pinentry-cube - "Pinentry cube with setup the =pinentry= program to be used within FG42." - :title "Pinentry cube" - :flag pinentry - :flag-default t - (fpkg/use pinentry - :init - (progn - (require 'pinentry) - (setq epa-pinentry-mode 'loopback) - (pinentry-start)))) - - -(defcube fg42/imenu-cube - "Imenu support" - :title "Imenu cube" - :flag imenu - :flag-default t - (fpkg/use imenu-list - :init - (global-set-key (kbd "C-'") #'imenu-list-smart-toggle))) - - -(defcube fg42/alert-cube - "alert support" - :title "Alert cube" - :flag alert - :flag-default t - (fpkg/use alert)) - - -(defcube fg42/emojify-cube - "Adds support for emojis to *FG42*" - :title "Emojify cube" - :flag emoji - :flag-default t - (fpkg/use emojify - :hook (after-init . global-emojify-mode))) - - -(defcube fg42/discover-cube - "Adds support for the [[https://github.com/mickeynp/discover.el][discover]]" - :title "Discover cube" - :flag discover - :flag-default t - (fpkg/use discover)) - - -(defcube fg42/exec-path-cube - "This cube fixes the =exec-path-from-shell= issue on MacOS." - :title "Exec path cube" - :flag exec-path-from-shell - :flag-default t - (fpkg/use exec-path-from-shell - :init - (require 'exec-path-from-shell) - (when (memq window-system '(mac ns x)) - (exec-path-from-shell-initialize)))) - - -(defcube fg42/hl-cube - "This cube highlight the curret line." - :title "Current line highlight cube" - :flag hl-line - :flag-default t - (require 'hl-line) - (global-hl-line-mode)) - - -(defcube fg42/rainbow-delimiters-cube - "rainbow-delimiters is a =rainbow parentheses= like mode which highlights delimiters -such as parentheses, brackets or braces according to their depth. Each successive level -is highlighted in a different color. This makes it easy to spot matching delimiters, -orient yourself in the code, and tell which statements are at a given depth." - - :title "Rainbow Delimiters Cube" - :flag rainbow-delimiters - :flag-default t - - (fpkg/use rainbow-delimiters - ;; It doesn't work due to a problem/conflict in rainbow-delimiters - ;; But we use it any way they might fix it - :hook (prog-mode . rainbow-delimiters-mode))) - - -(defcube fg42/paredit-cube - "=paredit= is a minor mode for performing structured editing of S-expression -data. The typical example of this would be Lisp or Scheme source code." - - :title "Paredit Cube" - :flag paredit - :flag-default t - (fpkg/use paredit - :hook ((emacs-lisp-mode . paredit-mode) - (clojure-mode . paredit-mode) - (scheme-mode . paredit-mode)))) - - -(defcube fg42/cursor-cube - "This cube controls the shape of the cursor." - :title "Cursor cube" - :flag cursor-type - :flag-default t - (let ((ctype (or (plist-get fg42/cursor-cube-params :type) 'box)) - (ccolor (or (plist-get fg42/cursor-cube-params :color) "#aa0000"))) - - (add-hook 'fg42/after-initializing-theme-hook - (lambda () - (set-default 'cursor-type ctype) - (set-cursor-color ccolor))))) - -(defcube fg42/buffer-navigation-cube - "This cube controls the different aspect of buffer navigation" - :title "Buffer navigation cube" - :flag buffer-navigation - :flag-default t - - (fpkg/use avy - :bind ("M-1" . avy-goto-word-1))) - - -(defcube fg42/window-navigation-cube - "This cube controls the different aspect of buffer navigation" - :title "Window navigation cube" - :flag window-navigation - :flag-default t - - (fpkg/use ace-window - :bind ("C-" . ace-window))) - - -(defcube fg42/font-cube - "This cube controls the font configuration of *FG42*" - :title "Font Cube" - :no-flag t - :flag-default t - (let ((font (or (plist-get fg42/font-cube-params :font-name) - "Fira Mono")) - (size (or (plist-get fg42/font-cube-params :font-size) - 12))) - (when font - ;; Sets the default font to fg42 font - (add-to-list 'default-frame-alist - (cons 'font (format "%s-%d" font size))) - - (set-face-attribute 'default t :font font)))) - - -;; ;TODO: Replace this cube with a `theme-cube' -;; (defcube fg42/dracula-theme-cube -;; "Replace this with a theme cube" -;; :title "Dracula theme" -;; :no-flag t -;; :ui-hook (lambda () -;; (fpkg/use dracula-theme -;; :init -;; (fg42/setup-theme -;; (load-theme 'dracula t) -;; (custom-theme-set-faces -;; 'dracula -;; '(match ((t (:background "#44475a")))) -;; '(all-the-icons-lgreen ((t (:background "#bd93f9")))) -;; '(all-the-icons-faicon ((t (:background "#bd93f9")))) -;; '(font-lock-comment-face ((t (:foreground "#8B9298")))) -;; '(font-lock-comment-delimiter-face ((t (:foreground "#5B6268"))))) -;; (enable-theme 'dracula) -;; (set-face-attribute 'region nil :background "#888"))))) - -(defcube fg42/badwolf-theme-cube - "Badwolf theme cube. An Emacs port of Bad Wolf theme for Vim. -https://emacsthemes.com/themes/badwolf-theme.html" - :title "Badwolf theme" - :no-flag t - (require 'fg42/themes) - - (fpkg/use badwolf-theme - :init - (fg42/setup-theme - (load-theme 'badwolf t) - (custom-theme-set-faces - 'badwolf) - (enable-theme 'badwolf)))) - - -(defcube fg42/selectrum-cube - "This cube adds support for `selectrum' to FG42" - :title "Selectrum cube" - :flag selectrum - :flag-default t - (fpkg/use selectrum - :defer nil - :init - (require 'selectrum) - (selectrum-mode +1)) - - (fpkg/use selectrum-prescient - :defer t - :init - (progn - (require 'selectrum-prescient) - (setq prescient-filter-method '(literal fuzzy regexp initialism)) - (selectrum-prescient-mode +1) - (prescient-persist-mode +1))) - - ;; TODO: Disbale ctrlf in WM mode - (fpkg/use ctrlf - :defer t - :init - (require 'ctrlf) - (ctrlf-mode +1))) - - -(defcube fg42/editor-cube - "This is a meta cube that sets up the basic functionalities of an Editor" - :title "Editor cube" - :no-flag t - - (fg42/disable-modeline-cube) - (fpkg/use rainbow-delimiters - ;; It doesn't work due to a problem/conflict in rainbow-delimiters - ;; But we use it any way they might fix it - :hook (prog-mode . rainbow-delimiters-mode)) - - (when-flag font-icon - (fpkg/use all-the-icons)) - - ;; In the following section we're setting some default behavior of FG42. - ;; Most of these configuration are opiniated and I think most of people - ;; shared the same opinion or don't care at all. - - ;; Remove splash screen - (setq inhibit-splash-screen t) - ;; scratch should be scratch - (setq initial-scratch-message nil) - ;; Don't allow tab as indent - (setq-default indent-tabs-mode nil) - ;; Default indent width - (setq tab-width 2) - ;; Share the clipboard with X applications - (setq x-select-enable-clipboard t) - ;; Automatically removed excess backups of the file - (setq delete-old-versions t) - - ;; Global configurations - (tool-bar-mode -1) - - (menu-bar-mode -1) - (when (display-graphic-p) - (scroll-bar-mode -1)) - - (column-number-mode t) - (show-paren-mode t) - (electric-pair-mode 1) - - ;; Rectangular select - (cua-selection-mode t) - - ;; Yank the region on type - (delete-selection-mode 1) - - (defalias 'yes-or-no-p 'y-or-n-p) - - ;; Hooks --- - ;; Deletel extra trailing white spaces on save - (add-hook 'before-save-hook 'delete-trailing-whitespace) - - ;; Enable rainbow-delimiters for programming - (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) - - - (when-flag server - (when (not (server-running-p)) - (when-wm - (setq server-name "fg42-wm")) - (server-start))) - - ;; Call the editor related cubes. They will be run only if - ;; their flag is active otherwise they will be skipped - - (when-flag fg42-project - (fg42-project-global-mode t)) - - (let ((mline (or (plist-get fg42/editor-cube-params :modeline) - #'fg42/default-modeline))) - ;;(fg42/statusbar-cube) - ;;(fg42/modeline-cube) - ;; (fg42/setup-modeline-format mline) - )) - - -(provide 'fg42/cubes/editor) -;;; editor.el ends here diff --git a/lisp/fg42/cubes/eldoc.el b/lisp/fg42/cubes/eldoc.el deleted file mode 100644 index 2b2b0e5..0000000 --- a/lisp/fg42/cubes/eldoc.el +++ /dev/null @@ -1,45 +0,0 @@ -;;; eldoc --- The eldoc cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/eldoc-box-cube - "This cube sets up the =eldoc-box= system to show documentations on demand in -a box." - :title "Eldoc box Cube" - :flag eldoc-box - :flag-default t - :modes '(eldoc-box-hover-mode eldoc-box-hover-at-point-mode) - (fpkg/use eldoc-box - :config - (add-hook 'eldoc-mode-hook 'eldoc-box-hover-at-point-mode))) - - -(provide 'fg42/cubes/eldoc) -;;; eldoc.el ends here diff --git a/lisp/fg42/cubes/elisp.el b/lisp/fg42/cubes/elisp.el deleted file mode 100644 index 18fb6b9..0000000 --- a/lisp/fg42/cubes/elisp.el +++ /dev/null @@ -1,44 +0,0 @@ -;;; ElispCube --- The elisp cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - -(defcube fg42/elisp-cube - "Elisp cube" - :title "fg42/cubes/fg42/elisp-cube.org" - :no-flag t - - (fg42/rainbow-delimiters-cube) - (fg42/paredit-cube) - - (fpkg/use eros - :init - (require 'eros) - (eros-mode)) - - (add-hook 'emacs-lisp-mode-hook #'rainbow-delimiters-mode)) - - -(provide 'fg42/cubes/elisp) -;;; elisp.el ends here diff --git a/lisp/fg42/cubes/elisp/core.el b/lisp/fg42/cubes/elisp/core.el deleted file mode 100644 index 06465e9..0000000 --- a/lisp/fg42/cubes/elisp/core.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; ElispCube --- The elisp cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: - - -(defun fg42/elisp-hook-handler () - "Configure the elisp mode." - (require 'rainbow-delimiters) - (require 'paredit) - (rainbow-delimiters-mode t) - (paredit-mode t) - (message "Elisp cube is done")) - - -(provide 'fg42/cubes/elisp/core) -;;; core.el ends here diff --git a/lisp/fg42/cubes/fg42.el b/lisp/fg42/cubes/fg42.el deleted file mode 100644 index 9b2475f..0000000 --- a/lisp/fg42/cubes/fg42.el +++ /dev/null @@ -1,85 +0,0 @@ -;;; FG42Cube --- The meta cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fg42/cube) -(require 'fg42/utils) - -(require 'fg42/cubes/editor) -(require 'fg42/cubes/org) -(require 'fg42/cubes/elisp) -(require 'fg42/cubes/region-expansion) -(require 'fg42/cubes/modeline) -(require 'fg42/cubes/autocompletion) -(require 'fg42/cubes/golang) -(require 'fg42/cubes/project) -(require 'fg42/cubes/irc) -(require 'fg42/cubes/terminal) -(require 'fg42/cubes/java) -(require 'fg42/cubes/python) -(require 'fg42/cubes/cpp) -(require 'fg42/cubes/snippets) -(require 'fg42/cubes/rust) -(require 'fg42/cubes/mastodon) -(require 'fg42/cubes/git) -(require 'fg42/cubes/bookmark) -(require 'fg42/cubes/terraform) -(require 'fg42/cubes/graph) -(require 'fg42/cubes/clojure) -(require 'fg42/cubes/scheme) -(require 'fg42/cubes/meson) -(require 'fg42/cubes/godot3d) -(require 'fg42/cubes/meissa) -(require 'fg42/cubes/proof) -(require 'fg42/cubes/agda) -(require 'fg42/cubes/notifications) -(require 'fg42/cubes/noether) -(require 'fg42/cubes/nix) -(require 'fg42/cubes/julia) -(require 'fg42/cubes/themes) -(require 'fg42/cubes/verilog) - -(when-wm - (require 'fg42/cubes/wm)) - -(defcube fg42/editor - "A meta cube that contains all the cubes in the system. Calling -This cube is enough to load everything and control what cube to execute -via flags." - :title "Editor cube" - :flag-default t - :flag fg42-editor-cube - :init-hook (lambda (params) - (mapc - (lambda (cube) - (when (not (string= (symbol-name cube) - "fg42/editor")) - (let ((cube-params (plist-get - params - (intern (concat ":" (symbol-name cube)))))) - (eval `(funcall #',cube ,@cube-params))))) - fg42/available-cubes))) - - - -(provide 'fg42/cubes/fg42) -;;; fg42.el ends here diff --git a/lisp/fg42/cubes/git.el b/lisp/fg42/cubes/git.el deleted file mode 100644 index 08c7bd6..0000000 --- a/lisp/fg42/cubes/git.el +++ /dev/null @@ -1,70 +0,0 @@ -;;; GitCube --- The Git cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/diff-hl-cube - "This cube highlights changes to the current buffer in respect to the -VC status of the file. For example if you're using *git* in your project -and you've made some changes to the current buffer that are not commited -yet it will highlihgt them for you. - -For more info check out [[https://github.com/dgutov/diff-hl][diff-hl]] 's page." - :title "Diff Highlight Cube" - :flag diff-hl - :flag-default t - - (fpkg/use diff-hl - :init - (progn - (require 'diff-hl) - (when-flag git - (add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh) - (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)) - (global-diff-hl-mode)))) - - -(defcube fg42/git-cube - "This cube integrates *git* into *FG42*." - :title "Git Cube" - :flag git - :flag-default t - - (fpkg/use magit - :bind (("C-x g" . magit-status))) - - (fpkg/use magit-todos - :after magit - :init (require 'magit-todos)) - - (fg42/diff-hl-cube)) - - -(provide 'fg42/cubes/git) -;;; git.el ends here diff --git a/lisp/fg42/cubes/godot3d.el b/lisp/fg42/cubes/godot3d.el deleted file mode 100644 index 8e2e21b..0000000 --- a/lisp/fg42/cubes/godot3d.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; GodotCubes --- The Golang cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - - -(defcube fg42/godot-cube - "Godot3d integration for FG42." - :title "Godot3d cube" - :flag-default t - :flag godot3d - - (fpkg/use gdscript-mode - :mode "\\.gd\\'")) - - -(provide 'fg42/cubes/godot3d) -;;; godot3d.el ends here diff --git a/lisp/fg42/cubes/golang.el b/lisp/fg42/cubes/golang.el deleted file mode 100644 index 67329e7..0000000 --- a/lisp/fg42/cubes/golang.el +++ /dev/null @@ -1,51 +0,0 @@ -;;; GolangCubes --- The Golang cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - -(autoload-cube 'fg42/initialize-golang "golang/core.el" "Initalize the go mode.") - -(defcube fg42/golang-cube - "Golang support cube for fg42." - :title "Golang cube" :flag golang - :flag-default t - - (fpkg/use go-mode - :defer t - :mode "\\.go\\'" - :config - (progn - (add-hook 'go-mode-hook 'fg42/initialize-golang) - (when-flag lsp - (add-hook 'go-mode-hook - (lambda () - (when (not (boundp 'lsp)) - (require 'lsp) - (lsp-deferred)))))))) - - - -(provide 'fg42/cubes/golang) -;;; golang.el ends here diff --git a/lisp/fg42/cubes/golang/core.el b/lisp/fg42/cubes/golang/core.el deleted file mode 100644 index 8c0e223..0000000 --- a/lisp/fg42/cubes/golang/core.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; GolangCubes --- The Golang cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fg42/flags) - - -(defun fg42/go-path-from-env () - "Gets gopath from OS env." - (exec-path-from-shell-copy-env "GOPATH")) - - -(defun fg42/go-path-binary (gopath) - "Gets Go binaries path with respect to the given GOPATH." - ;; TODO: Use `expand-file-name' here - (concat gopath "/bin")) - -(defun fg42/initialize-golang () - "Setup Emacs hooks and turn necessary modes on." - (when-flag lsp - (lsp-register-custom-settings - '(("gopls.completeUnimported" t t) - ("gopls.staticcheck" t t))) - (add-hook 'before-save-hook - (lambda () - (when (eq major-mode 'go-mode) - (lsp-format-buffer) - (lsp-organize-imports))))) - - (when-flag company - (setq-local company-backends - '(company-capf - company-dabbrev - company-dabbrev-code))) - - (let ((go-path (or (plist-get fg42/golang-cube-params :go-path) - (fg42/go-path-from-env)))) - (add-to-list 'exec-path (fg42/go-path-binary go-path))) - - (local-set-key (kbd "M-.") #'godef-jump) - (local-set-key (kbd "M-*") 'pop-tag-mark)) - - -(provide 'fg42/cubes/golang/core) -;;; core.el ends here diff --git a/lisp/fg42/cubes/graph.el b/lisp/fg42/cubes/graph.el deleted file mode 100644 index d18c02a..0000000 --- a/lisp/fg42/cubes/graph.el +++ /dev/null @@ -1,59 +0,0 @@ -;;; GraphCube --- The Graph utility cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/graphviz-cube - "This cube enable =dot= file editing in *FG42*. Using this cube you should -be able to edit =dot= files and use =C-c C-p= to see a preview of your =dot= -file. Use =C-c C-c= to compile the =dot= file. - -If =company= flag is enabled then =dot= autocomplete will be enabled as well." - :title "Graphviz Cube" - :flag graphviz - :flag-default t - :modes 'graphviz-dot-mode - - (let ((indent-size (or (plist-get fg42/graphviz-cube-params :indent-size) 4))) - (fg42/after-cubes - (when-flag org - (add-hook 'org-mode-hook - (lambda () - (org-babel-do-load-languages - 'org-babel-load-languages - '((dot . t) - (graphviz-dot . t))))))) - - (fpkg/use graphviz-dot-mode - :config - (setq graphviz-dot-indent-width indent-size)))) - - -(provide 'fg42/cubes/graph) -;;; graph.el ends here diff --git a/lisp/fg42/cubes/groovy.el b/lisp/fg42/cubes/groovy.el deleted file mode 100644 index 2f1c0a1..0000000 --- a/lisp/fg42/cubes/groovy.el +++ /dev/null @@ -1,39 +0,0 @@ -;;; GroovyCubes --- The Groovy cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - - -(defcube fg42/groovy-cube - "Groovy support for FG42." - :title "Groovy cube" - :flag groovy - :flag-default t - - (fpkg/use groovy-emacs-mode - :defer t)) - -(provide 'fg42/cubes/groovy) -;;; groovy.el ends here diff --git a/lisp/fg42/cubes/haml.el b/lisp/fg42/cubes/haml.el deleted file mode 100644 index db11b57..0000000 --- a/lisp/fg42/cubes/haml.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; HamlCubes --- The Haml cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Behnam Khan Beigi -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/haml-cube - "This cube provides syntax highlighting and syntax-aware indentation - for haml files" - :title "Haml Cube" - :flag haml - :flag-default t - - (fpkg/use haml-mode - :mode "\\.haml\\'")) - - -(provide 'fg42/cubes/haml) -;;; haml.el ends here diff --git a/lisp/fg42/cubes/iconspack.el b/lisp/fg42/cubes/iconspack.el deleted file mode 100644 index 0e0cb01..0000000 --- a/lisp/fg42/cubes/iconspack.el +++ /dev/null @@ -1,41 +0,0 @@ -;;; IconsCubes --- The modeline related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -;; TODO: Break this into two cubes -(defcube fg42/all-the-icons-cube - "Install the [[https://github.com/domtronn/all-the-icons.el][all-the-icons.el]] -package." - :title "All the icons cube" - :flag all-the-icons - :flag-default t - - (fpkg/use all-the-icons - :if (display-graphic-p))) - - -(provide 'fg42/cubes/iconspack) -;;; iconspack.el ends here diff --git a/lisp/fg42/cubes/irc.el b/lisp/fg42/cubes/irc.el deleted file mode 100644 index 495fffa..0000000 --- a/lisp/fg42/cubes/irc.el +++ /dev/null @@ -1,41 +0,0 @@ -;;; IrcCubes --- The IRC related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/rcirc-cube - "IRC cube" - :title "RCIRC Cube" - :flag rcirc - - (autoload-cube 'fg42/rcirc-connect "irc/core.el" "Connect to IRC via RCIRC." t) - (defun fg42/connect-to-irc () - (interactive) - (fg42/rcirc-connect))) - - - -(provide 'fg42/cubes/irc) -;;; irc.el ends here diff --git a/lisp/fg42/cubes/irc/core.el b/lisp/fg42/cubes/irc/core.el deleted file mode 100644 index 1db32b8..0000000 --- a/lisp/fg42/cubes/irc/core.el +++ /dev/null @@ -1,46 +0,0 @@ -;;; IrcCubes --- The IRC related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: - - -(defvar fg42/default-rcirc-servers - '(("irc.libera.chat/6697" - :channels ("#fg42")))) - -(defun fg42/rcirc-connect () - "Connect to IRC servers." - (interactive) - (require 'rcirc) - - (let ((servers (or (plist-get fg42/rcirc-cube-params :server) - fg42/default-rcirc-servers))) - (setq rcirc-enable-authinfo-support t) - (setq rcirc-server-alist servers) - (add-hook 'rcirc-mode-hook - (lambda () - (rcirc-track-minor-mode 1))) - (irc nil))) - - -(provide 'fg42/cubes/irc/core) -;;; core.el ends here diff --git a/lisp/fg42/cubes/java.el b/lisp/fg42/cubes/java.el deleted file mode 100644 index e426e5f..0000000 --- a/lisp/fg42/cubes/java.el +++ /dev/null @@ -1,69 +0,0 @@ -;;; JavaCubes --- The Java cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/gradle-cube - "Gradle support" - :title "Gradle Cube" - :flag gradle - :flag-default t - - (fpkg/use groovy-mode - :mode "\\.gradle\\'") - - (fpkg/use gradle-mode - :hook (java-mode-hook . gradle-mode)) - - (when-flag flycheck - (fpkg/use flycheck-gradle))) - - -(defcube fg42/java-cube - "Java cube" - :title "Java Cube" - :flag java - :flag-default t - - (add-hook 'java-mode-hook - (lambda() - ;; To fix the indentation of function arguments - (c-set-offset 'arglist-intro '+) - (setq java-basic-offset 2) - (setq c-basic-offset 2) - (when-flag lsp-java - (setq lsp-java-server-install-dir fg42-tmp) - (lsp)))) - - (when-flag gradle - (fg42/gradle-cube)) - - (when-flag lsp - (fpkg/use lsp-java))) - - - -(provide 'fg42/cubes/java) -;;; java.el ends here diff --git a/lisp/fg42/cubes/julia.el b/lisp/fg42/cubes/julia.el deleted file mode 100644 index 28a411a..0000000 --- a/lisp/fg42/cubes/julia.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; JuliaCubes --- The Julia cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/julia-cube - "Julia integration for FG42." - :title "julia" - :flag-default t - :flag julia - - (fpkg/use julia-mode) - (fpkg/use julia-repl - :config - (add-hook 'julia-mode-hook 'julia-repl-mode)) - - (fpkg/use julia-formatter - :config - (require 'julia-formatter) - (add-hook 'julia-mode-hook #'julia-formatter-mode)) - (fpkg/use flycheck-julia) - (fpkg/use lsp-julia - :config - (add-hook 'julia-mode-hook #'lsp-mode))) - - -(provide 'fg42/cubes/julia) -;;; julia.el ends here diff --git a/lisp/fg42/cubes/keyboard.el b/lisp/fg42/cubes/keyboard.el deleted file mode 100644 index 3cfcda7..0000000 --- a/lisp/fg42/cubes/keyboard.el +++ /dev/null @@ -1,28 +0,0 @@ -;;; KeyboardCubes --- The keyboard related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: - -;; TODO: Add support for HALMAK layout - -(provide 'fg42/cubes/keyboard) -;;; keyboard.el ends here diff --git a/lisp/fg42/cubes/langtool.el b/lisp/fg42/cubes/langtool.el deleted file mode 100644 index 5b3097a..0000000 --- a/lisp/fg42/cubes/langtool.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; LangToolCube --- A language tool cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - -(defcube fg42/langtool-cube - "A Language Server for LanguageTool with support for LaTeX, Markdown, - and others. For more info checkout [[https://github.com/emacs-languagetool/lsp-ltex]]" - :title "Language tool Cube" - :flag language-tool - :flag-default t - - (let ((user (plist-get fg42/langtool-cube-params :username)) - (apikey (plist-get fg42/langtool-cube-params :api-key))) - (fpkg/use lsp-ltex - :hook (text-mode . (lambda () - (require 'lsp-ltex) - (lsp))) ; or lsp-deferred - :init - (setq lsp-ltex-version "15.2.0") - (when user - (setq lsp-ltex-languagetool-http-server-uri "https://api.languagetoolplus.com/") - (setq lsp-ltex-languagetool-org-username user) - (setq lsp-ltex-languagetool-org-api-key apikey))))) - -(provide 'fg42/cubes/langtool) -;;; langtool.el ends here diff --git a/lisp/fg42/cubes/mastodon.el b/lisp/fg42/cubes/mastodon.el deleted file mode 100644 index 67f0071..0000000 --- a/lisp/fg42/cubes/mastodon.el +++ /dev/null @@ -1,61 +0,0 @@ -;;; MastodonCube --- The Mastodon cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/mastodon-cube - "This cube provides an Emacs client for Mastodon. -Mastodon is a fediverse application and this cube enables *FG42* to interact -with a mastodon instance. - -Pass your instance url and user via =:instance-url= and =:user= keys to the -cube. - -For more info on check out [[https://codeberg.org/martianh/mastodon.el]]" - - :title "Mastodone Cube" - :flag mastodon - :flag-default nil - - (let ((url (or (plist-get fg42/mastodon-cube-params :instance-url) - (error "Instance url is empty set the `:instance-url' key"))) - (user (or (plist-get fg42/mastodon-cube-params :user) - (error "User is empty set the `:user' key")))) - - (fpkg/use mastodon - :config - (progn - (when-flag discover - (mastodon-discover)) - (setq mastodon-instance-url url - mastodon-active-user user))))) - - -(provide 'fg42/cubes/mastodon) -;;; mastodon.el ends here diff --git a/lisp/fg42/cubes/meissa.el b/lisp/fg42/cubes/meissa.el deleted file mode 100644 index 9076b11..0000000 --- a/lisp/fg42/cubes/meissa.el +++ /dev/null @@ -1,80 +0,0 @@ -;;; MeissaCube --- Meissa client for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) -(require 'fg42/x) - -(defcube fg42/meissa-cube - "Integrate FG42 with Meissa" - :title "Meissa cube" - :flag-default t - :flag meissa - - (fpkg/use msgpack) - - (autoload 'msgpack-encode "msgpack") - (let ((host (or (plist-get fg42/meissa-cube-params :host) "127.0.0.1")) - (port (or (plist-get fg42/meissa-cube-params :port) "6666"))) - - (defun fg42/meissa-sentinel (process event) - (message "[Meissa] %s: %s" process event)) - - (defun fg42/meissa-send-command (command payload cb) - (let* ((encoded-command (msgpack-encode `((command . ,command) (payload . ,payload)))) - (decoded-response nil) - (process (make-network-process :name "meissa-client" - :buffer "*Meissa*" - :host host - :service port - :family 'ipv4 - :coding 'binary - :filter (lambda (_process data) - (setq decoded-response - (msgpack-read-from-string data))) - ;;(lambda (_process _event) (delete-process process)) - :sentinel #'fg42/meissa-sentinel))) - (process-send-string process encoded-command) - (setq command-response-timer - (run-with-timer 1 nil - (lambda (cb) - (while (not decoded-response) - (accept-process-output process)) - (funcall cb decoded-response)) - cb)))) - - - (defun fg42/meissa-process-response (response) - (message "[Meissa]: %s" response)) - - (defun fg42/meissa-speech (txt) - (fg42/meissa-send-command "enqueue" `((text . ,txt)) #'fg42/meissa-process-response)) - - (defun read-this-for-me () - (interactive) - (fg42/meissa-speech (fg42/get-x11-selection-text))))) - - -(provide 'fg42/cubes/meissa) -;;; meissa.el ends here diff --git a/lisp/fg42/cubes/meson.el b/lisp/fg42/cubes/meson.el deleted file mode 100644 index 50b9bf8..0000000 --- a/lisp/fg42/cubes/meson.el +++ /dev/null @@ -1,42 +0,0 @@ -;;; MesonCube --- Meson Build Support for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/meson-cube - "This cube enables support for meson build files. - -For more info checkout [[https://github.com/wentasah/meson-mode]]" - :title "Meson cube" - :flag mesonbuild - :flag-default t - (fpkg/use meson-mode - :config - (progn - (when-flag company - (add-hook 'meson-mode-hook 'company-mode))))) - -(provide 'fg42/cubes/meson) -;;; meson.el ends here diff --git a/lisp/fg42/cubes/modeline.el b/lisp/fg42/cubes/modeline.el deleted file mode 100644 index 71b6a38..0000000 --- a/lisp/fg42/cubes/modeline.el +++ /dev/null @@ -1,158 +0,0 @@ -;;; ModelineCubes --- The modeline related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/cubes/iconspack) - -(autoload-cube 'fg42/statusbar-default - "modeline/statusbar-default.el" - "The default StatusBar modeline.") - -(defface fg42/-disabled-modeline-active-border - '((t - :background "#bd93f9" :height 0.1 :box nil)) - "A new face for modeline in active state." - :group 'fg42) - -(defface fg42/-disabled-modeline-dective-border - '((t - :background "#44475a" :height 0.1 :box nil)) - "A new face for modeline in active state." - :group 'fg42) - - -(defcube fg42/disable-modeline-cube - "This cube disables the default modeline and replaces it with a thin border" - :title "Disable Mode line" - :flag disable-modeline - :flag-default nil - (setq-default mode-line-format "") - (let ((face-remaps (default-value 'face-remapping-alist))) - (setf (alist-get 'mode-line face-remaps) - 'fg42/-disabled-modeline-active-border - (alist-get 'mode-line-inactive face-remaps) - 'fg42/-disabled-modeline-dective-border - (default-value 'face-remapping-alist) face-remaps))) - - -(defcube fg42/smart-mode-line-cube - "Smart mode line is a pretty simple yet fantastic alternative -to Emacs modeline." - :title "Smart modeline cube" - :flag smart-mode-line - :flag-default nil - - (fpkg/use smart-mode-line - :straight (smart-mode-line :source melpa) - :defer nil - :init - (progn - (require 'smart-mode-line) - (setq sml/theme 'respectful) - (setq sml/no-confirm-load-theme t) - (sml/setup)))) - - -;; TODO: Break this into two cubes -(defcube fg42/modeline-cube - "Modeline cube" - :title "Mini modeline" - :flag mini-mode-line - :group modeline - :flag-default nil - - (defun fg42/mini-modeline-setter (def) - (if (null def) - (let ((def-list (funcall def))) - (setq-default mini-modeline-l-format (plist-get def-list :long)) - (setq-default mini-modeline-r-format (plist-get def-list :brief))) - - (setq-default - mini-modeline-r-format - '("%e" - mode-line-front-space - mode-line-mule-info - mode-line-client - mode-line-modified - mode-line-remote - mode-line-frame-identification - mode-line-buffer-identification - mode-line-position - evil-mode-line-tag - ;; (:eval (string-trim (format-mode-line mode-line-modes))) - mode-line-misc-info )))) - - - (fpkg/use mini-modeline - :straight (mini-modeline :repo "kiennq/emacs-mini-modeline" - :host github - :type git) - :after smart-mode-line - :init - (progn - (require 'smart-mode-line) - (setq mini-modeline-enhance-visual nil) - (setq fg42/modeline-setter #'fg42/mini-modeline-setter)) - :defer nil - :config - (add-hook 'fg42/after-init-hook #'mini-modeline-mode) - (add-hook 'fg42/after-initializing-theme-hook - (lambda () - (custom-set-faces - '(mini-modeline-mode-line - ((((background light)) - :background "#aa0000" :height 0.1 :box nil) - (t - :background "#bd93f9" :height 0.1 :box nil)))))))) - - -(defcube fg42/statusbar-cube - "Status bar replaces the default mode line aned merges with -the mini buffer to provide a minimal interface for displaying -valuable information." - :title "Status bar cube" - :flag status-bar - :group modeline - :flag-default nil - - - (fg42/all-the-icons-cube) - - (defun fg42/statusbar-setter (def) - (unless (null def) - (setq-default fg42/statusbar-components - (plist-get (funcall def) :brief)) - (setq-default fg42/statusbar-components - (plist-get (funcall #'fg42/statusbar-default) :brief)))) - - (setq fg42/modeline-setter #'fg42/statusbar-setter) - - (add-hook 'fg42/after-init-hook - (lambda () - (require 'fg42/statusbar) - (fg42/statusbar-mode t)))) - - -(provide 'fg42/cubes/modeline) -;;; modeline.el ends here diff --git a/lisp/fg42/cubes/modeline/statusbar-default.el b/lisp/fg42/cubes/modeline/statusbar-default.el deleted file mode 100644 index abea81d..0000000 --- a/lisp/fg42/cubes/modeline/statusbar-default.el +++ /dev/null @@ -1,147 +0,0 @@ -;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fg42/modeline) -(require 'fg42/statusbar) - - -(defmacro fg42/percentage-face (value err warn) - "Return the correct face with repect to VALUE and the given -thresholds ERR adn WARN" - `(cond ((> ,value ,err) 'error) ((> ,value ,warn) 'warning) (t 'success))) - -(defbar-unit fg42/statusbar-battery 30 "B--" - (format "B%s" - (string-trim - (with-temp-buffer - (insert-file-contents "/sys/class/power_supply/BAT0/capacity") - (buffer-string))))) - - -(defbar-unit fg42/statusbar-memory 3 "M--S--" - (let* ((struct (string-trim - (shell-command-to-string "free -k|tail -n 2|awk '{printf(\"%s,%s,\", $3, $2)}'"))) - (vals (mapcar #'cl-parse-integer (butlast (split-string struct ",")))) - ;; TODO: Check for division by zero - (m (* 100 (/ (float(car vals)) (cadr vals)))) - ;; TODO: Check for division by zero - (s (* 100 (/ (float(caddr vals)) (cadddr vals)))) - (x )) - - (format - "M%sS%s" - (propertize (format "%02d" m) 'face (fg42/percentage-face m 90 75)) - (propertize (format "%02d" s) 'face (fg42/percentage-face s 90 75))))) - - -(defface fg42/statusbar-project-face - '((t :inherit font-lock-type-face :bold t)) - "Project name face on status bar" - :group 'fg42/statusbar) - -(defface fg42/statusbar-buffer-name-face - '((t :inherit font-lock-variable-name-face)) - "Buffer name face on status line" - :group 'fg42/statusbar) - - -(defun fg42/statusbar-project-name () - (when-flag projectile - (projectile-project-name))) - - -(defun fg42/statusbar-buffer-and-project () - (format "%s:%s" - (propertize (fg42/statusbar-project-name) 'face 'fg42/statusbar-project-face) - (propertize (buffer-name) 'face 'fg42/statusbar-buffer-name-face))) - -;; (defvar fg42/statusbar-git-branch "-") -;; (defvar fg42/statusbar--last-branch "-") - - -;; (defun fg42/statusbar-update-git-branch() -;; (message "eeoeeeeee") -;; (setq fg42/statusbar-git-branch -;; (shell-command-to-string "git symbolic-ref --short HEAD"))) - -;; (defun fg42/statusbar-setup-git-branch-updater () -;; ;;(add-function :after after-focus-change-function #'fg42/statusbar-update-git-branch) - -;; (add-hook 'window-configuration-change-hook (lambda () (message "window-configuration-change-hook"))) -;; (add-hook 'window-state-change-hook (lambda () (message "window-state-change-hook"))) - -;; (advice-add :after 'ace-select-window #'fg42/statusbar-update-git-branch) - -;; 'fg42/statusbar-git-branch) - - -(defmode-line fg42/statusbar-default - (list - :brief (list - ;;'(buffer-name) - ;;'fg42/statusbar-battery - - "|" - '(substring-no-properties (vc-mode vc-mode)) - "|" - '(fg42/statusbar-buffer-and-project) - "|" - 'fg42/statusbar-memory - "|" - '(format-mode-line "%03l:%02c") - - ;;'(format-time-string "%m-%d %H:%M") - ;; (let ((bar (format "%s" fg42/statusbar-memory))) (add-text-properties 0 (string-width bar) (cons 'face (cons '(:size 0.3) (or (get-text-property 0 'face bar) 'default-face))) bar) - ;; bar) - ) - :long " ") - ;; No GUI - - ) -;; The default modeline for FG42 WM that is compatible with -;; the FG42's status bar only -(defmode-line fg42/statusbar-default-wm - (progn - ;; We are in the graphical world - (require 'all-the-icons) - ;;(format "%s|%s|%s|%s|%s") - (list - :brief (list - ;;'(buffer-name) - ;;'fg42/statusbar-battery - - 'fg42/statusbar-memory - '(format-mode-line "%03l:%02c") - - ;;'(format-time-string "%m-%d %H:%M") - ;; (let ((bar (format "%s" fg42/statusbar-memory))) (add-text-properties 0 (string-width bar) (cons 'face (cons '(:size 0.3) (or (get-text-property 0 'face bar) 'default-face))) bar) - ;; bar) - ) - :long " ")) - ;; No GUI - - ) - - -(provide 'fg42/modeline/statusbar-default) -;;; statusbar-default.el ends here diff --git a/lisp/fg42/cubes/nix.el b/lisp/fg42/cubes/nix.el deleted file mode 100644 index 836e62e..0000000 --- a/lisp/fg42/cubes/nix.el +++ /dev/null @@ -1,43 +0,0 @@ -;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(->cube nix-mode - "Nix integration for FG42." - :mode "\\.nix\\'" - :config - (progn - (when-flag lsp - (require 'lsp) - (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix")) - (lsp-register-client - (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp")) - :major-modes '(nix-mode) - :server-id 'nix))))) - - -(provide 'fg42/cubes/nix) -;;; nix.el ends here diff --git a/lisp/fg42/cubes/noether.el b/lisp/fg42/cubes/noether.el deleted file mode 100644 index 7f213e8..0000000 --- a/lisp/fg42/cubes/noether.el +++ /dev/null @@ -1,46 +0,0 @@ -;;; ModelineCubes --- The modeline related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/cubes/iconspack) - - -(->cube noether - "Smart mode line is a pretty simple yet fantastic alternative -to Emacs modeline." - :straight (noether :repo "https://devheroes.codes/lxsameer/noether.git") - :init - (require 'noether) - (require 'noether-views) - (let ((views (or (plist-get fg42/noether-cube-params :views) - (list - noether-minimal-mode-line - noether-minimal-location - noether-minimal-exwm)))) - (setq noether-views views) - (noether-global-mode))) - - -(provide 'fg42/cubes/noether) -;;; noether.el ends here diff --git a/lisp/fg42/cubes/notifications.el b/lisp/fg42/cubes/notifications.el deleted file mode 100644 index 909eebe..0000000 --- a/lisp/fg42/cubes/notifications.el +++ /dev/null @@ -1,42 +0,0 @@ -;;; NotificationsCubes --- The Notifications cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - - -(defcube fg42/ednc-cube - "Notifications support for FG42." - :title "Notifications cube" - :flag ednc - :flag-default t - - (fpkg/use ednc - :defer t - :config - (require 'notifications) - (ednc-mode 1))) - -(provide 'fg42/cubes/notifications) -;;; notifications.el ends here diff --git a/lisp/fg42/cubes/org.el b/lisp/fg42/cubes/org.el deleted file mode 100644 index 342d28b..0000000 --- a/lisp/fg42/cubes/org.el +++ /dev/null @@ -1,231 +0,0 @@ -;;; OrgCube --- The org cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defflag org-journal - "Enable the support for org-journal in FG42." t) - - - - -(defcube fg42/org-ql-cube - "This package provides a query language for Org files. It offers two -syntax styles: Lisp-like sexps and search engine-like keywords. - -It includes three libraries: The ~org-ql~ library is flexible and may -be used as a backend for other tools. The libraries ~org-ql-search~ and -~helm-org-ql~ (a separate package) provide interactive search commands - and saved views. - -After installation, you can use the commands without additional configuration. -To use the functions and macros in your own Elisp code, use libraries ~org-ql~ -and ~org-ql-view~." - :title "Org Qurey Language" - :flag org-ql - :flag-default t - - (fpkg/use org-ql - :after org)) - - -(defcube fg42/org-super-agenda-cube - "This package lets you “supercharge” your Org daily/weekly agenda. The idea is -to group items into sections, rather than having them all in one big list. - -Now you can sort-of do this already with custom agenda commands, but when you -do that, you lose the daily/weekly aspect of the agenda: items are no longer -shown based on deadline/scheduled timestamps, but are shown no-matter-what. - -You can set your groups via the ~:groups~ parameter. Check out the code -for more parameters. - -For more information checkout [[https://github.com/alphapapa/org-super-agenda]]" - :title "Org Super Agenda" - :flag org-super-agenda - :flag-default t - - (defconst fg42/org-super-agenda-groups - nil) - - (let* ((params fg42/org-super-agenda-cube-params) - (groups (plist-get params :groups))) - (fpkg/use org-super-agenda - :after org-agenda - :init - (progn - (require 'org-super-agenda) - (setq org-agenda-skip-scheduled-if-done (or (plist-get params :skip-scheduled-if-done) t) - org-agenda-skip-deadline-if-done (or (plist-get params :skip-deadline-if-done) t) - org-agenda-include-deadlines (or (plist-get params :include-deadline) t) - org-agenda-block-separator (plist-get params :block-separator) - org-agenda-compact-blocks (or (plist-get params :compact-blocks) t) - org-agenda-start-day (plist-get params :start-day) ;; nil == today - org-agenda-span (or (plist-get params :span) 1) - org-agenda-start-on-weekday (plist-get params :start-on-week) - org-super-agenda-groups groups)) - :config - (org-super-agenda-mode)))) - - -(defcube fg42/org-sidebar - "This package presents helpful sidebars for Org buffers. Sidebars are customizable using -~org-ql~ queries and ~org-super-agenda~ grouping. - -The default sidebar includes a chronological list of scheduled and deadlined items in the -current buffer (similar to the Org agenda, but without all its features) at the top, and -a list of all other non-done to-do items below. If the buffer is narrowed, the sidebar only -shows items in the narrowed portion; this allows seeing an overview of tasks in a subtree." - - :title "Org Sidebar" - :flag org-sidebar - :flag-default t - - (let ((default-file (or (plist-get fg42/org-sidebar-params :default-file) "~/orgs/main.org")) - (fns (plist-get fg42/org-sidebar-params :sidebar-fns))) - - (defun fg42/org-sidebar--default (buf) - (let ((main-org-buf (get-buffer-create "*main-org*"))) - (with-current-buffer main-org-buf - (insert-file default-file)) - main-org-buf)) - - (defun fg42/org-sidebar-toggle-sidebar-default () - (interactive) - (message "here") - (org-sidebar #'fg42/org-sidebar--default)) - - (if-flag org-super-agenda - (if-flag org-ql - (fpkg/use org-sidebar - :init - (require 'org-sidebar) - (setq org-sidebar-default-fns fns) - :bind - (("" . fg42/org-sidebar-toggle-sidebar-default))) - (error "`fg42/org-ql-cube' is required for `fg42/org-sidebar'")) - (error "`fg42/org-sugper-agenda-cube' is required for `fg42/org-sidebar'")))) - - -(defcube fg42/org-cube - "A GNU Emacs major mode for keeping notes, authoring documents, computational notebooks, -literate programming, maintaining to-do lists, planning projects, and more — in a fast -and effective plain text system. - -This cube contains ~fg42/org-super-agenda-cube~, ~fg42/org-ql-cube~ and ~fg42/org-sidebar~ -cubes and you can pass parameters to them via ~:super-agenda~, ~:ql~ and ~:sidebar~ keys. - -For more info on ~org-mode~ check out [[https://orgmode.org/]]" - - :title "Org-mode" - :flag org - :flag-default t - - (let ((capture-key (or (plist-get fg42/org-cube-params :capture-key) - (kbd ""))) - (org-home (or (plist-get fg42/org-cube-params :org-home) "~/orgs")) - (notes-file (or (plist-get fg42/org-cube-params :org-home) "~/orgs/notes.org")) - (journal-header (or (plist-get fg42/org-cube-params :journal-header) fg42/default-org-journal-heder)) - (journal-type (or (plist-get fg42/org-cube-params :journal-type) 'yearly)) - (global-tags (plist-get fg42/org-cube-params :global-tags)) - (agenda-files (or (plist-get fg42/org-cube-params :agenda-files) '("~/orgs/main.org")))) - - (fpkg/use org-bullets - :hook (org-mode . org-bullets-mode)) - - (fg42/org-super-agenda-cube (plist-get fg42/org-cube-params :super-agenda)) - (fg42/org-ql-cube) - (fg42/org-sidebar) - - (when-flag org-journal - ;; This function will handle the org-capture integration only if org-journal - ;; flag is set - (defun fg42/org-journal-find-location () - ;; Open today's journal, but specify a non-nil prefix argument in order to - ;; inhibit inserting the heading; org-capture will insert the heading. - (org-journal-new-entry t) - (unless (eq org-journal-file-type 'daily) - (org-narrow-to-subtree)) - (goto-char (point-max))) - - (fpkg/use org-journal - :defer t - :init - (require 'org-journal) - ;; Change default prefix key; needs to be set before loading org-journal - (setq org-journal-prefix-key "C-c j ") - :config - (setq org-journal-file-type journal-type - org-journal-file-header journal-header - org-journal-dir (expand-file-name "journal" org-home) - org-journal-date-format "%Y-%m-%d (%A): "))) - - - (fpkg/use org - :init - (progn - (require 'org) - (require 'org-capture) - (global-set-key capture-key 'org-capture) - (setq org-tag-alist global-tags) - (setq org-agenda-files agenda-files) - (setq org-directory org-home) - (setq org-default-notes-file notes-file) - (setq org-capture-templates - (eval - `(list - '("t" "Todo" entry (file+headline ,(expand-file-name "main.org" org-home) "New Tasks") - (file ,(expand-file-name "templates/todo" org-home)) - :prepend t) - '("l" "Link" entry (file+headline ,(expand-file-name "bookmarks.org" org-home) "Links") - (file ,(expand-file-name "templates/links" org-home)) - :prepend t - :immediate-finish t - :empty-lines 1) - ,@(when-flag org-journal - '((quote ("j" "Journal Entry" plain #'fg42/org-journal-find-location - "** %(format-time-string org-journal-time-format)%^{Title} %^G\n %?\n\n*** Context:\n %i\n From: %a" - :jump-to-captured t - :immediate-finish nil)))) - - '("h" "Thoughts" entry (file+datetree ,(expand-file-name "journal.org" org-home)) - (file ,(expand-file-name "templates/thoughts" org-home)))))) - (setq org-refile-targets '((org-agenda-files :maxlevel . 3))) - - (with-eval-after-load "ox-latex" - (setq org-latex-default-packages-alist - (append '(("hidelinks" "hyperref" nil)) - org-latex-default-packages-alist))) - - (unless (server-running-p) - (require 'org-protocol)))))) - - -(provide 'fg42/cubes/org) -;;; org.el ends here diff --git a/lisp/fg42/cubes/project.el b/lisp/fg42/cubes/project.el deleted file mode 100644 index 010937e..0000000 --- a/lisp/fg42/cubes/project.el +++ /dev/null @@ -1,55 +0,0 @@ -;;; ProjectCubes --- The project management cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/projectile-cube - "Projectile Cube" - :title "fg42/cubes/fg42/projectile-cube.org" - :flag projectile - :flag-default t - - (let ((project-dirs (or (plist-get fg42/projectile-cube-params :project-dirs) - ()))) - (fpkg/use projectile - :init - (require 'projectile) - (projectile-mode +1) - :config - (progn - ;; We don't want the auto discovery on startup - (setq projectile-auto-discover nil) - (setq projectile-enable-caching t) - (setq projectile-project-search-path project-dirs)) - :bind (:map projectile-mode-map - ("s-p" . projectile-command-map) - ("C-c p" . projectile-command-map))) - - (fpkg/use projectile-ripgrep - :after projectile))) - - -(provide 'fg42/cubes/project) -;;; project.el ends here diff --git a/lisp/fg42/cubes/proof.el b/lisp/fg42/cubes/proof.el deleted file mode 100644 index 31423a8..0000000 --- a/lisp/fg42/cubes/proof.el +++ /dev/null @@ -1,49 +0,0 @@ -;;; ProofGeneralCube --- ProofGeneral support for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - - -(defcube fg42/proof-general-cube - "Integrate Proof General with Fg42" - :title "Proof General cube" - :flag-default nil - :flag proof-general - - (fpkg/use proof-general) - (fpkg/use company-coq - :config (add-hook 'coq-mode-hook #'company-coq-mode))) - - -(->cube idris-mode - "Add support for the Idris programming language to FG42. -For more info checkout [[https://github.com/idris-hackers/idris-mode]]" - :config - (require 'flycheck-idris) - (add-hook 'idris-mode-hook #'flycheck-mode)) - - -(provide 'fg42/cubes/proof) -;;; proof.el ends here diff --git a/lisp/fg42/cubes/python.el b/lisp/fg42/cubes/python.el deleted file mode 100644 index d207f22..0000000 --- a/lisp/fg42/cubes/python.el +++ /dev/null @@ -1,142 +0,0 @@ -;;; PythonCubes --- The Python cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - - -(defun fg42/py-workon-project-venv () - "Call pyenv-workon with the current projectile project name. -This will return the full path of the associated virtual -environment found in $WORKON_HOME, or nil if the environment does -not exist." - (require 'pyenv) - (let ((pname (projectile-project-name))) - (pyvenv-workon pname) - (if (file-directory-p pyvenv-virtual-env) - pyvenv-virtual-env - (pyvenv-deactivate)))) - - -(defun fg42/py-auto-lsp () - "Turn on lsp mode in a Python project with some automated logic. -Try to automatically determine which pyenv virtual environment to -activate based on the project name, using -`dd/py-workon-project-venv'. If successful, call `lsp'. If we -cannot determine the virtualenv automatically, first call the -interactive `pyvenv-workon' function before `lsp'" - (interactive) - (let ((pvenv (fg42/py-workon-project-venv))) - (if pvenv - (lsp) - (progn - (call-interactively #'pyvenv-workon) - (lsp))))) - -(defcube fg42/python-black-cube - "This cube reformats python code using black formatter tool." - :title "Python lang server via pyls" - :flag python-black - :flag-default t - - (fpkg/use python-black - :demand t - :after python - :hook (python-mode . (lambda () - (python-black-on-save-mode))))) - -(defcube fg42/python-cube-pyls - "Python language server using pyls" - :title "Python lang server via pyls" - :flag python-pyls - :flag-default nil - - (when-flag lsp - (with-eval-after-load "lsp" - (lsp-register-custom-settings - '(("pyls.plugins.pyls_mypy.enabled" t t) - ("pyls.plugins.flake8.enabled" t t) - ("pyls.plugins.pyls_mypy.live_mode" nil t) - ("pyls.plugins.pyls_black.enabled" t t) - ("pyls.plugins.pyls_isort.enabled" t t))) - (add-hook 'python-mode #'fg42/py-auto-lsp)))) - - -(defcube fg42/python-cube-pyright - "Python language server using pyright." - :title "Python lang server via pyright" - :flag python-pyright - :flag-default t - - (fpkg/use lsp-pyright - :after (python lsp-mode) - :hook - (python-mode . (lambda () - (setq lsp-lens-enable nil) - ;; Pyls and pylsp can be annoying - (add-to-list 'lsp-disabled-clients 'pyls) - (add-to-list 'lsp-disabled-clients 'pylsp) - ;;(fg42/py-auto-lsp) - (require 'lsp-pyright) - (lsp))))) - -(defcube fg42/poetry-cube - "Poetry support for FG42. To use it, just use `M-x poetry'." - :title "Poetry cube" - :flag poetry - :flag-default t - - (fpkg/use poetry - :config - (poetry-tracking-mode 1))) - - -(defcube fg42/python-cube - "Python support cube." - :title "Python cube" - :flag python - :flag-default t - - (fpkg/use pyvenv - :defer t - :after python - :custom - (pyvenv-workon "env") - :hook - ((python-mode-hook . pyvenv-mode) - (pyvenv-post-activate-hooks . pyvenv-restart-python) - (pyvenv-post-deactivate-hooks . pyvenv-restart-python))) - - (fpkg/use pyenv-mode - :after python - :hook - (python-mode-hook . pyenv-mode)) - - (fg42/python-black-cube) - (fg42/python-cube-pyls) - (fg42/python-cube-pyright)) - - -(provide 'fg42/cubes/python) -;;; python.el ends here diff --git a/lisp/fg42/cubes/region-expansion.el b/lisp/fg42/cubes/region-expansion.el deleted file mode 100644 index f86671e..0000000 --- a/lisp/fg42/cubes/region-expansion.el +++ /dev/null @@ -1,36 +0,0 @@ -;;; RegionExpansionCube --- The elisp cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/region-expansion-cube - "RE cube" - :title "Region Expansion Cube" - - (fpkg/use expand-region - :bind ("C-=" . er/expand-region))) - -(provide 'fg42/cubes/region-expansion) -;;; region-expansion.el ends here diff --git a/lisp/fg42/cubes/rigel.el b/lisp/fg42/cubes/rigel.el deleted file mode 100644 index 2191d0a..0000000 --- a/lisp/fg42/cubes/rigel.el +++ /dev/null @@ -1,58 +0,0 @@ -;;; RigelCube --- Rigel client for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/rigel-cube - "This is a [Rigel](https://devheroes.codes/lxsameer/Orion/src/branch/master/rigel) -for *FG42*. Refer to *Rigel* docs to set it up. - -This cube exposes few functions that interact with regel. Checkout the docstrings of -functions in `fg42/rigel/` namespace. For example `fg42/rigel/read` function." - :title "rigel Cube" - :flag rigel - :flag-default t - - - (autoload-cube - 'fg42/rigel/read - "rigel/core.el" - "Send the given text to the Rigel server to read it out load" t) - (autoload-cube - 'fg42/rigel/read-region - "rigel/core.el" - "Send the text of selected region to the Rigel server to read it out load" t) - - (autoload-cube - 'fg42/rigel/read-clipboard - "rigel/core.el" - "Send the text from the clipboadr to the Rigel server to read it out load" t) - - (defun fg42/rigel/-sentinel (process event) - (message "[Rigel] %s" event))) - - -(provide 'fg42/cubes/rigel) -;;; rigel.el ends here diff --git a/lisp/fg42/cubes/rigel/core.el b/lisp/fg42/cubes/rigel/core.el deleted file mode 100644 index e0d240e..0000000 --- a/lisp/fg42/cubes/rigel/core.el +++ /dev/null @@ -1,105 +0,0 @@ -;;; RigelCube --- Rigel client for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'bindat) -(eval-when-compile - (defvar fg42/rigel-cube-params)) - -(defconst fg42/rigel/protocol - (bindat-type (len uint 32) (payload str (+ 32 len)))) - -(defvar fg42/rigel/client-process nil - "The process for the client.") - -(defvar fg42/rigel/host (or (plist-get fg42/rigel-cube-params :host) "127.0.0.1") - "The hostname or ip address of the Rigel server.") - -(defvar fg42/rigel/port (or (plist-get fg42/rigel-cube-params :port) "6666") - "The port number of the target Rigel server.") - - -(defun fg42/rigel/-pack-struct (str) - "Pack the given STR in an alist representing a message." - (list (cons 'len (length (eval str))) (cons 'payload (eval str)))) - - -(defun fg42/rigel/-pack (str) - "Pack the give STR into binary format according to the `fg42/rigel/protocol' - protocol." - (bindat-pack fg42/rigel/protocol (fg42/rigel/-pack-struct str))) - - -(defun fg42/rigel/-sentinel (process event) - (message "[Rigel] %s: %s" process event)) - - -(defun fg42/rigel/-connect () - (when (null fg42/rigel/client-process) - (message "[Rigel] Connecting to server at %s:%s" fg42/rigel/host fg42/rigel/port) - (setq fg42/rigel/client-process - (make-network-process - :name "rigel-client" - :type nil - :server nil - :host fg42/rigel/host - :service fg42/rigel/port - :nowait t - :buffer (get-buffer-create "*Rigel*") - :sentinel 'fg42/rigel/-sentinel)))) - - -(defun fg42/rigel/close () - "Shutdown the Rigel client" - (interactive) - (message "[Rigel] Status: %s" (process-status "rigel-client")) - (when (process-status "rigel-client") - (process-send-string fg42/rigel/client-process (fg42/rigel/-pack "//close")) - (stop-process fg42/rigel/client-process)) - (setq fg42/rigel/client-process nil) - (kill-buffer "*Rigel*")) - - -(defun fg42/rigel/read (txt) - "Send the given text to the Rigel server to read it out load" - (interactive "sRead: ") - (fg42/rigel/-connect) - (process-send-string fg42/rigel/client-process (fg42/rigel/-pack txt))) - - -(defun fg42/rigel/read-region (beg end) - "Send the text of selected region to the Rigel server to read it out load" - (interactive (if (use-region-p) - (list (region-beginning) (region-end)) - (list nil nil))) - (fg42/rigel/read - (if (and beg end) (buffer-substring-no-properties beg end) ""))) - -(defun fg42/rigel/read-clipboard () - "Send the text from the clipboadr to the Rigel server to read it out load" - (interactive) - (fg42/rigel/read - (or (current-kill 0) ""))) - - -(provide 'fg42/cubes/rigel/core) -;;; core.el ends here diff --git a/lisp/fg42/cubes/rust.el b/lisp/fg42/cubes/rust.el deleted file mode 100644 index 157ccc3..0000000 --- a/lisp/fg42/cubes/rust.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; RustCube --- The rust cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/rust-cube - "This cube provides rust support for FG42. -If the =lsp= flag is set it is going to use the =rust-analyzer= -as the LSP server so it has to be installed on the host OS. - -For more info on check out [[https://rust-analyzer.github.io]]" - :title "Rust Cube" - :flag rust - :flag-default t - - (fpkg/use rustic - :bind (:map rustic-mode-map - ("M-j" . lsp-ui-imenu) - ("M-?" . lsp-find-references) - ("C-c C-c l" . flycheck-list-errors) - ("C-c C-c a" . lsp-execute-code-action) - ("C-c C-c r" . lsp-rename) - ("C-c C-c q" . lsp-workspace-restart) - ("C-c C-c Q" . lsp-workspace-shutdown) - ("C-c C-c s" . lsp-rust-analyzer-status)) - :config - ;; uncomment for less flashiness - ;; (setq lsp-eldoc-hook nil) - ;; (setq lsp-enable-symbol-highlighting nil) - ;; (setq lsp-signature-auto-activate nil) - - ;; comment to disable rustfmt on save - (setq rustic-format-on-save t) - )) - - -(provide 'fg42/cubes/rust) -;;; rust.el ends here diff --git a/lisp/fg42/cubes/scheme.el b/lisp/fg42/cubes/scheme.el deleted file mode 100644 index a2745b3..0000000 --- a/lisp/fg42/cubes/scheme.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; SchemeCube --- Scheme support cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/guile-cube - "This cube adds supports for GNU Guile Scheme via =emacs-lsp-scheme= library. -For more info checkout [[https://codeberg.org/rgherdt/emacs-lsp-scheme]]" - :title "Scheme Cube" - :flag scheme - :flag-default t - - (fg42/rainbow-delimiters-cube) - (fg42/paredit-cube) - - (fpkg/use lsp-scheme - :hook (scheme-mode . lsp-scheme-guile) - :config - (add-hook 'scheme-mode-hook #'lsp-scheme) - (setq lsp-scheme-implementation "guile"))) - - -(provide 'fg42/cubes/scheme) -;;; scheme.el ends here diff --git a/lisp/fg42/cubes/snippets.el b/lisp/fg42/cubes/snippets.el deleted file mode 100644 index 6a48b20..0000000 --- a/lisp/fg42/cubes/snippets.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; JavaCubes --- The Java cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - -(defcube fg42/yasnippet-cube - "Yasnippet cube" - :title "fg42/cubes/fg42/yasnippet-cube.org" - :flag yasnippet - :flag-default t - - (fpkg/use yasnippet-snippets) - - (fpkg/use yasnippet - :init - (require 'yasnippet) - (let* ((snippet-home (expand-file-name "snippets" - (file-name-directory (locate-library "yasnippet-snippets")))) - (local-snippet (expand-file-name - "lisp/fg42/cubes/snippets" fg42-home)) - (user-snippets (or (plist-get fg42/yasnippet-cube-params :snippets-dir) - ;; Just to make sure that we don't return nil. Since - ;; yas-snippet-dirs shoud not contain nil value - local-snippet))) - - (setq yas-snippet-dirs `(,user-snippets ,local-snippet ,snippet-home)) - (yas-global-mode 1)))) - - -(provide 'fg42/cubes/snippets) -;;; snippets.el ends here diff --git a/lisp/fg42/cubes/terminal.el b/lisp/fg42/cubes/terminal.el deleted file mode 100644 index 4d3bda2..0000000 --- a/lisp/fg42/cubes/terminal.el +++ /dev/null @@ -1,41 +0,0 @@ -;;; TerminalCubes --- The terminal related cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - -(defcube fg42/vterm-cube - "Vterm cube" - :title "VTerm Cube" - :flag vterm - (let ((_shell (or (plist-get fg42/vterm-cube-params :shell) - (getenv "SHELL")))) - (fpkg/use vterm - :init - (progn - (require 'vterm) - (setq vterm-shell _shell))))) - - -(provide 'fg42/cubes/terminal) -;;; terminal.el ends here diff --git a/lisp/fg42/cubes/terraform.el b/lisp/fg42/cubes/terraform.el deleted file mode 100644 index 5309baa..0000000 --- a/lisp/fg42/cubes/terraform.el +++ /dev/null @@ -1,57 +0,0 @@ -;;; Terraform --- The terraform cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a -;; unit which defines different abilities in a deterministic and idempotent -;; way. Cubes are composable and a composition of cubes creates an editor. -;; -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/terraform-cube - "terraform cube" - :title "fg42/cubes/fg42/terraform-cube.org" - :flag terraform - :flag-default t - - ;; https://github.com/juliosueiras/terraform-lsp is required - (let ((terraform-lsp (or (plist-get fg42/terraform-cube-params :terraform-lsp-path) "terraform-lsp")) - (lsp-flags (or (plist-get fg42/terraform-cube-params :terraform-lsp-flags) "-enable-log-file"))) - (fpkg/use terraform-mode - :config - (progn - (when-flag lsp - (require 'lsp) - (add-to-list 'lsp-language-id-configuration '(terraform-mode . "terraform")) - - (lsp-register-client - (make-lsp-client :new-connection (lsp-stdio-connection (list terraform-lsp lsp-flags)) - :major-modes '(terraform-mode) - :server-id 'terraform-ls)) - - (add-hook 'terraform-mode-hook #'lsp)))))) - - -(provide 'fg42/cubes/terraform) -;;; terraform.el ends here diff --git a/lisp/fg42/cubes/themes.el b/lisp/fg42/cubes/themes.el deleted file mode 100644 index 8702d3f..0000000 --- a/lisp/fg42/cubes/themes.el +++ /dev/null @@ -1,71 +0,0 @@ -;;; Themes --- The common cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) -(require 'fg42/themes) - - -(defcube fg42/dracula-theme-cube - "Replace this with a theme cube" - :title "Dracula theme" - :flag dracula-theme - :flag-default t - :ui-hook (lambda () - (fpkg/use dracula-theme - :init - (fg42/setup-theme - (require 'dracula-theme) - (load-theme 'dracula t) - (custom-theme-set-faces - 'dracula - '(match ((t (:background "#44475a")))) - '(all-the-icons-lgreen ((t (:background "#bd93f9")))) - '(all-the-icons-faicon ((t (:background "#bd93f9")))) - '(font-lock-comment-face ((t (:foreground "#8B9298")))) - ;; This fixes lsp-ui-sideline issue - '(lsp-ui-sideline-current-symbol ((t (:line-width -1 :foreground "#bd93f9")))) - '(font-lock-comment-delimiter-face ((t (:foreground "#5B6268"))))) - (enable-theme 'dracula) - (set-face-attribute 'region nil :background "#888"))))) - - -(defcube fg42/badwolf-theme-cube - "Badwolf theme cube. An Emacs port of Bad Wolf theme for Vim. -https://emacsthemes.com/themes/badwolf-theme.html" - :title "Badwolf theme" - :flag badwolf-theme - :flag-default nil - :ui-hook (lambda () - (fpkg/use badwolf-theme - :init - (fg42/setup-theme - (load-theme 'badwolf t) - (custom-theme-set-faces - 'badwolf) - (enable-theme 'badwolf))))) - - -(provide 'fg42/cubes/themes) -;;; themes.el ends here diff --git a/lisp/fg42/cubes/verilog.el b/lisp/fg42/cubes/verilog.el deleted file mode 100644 index 291e0f4..0000000 --- a/lisp/fg42/cubes/verilog.el +++ /dev/null @@ -1,67 +0,0 @@ -;;; PythonCubes --- The Python cubes for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) -(require 'fg42/utils) - - -(->cube verilog-mode - "Add support for verilog and system verilog to FG42. More info at -https://www.veripool.org/verilog-mode/") - -(->cube verilog-ext - "This package provides useful extensions on top of `verilog-mode' and `verilog-ts-mode'." - :hook ((verilog-mode . verilog-ext-mode)) - :init - (setq verilog-ext-eglot-default-server 've-svls) - (setq verilog-ext-feature-list - '(font-lock - xref - capf - hierarchy - eglot - lsp - flycheck - beautify - navigation - template - formatter - compilation - imenu - which-func - hideshow - typedefs - time-stamp - block-end-comments - ports)) - :config - (require 'pkg-info) - (setq verilog-ext-eglot-default-server 've-svls) - (setq verilog-ext-lsp-mode-default-server 've-svls) - (verilog-ext-eglot-set-server 've-svls) - (verilog-ext-lsp-set-server 've-svls) - (verilog-ext-mode-setup)) - -(provide 'fg42/cubes/verilog ) -;;; verilog.el ends here diff --git a/lisp/fg42/cubes/wm.el b/lisp/fg42/cubes/wm.el deleted file mode 100644 index baacd3f..0000000 --- a/lisp/fg42/cubes/wm.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; WMCube --- The elisp cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/flags) -(require 'fg42/cube) -(require 'fg42/utils) - -(autoload-cube 'fg42/initialize-wm "wm/core.el" "Initalize the WM mode.") - -(defflag wm - "The flag to enable WM mode in FG42.") - - -(defcube fg42/wm-cube - "This cube will setup *FG42* to act as a window manager." - :title "Window manager cube" - :no-flag t - - - (when-wm - (message "[WM] Initilizing...") - (fpkg/use exwm) - (fg42/initialize-wm)) - ;; (if-flag wm - ;; (error "[SKIP] WM flag is not active")) - ) - -(provide 'fg42/cubes/wm) -;;; wm.el ends here diff --git a/lisp/fg42/cubes/wm/core.el b/lisp/fg42/cubes/wm/core.el deleted file mode 100644 index 6719c87..0000000 --- a/lisp/fg42/cubes/wm/core.el +++ /dev/null @@ -1,161 +0,0 @@ -;;; WMCube --- The elisp cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://devheroes.codes/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fg42/flags) - -(defun wm-randr () - "RandR support for wm." - (when-wm - (require 'exwm-randr) - (setq exwm-randr-workspace-output-plist '(0 "HDMI-1" - 1 "HDMI-1" - 2 "HDMI-1" - 3 "HDMI-1" - 4 "HDMI-1" - 5 "HDMI-1" - 6 "eDP-1" - 7 "HDMI-1" - 8 "HDMI-1" - 9 "HDMI-1")) - (add-hook 'exwm-randr-screen-change-hook - (lambda () - (start-process-shell-command - "xrandr" nil "xrandr --output HDMI-1 --above eDP-1 --mode 1920x1080"))) - (exwm-randr-enable))) - - -(defun fg42/initialize-wm () - "Initilize EXWM window manager with the given PARAMS." - (interactive) - - (require 'exwm) - (require 'exwm-config) - (require 'exwm-systemtray) - - (exwm-config-ido) - - ;; Set the initial number of workspaces (they can also be created later). - (setq exwm-workspace-number 10) - - ;; All buffers created in EXWM mode are named "*EXWM*". You may want to - ;; change it in `exwm-update-class-hook' and `exwm-update-title-hook', which - ;; are run when a new X window class name or title is available. Here's - ;; some advice on this topic: - ;; + Always use `exwm-workspace-rename-buffer` to avoid naming conflict. - ;; + For applications with multiple windows (e.g. GIMP), the class names of - ;; all windows are probably the same. Using window titles for them makes - ;; more sense. - ;; In the following example, we use class names for all windows except for - ;; Java applications and GIMP. - (add-hook 'exwm-update-class-hook - (lambda () - (unless (or (string-prefix-p "sun-awt-X11-" exwm-instance-name) - (string= "gimp" exwm-instance-name)) - (exwm-workspace-rename-buffer exwm-class-name)))) - - (add-hook 'exwm-update-title-hook - (lambda () - (when (or (not exwm-instance-name) - (string-prefix-p "sun-awt-X11-" exwm-instance-name) - (string= "gimp" exwm-instance-name)) - (exwm-workspace-rename-buffer exwm-title)))) - - ;; Global keybindings can be defined with `exwm-input-global-keys'. - ;; Here are a few examples: - (setq exwm-input-global-keys - `( - - ;; Bind "s-r" to exit char-mode and fullscreen mode. - ([?\s-r] . exwm-reset) - ([?\s-g] . keyboard-quit) - ([8388640] . other-window) - ;; Bind "s-w" to switch workspace interactively. - ([?\s-w] . exwm-workspace-switch) - ;; Bind "s-0" to "s-9" to switch to a workspace by its index. - ,@(mapcar (lambda (i) - `(,(kbd (format "s-%d" i)) . - (lambda () - (interactive) - (exwm-workspace-switch-create ,i)))) - (number-sequence 0 9)) - ;; Bind "s-&" to launch applications ('M-&' also works if the output - ;; buffer does not bother you). - ([?\s-d] . (lambda (command) - (interactive (list (read-shell-command "$ "))) - (start-process-shell-command command nil command))) - ;; Bind "s-" to "slock", a simple X display locker. - ([s-f2] . (lambda () - (interactive) - (start-process "" nil "/usr/bin/slock"))))) - ;; To add a key binding only available in line-mode, simply define it in - ;; `exwm-mode-map'. The following example shortens 'C-c q' to 'C-q'. - (define-key exwm-mode-map [?\C-q] #'exwm-input-send-next-key) - - (push ?\C-c exwm-input-prefix-keys) - - ;; The following example demonstrates how to use simulation keys to mimic - ;; the behavior of Emacs. The value of `exwm-input-simulation-keys` is a - ;; list of cons cells (SRC . DEST), where SRC is the key sequence you press - ;; and DEST is what EXWM actually sends to application. Note that both SRC - ;; and DEST should be key sequences (vector or string). - (setq exwm-input-simulation-keys - `( - ;; movement - (,(kbd "C-b") . left) - (,(kbd "M-b") . ,(kbd "C-")) - (,(kbd "C-f") . right) - (,(kbd "M-f") . ,(kbd "C-")) - (,(kbd "C-p") . up) - (,(kbd "C-n") . down) - (,(kbd "C-a") . home) - (,(kbd "C-e") . end) - (,(kbd "M-v") . prior) - (,(kbd "C-v") . next) - (,(kbd "C-d") . delete) - ;;(,(kbs "C-k") . [S-end delete]) - ;; navigation - (,(kbd "C-c b") . ,(kbd "M-")) - (,(kbd "C-c f") . ,(kbd "M-")) - (,(kbd "C-c w") . ,(kbd "C-w")) - (,(kbd "C-w") . ,(kbd "C-x")) - (,(kbd "M-w") . ,(kbd "C-c")) - (,(kbd "C-y") . ,(kbd "C-v")) - ;; search - (,(kbd "C-s") . ,(kbd "C-f")))) - - ;; You can hide the minibuffer and echo area when they're not used, by - ;; uncommenting the following line. - ;;(setq exwm-workspace-minibuffer-position 'bottom) - - ;; Do not forget to enable EXWM. It will start by itself when things are - ;; ready. You can put it _anywhere_ in your configuration. - (exwm-enable) - (exwm-systemtray-enable) - (wm-randr) - ;; (with-flag nlinum - ;; (add-hook 'exwm-mode-hook 'disable-nlinum)) - ) - - -(provide 'fg42/cubes/wm/core) -;;; core.el ends here diff --git a/lisp/fg42/cubes/zig.el b/lisp/fg42/cubes/zig.el deleted file mode 100644 index 849fdcf..0000000 --- a/lisp/fg42/cubes/zig.el +++ /dev/null @@ -1,43 +0,0 @@ -;;; ZigCube --- The Zig cube for FG42 -*- lexical-binding: t; -*- -;; -;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors -;; -;; Author: Sameer Rahmani -;; URL: https://ziglab.com/FG42/FG42 -;; Version: 4.0.0 -;; -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . -;; -;;; Commentary: -;;; Code: -(require 'fpkg) -(require 'fg42/cube) - - -(defcube fg42/zig-cube - "This cube integrates *zig* into *FG42*." - :title "Zig Cube" - :flag zig - :flag-default t - - (fpkg/use zig-mode - :mode ("\\.zig?\\'" . zig-mode)) - - (when-flag lsp - (let ((zls-path (or (plist-get fg42/zig-cube-params :zls) "zls"))) - (setq lsp-zig-zls-executable zls-path)))) - - -(provide 'fg42/cubes/zig) -;;; zig.el ends here