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:
parent
4974d67422
commit
8621a67a54
45
init.el
45
init.el
|
@ -279,39 +279,6 @@
|
||||||
:after (embark consult)
|
:after (embark consult)
|
||||||
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
: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
|
;; Scratch buffer shortcut
|
||||||
(keymap-global-set "C-c w x" #'scratch-buffer)
|
(keymap-global-set "C-c w x" #'scratch-buffer)
|
||||||
|
|
||||||
|
@ -342,14 +309,6 @@
|
||||||
(warn (concat flake " not found")))))
|
(warn (concat flake " not found")))))
|
||||||
(keymap-global-set "C-c w h" #'my/open-home-manager-flake)
|
(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
|
;; Org directory shortcut
|
||||||
(defun my/open-org-directory ()
|
(defun my/open-org-directory ()
|
||||||
"Open base `org-mode' directory in Dired."
|
"Open base `org-mode' directory in Dired."
|
||||||
|
@ -491,6 +450,7 @@
|
||||||
(setq mode-line-compact 'long)
|
(setq mode-line-compact 'long)
|
||||||
|
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
|
:disabled
|
||||||
:demand
|
:demand
|
||||||
:custom
|
:custom
|
||||||
(doom-modeline-checker-simple-format nil)
|
(doom-modeline-checker-simple-format nil)
|
||||||
|
@ -921,11 +881,11 @@
|
||||||
(setq-local completion-at-point-functions
|
(setq-local completion-at-point-functions
|
||||||
(list (cape-capf-super
|
(list (cape-capf-super
|
||||||
#'eglot-completion-at-point
|
#'eglot-completion-at-point
|
||||||
#'tempel-expand
|
|
||||||
#'cape-file))))
|
#'cape-file))))
|
||||||
(add-hook 'eglot-managed-mode-hook #'my/eglot-capf)))
|
(add-hook 'eglot-managed-mode-hook #'my/eglot-capf)))
|
||||||
|
|
||||||
(use-package apheleia
|
(use-package apheleia
|
||||||
|
:diminish
|
||||||
:bind (("C-c c f" . apheleia-format-buffer))
|
:bind (("C-c c f" . apheleia-format-buffer))
|
||||||
:hook (prog-mode)
|
:hook (prog-mode)
|
||||||
:custom (apheleia-remote-algorithm 'local)
|
:custom (apheleia-remote-algorithm 'local)
|
||||||
|
@ -944,6 +904,7 @@
|
||||||
|
|
||||||
(use-package flymake-popon
|
(use-package flymake-popon
|
||||||
:after flymake
|
:after flymake
|
||||||
|
:diminish
|
||||||
:init
|
:init
|
||||||
(global-flymake-popon-mode +1))
|
(global-flymake-popon-mode +1))
|
||||||
|
|
||||||
|
|
|
@ -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
|
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
|
;; Completion
|
||||||
cape consult consult-eglot consult-flyspell corfu corfu-terminal embark embark-consult marginalia orderless vertico
|
cape consult consult-eglot consult-flyspell corfu corfu-terminal embark embark-consult marginalia orderless vertico
|
||||||
;; Snippets
|
|
||||||
tempel tempel-collection
|
|
||||||
;; spell-checking
|
;; spell-checking
|
||||||
flyspell-correct
|
flyspell-correct
|
||||||
;; password-store
|
;; password-store
|
||||||
|
|
Loading…
Reference in a new issue