forked from FG42/FG42
Add tempel as the yasnippet replacement
This commit is contained in:
parent
cd6cecdbbb
commit
7cd44271c1
|
@ -46,6 +46,8 @@ let
|
||||||
org-ql
|
org-ql
|
||||||
org-modern
|
org-modern
|
||||||
base16-theme
|
base16-theme
|
||||||
|
tempel
|
||||||
|
tempel-collection
|
||||||
]);
|
]);
|
||||||
|
|
||||||
drv = makeFG42Drv {
|
drv = makeFG42Drv {
|
||||||
|
|
|
@ -26,17 +26,6 @@
|
||||||
;; We build this file via the main FG42's Nix derivation. It
|
;; We build this file via the main FG42's Nix derivation. It
|
||||||
;; contains the final Nix configuration of FG42.
|
;; contains the final Nix configuration of FG42.
|
||||||
(require 'fg42/config)
|
(require 'fg42/config)
|
||||||
;; ;; Language support
|
|
||||||
;; (require 'fg42/autocomplete)
|
|
||||||
;; (require 'fg42/langs/langs)
|
|
||||||
;; (require 'fg42/eglot)
|
|
||||||
;; (require 'fg42/langs/cpp)
|
|
||||||
;; (require 'fg42/langs/verilog)
|
|
||||||
;; (require 'fg42/langs/python)
|
|
||||||
;; (require 'fg42/langs/elisp)
|
|
||||||
;; (require 'fg42/langs/nix)
|
|
||||||
|
|
||||||
;; (require 'fg42/wm)
|
|
||||||
(require 'fg42/organize))
|
(require 'fg42/organize))
|
||||||
|
|
||||||
(require 'server)
|
(require 'server)
|
||||||
|
@ -53,7 +42,6 @@
|
||||||
(set-face-attribute 'default t :font name)))
|
(set-face-attribute 'default t :font name)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(use! origami
|
(use! origami
|
||||||
"A text folding minor mode for Emacs."
|
"A text folding minor mode for Emacs."
|
||||||
:bind
|
:bind
|
||||||
|
@ -61,6 +49,7 @@
|
||||||
:config
|
:config
|
||||||
(global-origami-mode t))
|
(global-origami-mode t))
|
||||||
|
|
||||||
|
|
||||||
(use! which-key
|
(use! which-key
|
||||||
"which-key is a minor mode for Emacs that displays the key bindings following
|
"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,
|
your currently entered incomplete command (a prefix) in a popup. For example,
|
||||||
|
@ -72,6 +61,7 @@ This includes prefixes like ~C-x 8~ which are shown in a different face."
|
||||||
(which-key-setup-side-window-bottom)
|
(which-key-setup-side-window-bottom)
|
||||||
(which-key-mode))
|
(which-key-mode))
|
||||||
|
|
||||||
|
|
||||||
(use! projectile
|
(use! projectile
|
||||||
"Projectile is a project interaction library for Emacs. Its goal is to provide
|
"Projectile is a project interaction library for Emacs. Its goal is to provide
|
||||||
a nice set of features operating on a project level without introducing
|
a nice set of features operating on a project level without introducing
|
||||||
|
@ -112,44 +102,53 @@ contextual information."
|
||||||
("C-h x" . helpful-command)
|
("C-h x" . helpful-command)
|
||||||
("C-c C-d" . helpful-at-point)))
|
("C-c C-d" . helpful-at-point)))
|
||||||
|
|
||||||
|
|
||||||
(use! envrc
|
(use! envrc
|
||||||
"Activate direnv whenever encounter a `.envrc' file"
|
"Activate direnv whenever encounter a `.envrc' file"
|
||||||
:config
|
:config
|
||||||
(envrc-global-mode))
|
(envrc-global-mode))
|
||||||
|
|
||||||
|
|
||||||
(use! pinentry
|
(use! pinentry
|
||||||
"Pinentry cube with setup the =pinentry= program to be used within FG42."
|
"Pinentry cube with setup the =pinentry= program to be used within FG42."
|
||||||
:commands pinentry-start
|
:commands pinentry-start
|
||||||
:init
|
:init
|
||||||
(setq epa-pinentry-mode 'loopback))
|
(setq epa-pinentry-mode 'loopback))
|
||||||
|
|
||||||
|
|
||||||
(use! imenu-list
|
(use! imenu-list
|
||||||
"his Emacs minor-mode creates an automatically updated buffer
|
"his Emacs minor-mode creates an automatically updated buffer
|
||||||
called `Ilist' that is populated with the current buffer's imenu entries.
|
called `Ilist' that is populated with the current buffer's imenu entries.
|
||||||
The `Ilist' buffer is typically shown as a sidebar (Emacs vertically splits the window)."
|
The `Ilist' buffer is typically shown as a sidebar (Emacs vertically splits the window)."
|
||||||
:bind (("C-'" . imenu-list-smart-toggle)))
|
:bind (("C-'" . imenu-list-smart-toggle)))
|
||||||
|
|
||||||
|
|
||||||
(use! discover
|
(use! discover
|
||||||
"Adds support for the discover.el `https://github.com/mickeynp/discover.el'.")
|
"Adds support for the discover.el `https://github.com/mickeynp/discover.el'.")
|
||||||
|
|
||||||
|
|
||||||
(use! exec-path-from-shell
|
(use! exec-path-from-shell
|
||||||
"This package fixes the =exec-path-from-shell= issue on MacOS."
|
"This package fixes the =exec-path-from-shell= issue on MacOS."
|
||||||
:config
|
:config
|
||||||
(when (memq window-system '(mac ns x))
|
(when (memq window-system '(mac ns x))
|
||||||
(exec-path-from-shell-initialize)))
|
(exec-path-from-shell-initialize)))
|
||||||
|
|
||||||
|
|
||||||
(use! hl-line
|
(use! hl-line
|
||||||
"Highlights the current line."
|
"Highlights the current line."
|
||||||
:hook (emacs-startup . global-hl-line-mode))
|
:hook (emacs-startup . global-hl-line-mode))
|
||||||
|
|
||||||
|
|
||||||
(use! avy
|
(use! avy
|
||||||
"This cube controls the different aspect of buffer navigation"
|
"This cube controls the different aspect of buffer navigation"
|
||||||
:bind ("M-1" . avy-goto-word-1))
|
:bind ("M-1" . avy-goto-word-1))
|
||||||
|
|
||||||
|
|
||||||
(use! ace-window
|
(use! ace-window
|
||||||
"This cube controls the different aspect of buffer navigation"
|
"This cube controls the different aspect of buffer navigation"
|
||||||
:bind ("C-<tab>" . ace-window))
|
:bind ("C-<tab>" . ace-window))
|
||||||
|
|
||||||
|
|
||||||
(when-not-wm
|
(when-not-wm
|
||||||
(use! flyspell
|
(use! flyspell
|
||||||
"Spell checking on the fly"
|
"Spell checking on the fly"
|
||||||
|
@ -165,6 +164,7 @@ contextual information."
|
||||||
:init
|
:init
|
||||||
(savehist-mode))
|
(savehist-mode))
|
||||||
|
|
||||||
|
|
||||||
(use! display-line-numbers
|
(use! display-line-numbers
|
||||||
"The builtin replacement of linum. It's is pretty fast."
|
"The builtin replacement of linum. It's is pretty fast."
|
||||||
:config
|
:config
|
||||||
|
@ -175,6 +175,7 @@ contextual information."
|
||||||
"Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs."
|
"Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs."
|
||||||
:config (global-flycheck-mode))
|
:config (global-flycheck-mode))
|
||||||
|
|
||||||
|
|
||||||
(use! rainbow-delimiters
|
(use! rainbow-delimiters
|
||||||
"It is a rainbow parentheses like mode which highlights delimiters such as
|
"It is a rainbow parentheses like mode which highlights delimiters such as
|
||||||
parentheses, brackets or braces according to their depth."
|
parentheses, brackets or braces according to their depth."
|
||||||
|
@ -188,6 +189,37 @@ contextual information."
|
||||||
(direnv-mode))
|
(direnv-mode))
|
||||||
|
|
||||||
|
|
||||||
|
(use! tempel
|
||||||
|
"Tempel is a tiny template package for Emacs, which uses the syntax
|
||||||
|
of the Emacs Tempo library."
|
||||||
|
:bind (("M-+" . tempel-complete) ;; Alternative tempel-expand
|
||||||
|
("M-*" . tempel-insert)
|
||||||
|
("C-," . tempel-previous)
|
||||||
|
("C-." . tempel-next))
|
||||||
|
|
||||||
|
:init
|
||||||
|
;; Setup completion at point
|
||||||
|
(defun tempel-setup-capf ()
|
||||||
|
;; Add the Tempel Capf to `completion-at-point-functions'.
|
||||||
|
;; `tempel-expand' only triggers on exact matches. Alternatively use
|
||||||
|
;; `tempel-complete' if you want to see all matches, but then you
|
||||||
|
;; should also configure `tempel-trigger-prefix', such that Tempel
|
||||||
|
;; does not trigger too often when you don't expect it. NOTE: We add
|
||||||
|
;; `tempel-expand' *before* the main programming mode Capf, such
|
||||||
|
;; that it will be tried first.
|
||||||
|
(setq-local completion-at-point-functions
|
||||||
|
(cons #'tempel-expand
|
||||||
|
completion-at-point-functions)))
|
||||||
|
|
||||||
|
(add-hook 'conf-mode-hook 'tempel-setup-capf)
|
||||||
|
(add-hook 'prog-mode-hook 'tempel-setup-capf)
|
||||||
|
(add-hook 'text-mode-hook 'tempel-setup-capf))
|
||||||
|
|
||||||
|
|
||||||
|
(use! tempel-collection
|
||||||
|
"A collection of tempel templates.")
|
||||||
|
|
||||||
|
|
||||||
(defun fg42/setup-editor ()
|
(defun fg42/setup-editor ()
|
||||||
"Setup the overall functionality of FG42."
|
"Setup the overall functionality of FG42."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue