Remove tempel, disable doom-modeline for now

Use built in python skeleton functions instead of tempel expansions,
was only using it for python anyway

Disable doom-modeline for a bit whilst I consider switching back to
vanilla modeline, but don't delete yet. Diminsh flymake-popon and
apheleia minor modes
This commit is contained in:
Evie Litherland-Smith 2024-05-21 17:17:49 +01:00
parent 4974d67422
commit 8621a67a54
2 changed files with 3 additions and 44 deletions

45
init.el
View file

@ -279,39 +279,6 @@
:after (embark consult)
:hook (embark-collect-mode . consult-preview-at-point-mode))
;; Configure Tempel
(use-package tempel
;; Require trigger prefix before template name when completing.
;; :custom
;; (tempel-trigger-prefix "<")
:bind (("M-+" . tempel-complete) ;; Alternative tempel-expand
("M-*" . tempel-insert))
: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)
;; Optionally make the Tempel templates available to Abbrev,
;; either locally or globally. `expand-abbrev' is bound to C-x '.
(add-hook 'prog-mode-hook #'tempel-abbrev-mode)
(global-tempel-abbrev-mode))
;; Scratch buffer shortcut
(keymap-global-set "C-c w x" #'scratch-buffer)
@ -342,14 +309,6 @@
(warn (concat flake " not found")))))
(keymap-global-set "C-c w h" #'my/open-home-manager-flake)
;; Tempel template file shortcut
(defun my/open-template-file ()
"Open `tempel' template file."
(interactive)
(require 'tempel)
(find-file tempel-path))
(keymap-global-set "C-c w t" #'my/open-template-file)
;; Org directory shortcut
(defun my/open-org-directory ()
"Open base `org-mode' directory in Dired."
@ -491,6 +450,7 @@
(setq mode-line-compact 'long)
(use-package doom-modeline
:disabled
:demand
:custom
(doom-modeline-checker-simple-format nil)
@ -921,11 +881,11 @@
(setq-local completion-at-point-functions
(list (cape-capf-super
#'eglot-completion-at-point
#'tempel-expand
#'cape-file))))
(add-hook 'eglot-managed-mode-hook #'my/eglot-capf)))
(use-package apheleia
:diminish
:bind (("C-c c f" . apheleia-format-buffer))
:hook (prog-mode)
:custom (apheleia-remote-algorithm 'local)
@ -944,6 +904,7 @@
(use-package flymake-popon
:after flymake
:diminish
:init
(global-flymake-popon-mode +1))

View file

@ -12,8 +12,6 @@
all-the-icons nerd-icons nerd-icons-completion nerd-icons-corfu nerd-icons-dired nerd-icons-ibuffer doom-modeline diminish ligature page-break-lines helpful which-key link-hint diff-hl
;; Completion
cape consult consult-eglot consult-flyspell corfu corfu-terminal embark embark-consult marginalia orderless vertico
;; Snippets
tempel tempel-collection
;; spell-checking
flyspell-correct
;; password-store