forked from FG42/FG42
Refactor the defcube macro to start the body with the splated props
This commit is contained in:
parent
d65037f57f
commit
fa0c5765eb
|
@ -27,9 +27,9 @@
|
|||
|
||||
(defcube fg42/agda-cube
|
||||
"Integrate Agda-mode with Fg42"
|
||||
(:title "Agda cube"
|
||||
:title "Agda cube"
|
||||
:flag-default t
|
||||
:flag agda)
|
||||
:flag agda
|
||||
(load-file
|
||||
(let* ((coding-system-for-read 'utf-8)
|
||||
(home (getenv "HOME"))
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
(defcube fg42/flycheck-cube
|
||||
"This cube adds the `flycheck' support to fg42."
|
||||
(:title "Flycheck cube"
|
||||
:title "Flycheck cube"
|
||||
:flag flycheck
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use flycheck
|
||||
:defer ()
|
||||
:init
|
||||
|
@ -37,16 +37,16 @@
|
|||
|
||||
(defcube fg42/yaml-cube
|
||||
"Yaml Support"
|
||||
(:title "Yaml Support"
|
||||
:no-flag t)
|
||||
:title "Yaml Support"
|
||||
:no-flag t
|
||||
(fpkg/use yaml-mode))
|
||||
|
||||
|
||||
(defcube fg42/lsp-cube
|
||||
"LSP cube"
|
||||
(:title "LSP cube"
|
||||
:title "LSP cube"
|
||||
:flag lsp
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use lsp-mode
|
||||
:commands lsp
|
||||
|
@ -66,9 +66,9 @@
|
|||
|
||||
(defcube fg42/company-cube
|
||||
"Auto complete using company mode"
|
||||
(:title "Company cube"
|
||||
:title "Company cube"
|
||||
:flag company
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use company
|
||||
:bind (:map company-active-map
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
(defcube fg42/bookmark-cube
|
||||
"bookmark cube"
|
||||
(:title "cubes/fg42/bookmark-cube.org"
|
||||
:title "cubes/fg42/bookmark-cube.org"
|
||||
:flag bookmark
|
||||
:flag-default t)
|
||||
: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-["))
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
"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"
|
||||
:title "Clojure cube"
|
||||
:flag clojure
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use aggressive-indent-mode
|
||||
:config (paredit-mode +1))
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
(defcube fg42/cmake-cube
|
||||
"This cube enables CMake integration with FG42"
|
||||
(:title "CMake cube"
|
||||
:title "CMake cube"
|
||||
:flag-default t
|
||||
:flag cmake)
|
||||
:flag cmake
|
||||
|
||||
(fpkg/use cmake-mode)
|
||||
(fpkg/use eldoc-cmake))
|
||||
|
@ -39,16 +39,17 @@
|
|||
(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"
|
||||
:title "Ninja cube"
|
||||
:flag-default t
|
||||
:flag ninja)
|
||||
:flag ninja
|
||||
(fpkg/use ninja-mode))
|
||||
|
||||
|
||||
(defcube fg42/c++-cube
|
||||
"C++ cube"
|
||||
(:title "C++ cube"
|
||||
:no-flag t)
|
||||
:title "C++ cube"
|
||||
:no-flag t
|
||||
|
||||
(fg42/cmake-cube)
|
||||
(fg42/ninja-cube)
|
||||
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
"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"
|
||||
:title "Folding cube"
|
||||
:flag folding
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use origami
|
||||
:bind
|
||||
(("C-c TAB" . origami-toggle-node))
|
||||
|
@ -89,9 +89,9 @@ contextual information."
|
|||
|
||||
(defcube fg42/pinentry-cube
|
||||
"Pinentry cube with setup the =pinentry= program to be used within FG42."
|
||||
(:title "Pinentry cube"
|
||||
:title "Pinentry cube"
|
||||
:flag pinentry
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use pinentry
|
||||
:init
|
||||
(progn
|
||||
|
@ -101,9 +101,9 @@ contextual information."
|
|||
|
||||
(defcube fg42/imenu-cube
|
||||
"Imenu support"
|
||||
(:title "Imenu cube"
|
||||
:title "Imenu cube"
|
||||
:flag imenu
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use imenu-list
|
||||
:init
|
||||
(global-set-key (kbd "C-'") #'imenu-list-smart-toggle)))
|
||||
|
@ -111,34 +111,34 @@ contextual information."
|
|||
|
||||
(defcube fg42/alert-cube
|
||||
"alert support"
|
||||
(:title "Alert cube"
|
||||
:title "Alert cube"
|
||||
:flag alert
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use alert))
|
||||
|
||||
|
||||
(defcube fg42/emojify-cube
|
||||
"Adds support for emojis to *FG42*"
|
||||
(:title "Emojify cube"
|
||||
:title "Emojify cube"
|
||||
:flag emoji
|
||||
:flag-default t)
|
||||
: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"
|
||||
:title "Discover cube"
|
||||
:flag discover
|
||||
:flag-default t)
|
||||
: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"
|
||||
:title "Exec path cube"
|
||||
:flag exec-path-from-shell
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use exec-path-from-shell
|
||||
:init
|
||||
(when (memq window-system '(mac ns x))
|
||||
|
@ -147,9 +147,9 @@ contextual information."
|
|||
|
||||
(defcube fg42/hl-cube
|
||||
"This cube highlight the curret line."
|
||||
(:title "Current line highlight cube"
|
||||
:title "Current line highlight cube"
|
||||
:flag hl-line
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(require 'hl-line)
|
||||
(global-hl-line-mode))
|
||||
|
||||
|
@ -160,9 +160,9 @@ such as parentheses, brackets or braces according to their depth. Each successiv
|
|||
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"
|
||||
:title "Rainbow Delimiters Cube"
|
||||
:flag rainbow-delimiters
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use rainbow-delimiters
|
||||
;; It doesn't work due to a problem/conflict in rainbow-delimiters
|
||||
|
@ -174,9 +174,9 @@ orient yourself in the code, and tell which statements are at a given depth."
|
|||
"=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"
|
||||
:title "Paredit Cube"
|
||||
:flag paredit
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use paredit
|
||||
:hook ((emacs-lisp-mode . paredit-mode)
|
||||
(clojure-mode . paredit-mode)
|
||||
|
@ -185,9 +185,9 @@ data. The typical example of this would be Lisp or Scheme source code."
|
|||
|
||||
(defcube fg42/cursor-cube
|
||||
"This cube controls the shape of the cursor."
|
||||
(:title "Cursor cube"
|
||||
:title "Cursor cube"
|
||||
:flag cursor-type
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(let ((ctype (or (plist-get fg42/cursor-cube-params :type) 'box))
|
||||
(ccolor (or (plist-get fg42/cursor-cube-params :color) "#aa0000")))
|
||||
|
||||
|
@ -198,9 +198,9 @@ data. The typical example of this would be Lisp or Scheme source code."
|
|||
|
||||
(defcube fg42/buffer-navigation-cube
|
||||
"This cube controls the different aspect of buffer navigation"
|
||||
(:title "Buffer navigation cube"
|
||||
:title "Buffer navigation cube"
|
||||
:flag buffer-navigation
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use avy
|
||||
:bind ("M-1" . avy-goto-word-1)))
|
||||
|
@ -208,9 +208,9 @@ data. The typical example of this would be Lisp or Scheme source code."
|
|||
|
||||
(defcube fg42/window-navigation-cube
|
||||
"This cube controls the different aspect of buffer navigation"
|
||||
(:title "Window navigation cube"
|
||||
:title "Window navigation cube"
|
||||
:flag window-navigation
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use ace-window
|
||||
:bind ("C-<tab>" . ace-window)))
|
||||
|
@ -218,9 +218,9 @@ data. The typical example of this would be Lisp or Scheme source code."
|
|||
|
||||
(defcube fg42/font-cube
|
||||
"This cube controls the font configuration of *FG42*"
|
||||
(:title "Font Cube"
|
||||
:title "Font Cube"
|
||||
:no-flag t
|
||||
:flag-default 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)
|
||||
|
@ -236,7 +236,7 @@ data. The typical example of this would be Lisp or Scheme source code."
|
|||
;TODO: Replace this cube with a `theme-cube'
|
||||
(defcube fg42/dracula-theme-cube
|
||||
"Replace this with a theme cube"
|
||||
(:title "Dracula theme"
|
||||
:title "Dracula theme"
|
||||
:no-flag t
|
||||
:ui-hook (lambda ()
|
||||
(fpkg/use dracula-theme
|
||||
|
@ -251,13 +251,13 @@ data. The typical example of this would be Lisp or Scheme source code."
|
|||
'(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"))))))
|
||||
(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)
|
||||
:title "Badwolf theme"
|
||||
:no-flag t
|
||||
(require 'fg42/themes)
|
||||
|
||||
(fpkg/use badwolf-theme
|
||||
|
@ -271,9 +271,9 @@ https://emacsthemes.com/themes/badwolf-theme.html"
|
|||
|
||||
(defcube fg42/selectrum-cube
|
||||
"This cube adds support for `selectrum' to FG42"
|
||||
(:title "Selectrum cube"
|
||||
:title "Selectrum cube"
|
||||
:flag selectrum
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use selectrum
|
||||
:defer nil
|
||||
:init
|
||||
|
@ -296,8 +296,8 @@ https://emacsthemes.com/themes/badwolf-theme.html"
|
|||
|
||||
(defcube fg42/editor-cube
|
||||
"This is a meta cube that sets up the basic functionalities of an Editor"
|
||||
(:title "Editor cube"
|
||||
:no-flag t)
|
||||
:title "Editor cube"
|
||||
:no-flag t
|
||||
|
||||
(fpkg/use rainbow-delimiters
|
||||
;; It doesn't work due to a problem/conflict in rainbow-delimiters
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
(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"
|
||||
:title "Eldoc box Cube"
|
||||
:flag eldoc-box
|
||||
:flag-default t
|
||||
:modes '(eldoc-box-hover-mode eldoc-box-hover-at-point-mode))
|
||||
: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)))
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
(defcube fg42/elisp-cube
|
||||
"Elisp cube"
|
||||
(:title "cubes/fg42/elisp-cube.org"
|
||||
:no-flag t)
|
||||
:title "cubes/fg42/elisp-cube.org"
|
||||
:no-flag t
|
||||
|
||||
(fg42/rainbow-delimiters-cube)
|
||||
(fg42/paredit-cube)
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"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"
|
||||
:title "Editor cube"
|
||||
:flag-default t
|
||||
:flag fg42-editor-cube
|
||||
:init-hook (lambda (params)
|
||||
|
@ -71,7 +71,7 @@ via flags."
|
|||
params
|
||||
(intern (concat ":" (symbol-name cube))))))
|
||||
(eval `(funcall #',cube ,@cube-params)))))
|
||||
fg42/available-cubes))))
|
||||
fg42/available-cubes)))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
;;; FMCubes --- The file manager cubes for FG42 -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (c) 2010-2022 Sameer Rahmani & Contributors
|
||||
;;
|
||||
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
||||
;; URL: https://devheroes.codes/FG42/FG42
|
||||
;; Version: 3.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 <http://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
(require 'fpkg)
|
||||
(require 'fg42/cube)
|
||||
|
||||
|
||||
;; TODO: Move this to an autoload file
|
||||
(defun fg42/dired-external-open ()
|
||||
"In dired, open the file named on this line."
|
||||
(interactive)
|
||||
(let ((file (dired-get-filename nil t)))
|
||||
(call-process "xdg-open" nil 0 nil file)))
|
||||
|
||||
|
||||
(defcube fg42/fm-cube
|
||||
"file manager"
|
||||
(:title "cubes/fg42/fm-cube.org"
|
||||
:flag fm
|
||||
:flag-default t)
|
||||
|
||||
;; Linux only
|
||||
;; TODO: change this to support OS X
|
||||
(setq dired-listing-switches "-lFaGh1v --group-directories-first")
|
||||
|
||||
;; Show directories first
|
||||
(setq ls-lisp-dirs-first t)
|
||||
|
||||
(setq dired-recursive-copies 'always)
|
||||
(setq dired-recursive-deletes 'always)
|
||||
|
||||
(define-key dired-mode-map (kbd "E") 'fg42/dired-external-open)
|
||||
(fpkg/use dired+)
|
||||
(add-to-list 'dired-mode-hook
|
||||
(lambda ()
|
||||
(require 'dired-x)
|
||||
(require 'dired-aux)))
|
||||
|
||||
(when-flag async
|
||||
(dired-async-mode 1))
|
||||
|
||||
(fpkg/use dired-narrow
|
||||
:bind (:map dired-mode-map
|
||||
("/" . dired-narrow))))
|
||||
|
||||
|
||||
(provide 'cubes/fm)
|
||||
;;; fm.el ends here
|
|
@ -36,9 +36,9 @@ 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"
|
||||
:title "Diff Highlight Cube"
|
||||
:flag diff-hl
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use diff-hl
|
||||
:init
|
||||
|
@ -51,9 +51,9 @@ For more info check out [[https://github.com/dgutov/diff-hl][diff-hl]] 's page."
|
|||
|
||||
(defcube fg42/git-cube
|
||||
"This cube integrates *git* into *FG42*."
|
||||
(:title "Git Cube"
|
||||
:title "Git Cube"
|
||||
:flag git
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use magit
|
||||
:bind (("C-x g" . magit-status)))
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
(defcube fg42/godot-cube
|
||||
"Godot3d integration for FG42."
|
||||
(:title "Godot3d cube"
|
||||
:title "Godot3d cube"
|
||||
:flag-default t
|
||||
:flag godot3d)
|
||||
:flag godot3d
|
||||
|
||||
(fpkg/use gdscript-mode
|
||||
:mode "\\.gd\\'"))
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
(defcube fg42/golang-cube
|
||||
"Golang support cube for fg42."
|
||||
(:title "Golang cube" :flag golang
|
||||
:flag-default t)
|
||||
:title "Golang cube" :flag golang
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use go-mode
|
||||
:defer t
|
||||
|
|
|
@ -35,10 +35,10 @@ 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"
|
||||
:title "Graphviz Cube"
|
||||
:flag graphviz
|
||||
:flag-default t
|
||||
:modes 'graphviz-dot-mode)
|
||||
:modes 'graphviz-dot-mode
|
||||
|
||||
(let ((indent-size (or (plist-get fg42/graphviz-cube-params :indent-size) 4)))
|
||||
(fg42/after-cubes
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
(defcube fg42/groovy-cube
|
||||
"Groovy support for FG42."
|
||||
(:title "Groovy cube"
|
||||
:title "Groovy cube"
|
||||
:flag groovy
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use groovy-emacs-mode
|
||||
:defer t))
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
(defcube fg42/haml-cube
|
||||
"This cube provides syntax highlighting and syntax-aware indentation
|
||||
for haml files"
|
||||
|
||||
(:title "Haml Cube"
|
||||
:title "Haml Cube"
|
||||
:flag haml
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use haml-mode
|
||||
:mode "\\.haml\\'"))
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
(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"
|
||||
:title "All the icons cube"
|
||||
:flag all-the-icons
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use all-the-icons
|
||||
:if (display-graphic-p)))
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
|
||||
(defcube fg42/rcirc-cube
|
||||
"IRC cube"
|
||||
(:title "cubes/fg42/rcirc-cube.org"
|
||||
:flag rcirc)
|
||||
: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)
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
(defcube fg42/gradle-cube
|
||||
"Gradle support"
|
||||
(:title "cubes/fg42/java-cube.org"
|
||||
:title "Gradle Cube"
|
||||
:flag gradle
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use groovy-mode
|
||||
:mode "\\.gradle\\'")
|
||||
|
@ -43,9 +43,9 @@
|
|||
|
||||
(defcube fg42/java-cube
|
||||
"Java cube"
|
||||
(:title "cubes/fg42/java-cube.org"
|
||||
:title "Java Cube"
|
||||
:flag java
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(add-hook 'java-mode-hook
|
||||
(lambda()
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
(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"
|
||||
:title "Language tool Cube"
|
||||
:flag language-tool
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(let ((user (plist-get fg42/langtool-cube-params :username))
|
||||
(apikey (plist-get fg42/langtool-cube-params :api-key)))
|
||||
|
|
|
@ -39,9 +39,9 @@ cube.
|
|||
|
||||
For more info on check out [[https://codeberg.org/martianh/mastodon.el]]"
|
||||
|
||||
(:title "Mastodone Cube"
|
||||
:title "Mastodone Cube"
|
||||
:flag mastodon
|
||||
:flag-default nil)
|
||||
:flag-default nil
|
||||
|
||||
(let ((url (or (plist-get fg42/mastodon-cube-params :instance-url)
|
||||
(error "Instance url is empty set the `:instance-url' key")))
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
(defcube fg42/meissa-cube
|
||||
"Integrate FG42 with Meissa"
|
||||
(:title "Meissa cube"
|
||||
:title "Meissa cube"
|
||||
:flag-default t
|
||||
:flag meissa)
|
||||
:flag meissa
|
||||
|
||||
(fpkg/use msgpack)
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
"This cube enables support for meson build files.
|
||||
|
||||
For more info checkout [[https://github.com/wentasah/meson-mode]]"
|
||||
(:title "Meson cube"
|
||||
:title "Meson cube"
|
||||
:flag mesonbuild
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use meson-mode
|
||||
:config
|
||||
(progn
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
;; TODO: Break this into two cubes
|
||||
(defcube fg42/modeline-cube
|
||||
"Modeline cube"
|
||||
(:title "Mini modeline"
|
||||
:title "Mini modeline"
|
||||
:flag mini-mode-line
|
||||
:group modeline
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(defun fg42/mini-modeline-setter (def)
|
||||
(if (null def)
|
||||
|
@ -94,10 +94,10 @@
|
|||
"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"
|
||||
:title "Status bar cube"
|
||||
:flag status-bar
|
||||
:group modeline
|
||||
:flag-default nil)
|
||||
:flag-default nil
|
||||
|
||||
|
||||
(fg42/all-the-icons-cube)
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
(defcube fg42/ednc-cube
|
||||
"Notifications support for FG42."
|
||||
(:title "Notifications cube"
|
||||
:title "Notifications cube"
|
||||
:flag ednc
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use ednc
|
||||
:defer t
|
||||
|
|
|
@ -50,9 +50,10 @@ be used as a backend for other tools. The libraries ~org-ql-search~ and
|
|||
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"
|
||||
:title "Org Qurey Language"
|
||||
:flag org-ql
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use org-ql
|
||||
:after org))
|
||||
|
||||
|
@ -69,9 +70,9 @@ 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"
|
||||
:title "Org Super Agenda"
|
||||
:flag org-super-agenda
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(defconst fg42/org-super-agenda-groups
|
||||
nil)
|
||||
|
@ -104,9 +105,9 @@ current buffer (similar to the Org agenda, but without all its features) at the
|
|||
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"
|
||||
:title "Org Sidebar"
|
||||
:flag org-sidebar
|
||||
:flag-default t)
|
||||
: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)))
|
||||
|
@ -143,9 +144,9 @@ cubes and you can pass parameters to them via ~:super-agenda~, ~:ql~ and ~:sideb
|
|||
|
||||
For more info on ~org-mode~ check out [[https://orgmode.org/]]"
|
||||
|
||||
(:title "Org-mode"
|
||||
:title "Org-mode"
|
||||
:flag org
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(let ((capture-key (or (plist-get fg42/org-cube-params :capture-key)
|
||||
(kbd "<f6>")))
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
(defcube fg42/projectile-cube
|
||||
"Projectile Cube"
|
||||
(:title "cubes/fg42/projectile-cube.org"
|
||||
:title "cubes/fg42/projectile-cube.org"
|
||||
:flag projectile
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(let ((project-dirs (or (plist-get fg42/projectile-cube-params :project-dirs)
|
||||
())))
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
(defcube fg42/proof-general-cube
|
||||
"Integrate Proof General with Fg42"
|
||||
(:title "Proof General cube"
|
||||
:title "Proof General cube"
|
||||
:flag-default t
|
||||
:flag proof-general)
|
||||
:flag proof-general
|
||||
|
||||
(fpkg/use proof-general)
|
||||
(fpkg/use company-coq
|
||||
|
|
|
@ -56,9 +56,9 @@ interactive `pyvenv-workon' function before `lsp'"
|
|||
|
||||
(defcube fg42/python-black-cube
|
||||
"This cube reformats python code using black formatter tool."
|
||||
(:title "Python lang server via pyls"
|
||||
:title "Python lang server via pyls"
|
||||
:flag python-black
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use python-black
|
||||
:demand t
|
||||
|
@ -68,9 +68,9 @@ interactive `pyvenv-workon' function before `lsp'"
|
|||
|
||||
(defcube fg42/python-cube-pyls
|
||||
"Python language server using pyls"
|
||||
(:title "Python lang server via pyls"
|
||||
:title "Python lang server via pyls"
|
||||
:flag python-pyls
|
||||
:flag-default nil)
|
||||
:flag-default nil
|
||||
|
||||
(when-flag lsp
|
||||
(with-eval-after-load "lsp"
|
||||
|
@ -85,9 +85,9 @@ interactive `pyvenv-workon' function before `lsp'"
|
|||
|
||||
(defcube fg42/python-cube-pyright
|
||||
"Python language server using pyright."
|
||||
(:title "Python lang server via pyright"
|
||||
:title "Python lang server via pyright"
|
||||
:flag python-pyright
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use lsp-pyright
|
||||
:ensure t
|
||||
|
@ -103,9 +103,10 @@ interactive `pyvenv-workon' function before `lsp'"
|
|||
|
||||
(defcube fg42/poetry-cube
|
||||
"Poetry support for FG42. To use it, just use `M-x poetry'."
|
||||
(:title "Python cube"
|
||||
:title "Poetry cube"
|
||||
:flag poetry
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use poetry
|
||||
:config
|
||||
(poetry-tracking-mode 1)))
|
||||
|
@ -113,9 +114,9 @@ interactive `pyvenv-workon' function before `lsp'"
|
|||
|
||||
(defcube fg42/python-cube
|
||||
"Python support cube."
|
||||
(:title "Python cube"
|
||||
:title "Python cube"
|
||||
:flag python
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use pyvenv
|
||||
:defer t
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
(defcube fg42/region-expansion-cube
|
||||
"RE cube"
|
||||
(:title "cubes/fg42/region-expansion.org")
|
||||
:title "Region Expansion Cube"
|
||||
|
||||
(fpkg/use expand-region
|
||||
:bind ("C-=" . er/expand-region)))
|
||||
|
|
|
@ -31,9 +31,9 @@ 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"
|
||||
:title "rigel Cube"
|
||||
:flag rigel
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
|
||||
(autoload-cube
|
||||
|
|
|
@ -35,10 +35,10 @@ 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"
|
||||
:title "Rust Cube"
|
||||
:flag rust
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use rustic
|
||||
:bind (:map rustic-mode-map
|
||||
("M-j" . lsp-ui-imenu)
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
(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"
|
||||
:title "Scheme Cube"
|
||||
:flag scheme
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fg42/rainbow-delimiters-cube)
|
||||
(fg42/paredit-cube)
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
(defcube fg42/yasnippet-cube
|
||||
"Yasnippet cube"
|
||||
(:title "cubes/fg42/yasnippet-cube.org"
|
||||
:title "cubes/fg42/yasnippet-cube.org"
|
||||
:flag yasnippet
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use yasnippet-snippets)
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
(defcube fg42/vterm-cube
|
||||
"Vterm cube"
|
||||
(:title "cubes/fg42/vterm-cube.org"
|
||||
:flag vterm)
|
||||
:title "VTerm Cube"
|
||||
:flag vterm
|
||||
(let ((_shell (or (plist-get fg42/vterm-cube-params :shell)
|
||||
(getenv "SHELL"))))
|
||||
(fpkg/use vterm
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
(defcube fg42/terraform-cube
|
||||
"terraform cube"
|
||||
(:title "cubes/fg42/terraform-cube.org"
|
||||
:title "cubes/fg42/terraform-cube.org"
|
||||
:flag terraform
|
||||
:flag-default t)
|
||||
: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"))
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
(defcube fg42/wm-cube
|
||||
"This cube will setup *FG42* to act as a window manager."
|
||||
(:title "Window manager cube"
|
||||
:no-flag t)
|
||||
:title "Window manager cube"
|
||||
:no-flag t
|
||||
|
||||
(if-flag wm
|
||||
(when-wm
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
(defcube fg42/zig-cube
|
||||
"This cube integrates *zig* into *FG42*."
|
||||
(:title "Zig Cube"
|
||||
:title "Zig Cube"
|
||||
:flag zig
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
|
||||
(fpkg/use zig-mode
|
||||
:mode ("\\.zig?\\'" . zig-mode))
|
||||
|
|
|
@ -46,8 +46,24 @@ it is to use `fg42/after-cubes' macro.")
|
|||
The execution happens after Emacs is initialized.")
|
||||
|
||||
|
||||
(defmacro defcube (cube-name docs props &rest body)
|
||||
"Define a cube with the given CUBE-NAME, a list of PROPS, DOCS and a BODY."
|
||||
(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)))))
|
||||
|
||||
|
||||
(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
|
||||
|
@ -55,6 +71,10 @@ The execution happens after Emacs is initialized.")
|
|||
(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))
|
||||
|
||||
|
@ -64,7 +84,6 @@ The execution happens after Emacs is initialized.")
|
|||
(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)))
|
||||
|
@ -178,7 +197,7 @@ The execution happens after Emacs is initialized.")
|
|||
(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))))
|
||||
(setplist ',cube-name ',complete-props)))))
|
||||
|
||||
|
||||
(defmacro fg42/after-cubes (&rest body)
|
||||
|
@ -195,9 +214,9 @@ It passes the BODY to `fpkg/use'."
|
|||
(declare (indent defun) (doc-string 2))
|
||||
`(defcube ,(intern (format "fg42/%s-cube" pkg))
|
||||
,docs
|
||||
(:title ,(format "%s cube" pkg)
|
||||
:title ,(format "%s cube" pkg)
|
||||
:flag ,pkg
|
||||
:flag-default t)
|
||||
:flag-default t
|
||||
(fpkg/use ,pkg ,@body)))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue