diff --git a/build.el b/build.el index 78049ab..bb3e7e7 100755 --- a/build.el +++ b/build.el @@ -91,6 +91,5 @@ PARAMS: (message "Done")))) - (provide 'build) ;;; build.el ends here diff --git a/lisp/fg42/deps.el b/lisp/fg42/deps.el index 88e3007..adc84da 100644 --- a/lisp/fg42/deps.el +++ b/lisp/fg42/deps.el @@ -120,6 +120,7 @@ vertico orderless eglot + marginalia ) (provide 'fg42/deps) diff --git a/lisp/fg42/editor.el b/lisp/fg42/editor.el index 91d1025..30d1e7d 100644 --- a/lisp/fg42/editor.el +++ b/lisp/fg42/editor.el @@ -25,6 +25,7 @@ (require 'fpkg) ;; Language support (require 'fg42/autocomplete) + (require 'fg42/langs/langs) (require 'fg42/langs/cpp) (require 'fg42/langs/verilog) (require 'fg42/langs/python) @@ -145,22 +146,6 @@ contextual information." "Highlights the current line." :hook (emacs-startup . global-hl-line-mode)) - (use! rainbow-delimiters - "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." - ;; 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)) - - (use! paredit - "`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." - :hook ((emacs-lisp-mode . paredit-mode) - (clojure-mode . paredit-mode) - (scheme-mode . paredit-mode))) - (use! avy "This cube controls the different aspect of buffer navigation" :bind ("M-1" . avy-goto-word-1)) @@ -221,6 +206,20 @@ match all of the components in any order." (when-not-wm ;; Minibuffer related stuff + (use! marginalia + "Adds useful info to minibuffers completions." + ;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding + ;; available in the *Completions* buffer, add it to the + ;; `completion-list-mode-map'. + :bind (:map minibuffer-local-map + ("M-A" . marginalia-cycle)) + + ;; The :init section is always executed. + :init + ;; Since we used `:bind', `use!' assumes `:defer', but we want + ;; this mode to start right away. + (require 'marginalia) + (marginalia-mode)) (use! ctrlf "Single buffer text search." diff --git a/lisp/fg42/langs/elisp.el b/lisp/fg42/langs/elisp.el index d269b29..e1c4788 100644 --- a/lisp/fg42/langs/elisp.el +++ b/lisp/fg42/langs/elisp.el @@ -29,12 +29,13 @@ "Evaluation Result OverlayS for Emacs Lisp." :commands eros-mode) -(use! emacs-lisp-mode +(use! elisp-mode "Elisp mode." - :hook (emacs-lisp . rainbow-delimiters) - :hook (emacs-lisp . paredit-mode) - :hook (emacs-lisp . company-mode) - :hook (emacs-lisp . eros-mode)) + :hook + ((emacs-lisp-mode . rainbow-delimiters-mode) + (emacs-lisp-mode . paredit-mode) + (emacs-lisp-mode . company-mode) + (emacs-lisp-mode . eros-mode))) (provide 'fg42/langs/elisp) diff --git a/lisp/fg42/langs/langs.el b/lisp/fg42/langs/langs.el new file mode 100644 index 0000000..76d1caf --- /dev/null +++ b/lisp/fg42/langs/langs.el @@ -0,0 +1,45 @@ +;;; 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: 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 . +;; +;;; Commentary: +;;; Code: +(eval-when-compile + (require 'fpkg)) + + +(use! rainbow-delimiters + "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." + ;; It doesn't work due to a problem/conflict in rainbow-delimiters + ;; But we use it any way they might fix it + :commands rainbow-delimiters-mode + :hook (prog-mode . rainbow-delimiters-mode)) + +(use! paredit + "`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." + :commands paredit-mode) + + +(provide 'fg42/langs/langs) +;;; langs.el ends here