diff options
author | Marc Coquand <marc@mccd.space> | 2024-10-22 12:21:31 +0300 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-10-22 12:21:31 +0300 |
commit | ba51d8509f78361f3049900861f492e100116a8c (patch) | |
tree | 1e408ed789ecd8f3761ab9b4aa88b42e1af507f1 /home/dots | |
parent | 9fa6862f443b66c01895c3199502e4f628e4f69b (diff) | |
download | guix-ba51d8509f78361f3049900861f492e100116a8c.tar.gz guix-ba51d8509f78361f3049900861f492e100116a8c.tar.bz2 guix-ba51d8509f78361f3049900861f492e100116a8c.zip |
.
Diffstat (limited to '')
-rw-r--r-- | home/dots/.emacs | 33 | ||||
-rw-r--r-- | home/dots/.emacs.d/elisp/keymaps.el | 28 |
2 files changed, 49 insertions, 12 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index 9a931a1..ca901bc 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -186,11 +186,11 @@ :bind (("C-c C-g g" . guix) ("C-c C-g o" . (lambda () - (interactive) - (sudo-shell-command "guix system reconfigure /home/mccd/system/os/config.scm"))) + (interactive) + (sudo-shell-command "guix system reconfigure /home/mccd/system/os/config.scm"))) ("C-c C-g h" . (lambda () - (interactive) - (async-shell-command "guix home reconfigure ~/system/home/config.scm"))))) + (interactive) + (async-shell-command "guix home reconfigure ~/system/home/config.scm"))))) (use-package nov @@ -386,17 +386,26 @@ :init (global-set-key (kbd "C-h D") 'devdocs-lookup)) +(use-package custom-keymaps + :load-path "elisp") + (use-package sgml-mode :init (add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode)) (add-to-list 'auto-mode-alist '("\\.tmpl\\'" . html-mode)) + :config + (define-key html-mode-map (kbd "M-<TAB>") nil) + (define-key html-mode-map (kbd "M-o") nil) :hook - ;; TODO fix - ((html-mode . (lambda () - (keymap-local-set (kbd "M-o") 'avy-goto-char-timer))) - (html-mode . (lambda () - (setq sgml-basic-offset 8 - indent-tabs-mode t))))) + (css-mode . (lambda ((interactive) + (setq-local tab-width 2) + (setq sgml-basic-offset 2 + indent-tabs-mode t)))))) + (html-mode . (lambda () + (interactive) + (setq-local tab-width 2) + (setq sgml-basic-offset 2 + indent-tabs-mode t)))) (use-package eldoc :ensure t @@ -792,7 +801,7 @@ '(font-lock-type-face ((t (:foreground "black")))) '(font-lock-variable-name-face ((t (:foreground "black")))) '(fringe ((t (:background "white")))) - '(header-line ((t (:inherit default :foreground "grey20" :box (:line-width (8 . 8) :color "#FFFFFF") :underline (:color "#e0e0e0" :style line :position 0) :family "Iosevka Aile")))) + '(header-line ((t (:inherit default :foreground "grey20" :box (:line-width (12 . 12) :color "#FFFFFF") :underline (:color "#e0e0e0" :style line :position 0) :family "Iosevka Aile")))) '(highlight ((t (:background "azure2")))) '(info-header-xref ((t (:inherit info-xref :underline (:color "RoyalBlue3" :style line :position t))))) '(info-node ((t (:foreground "brown" :box (:line-width (4 . 4) :color "white") :slant italic :weight bold)))) @@ -801,7 +810,7 @@ '(markdown-inline-code-face ((t (:inherit markdown-code-face)))) '(markdown-pre-face ((t (:inherit markdown-code-face)))) '(mastodon-display-name-face ((t (:inherit nil :weight bold)))) - '(mode-line ((t (:background "gray95" :foreground "black" :box (:line-width (8 . 8) :style flat-button) :overline "#e0e0e0" :underline (:color "#e0e0e0" :style line :position t) :family "Iosevka Aile")))) + '(mode-line ((t (:background "gray95" :foreground "black" :box (:line-width (12 . 12) :style flat-button) :overline "white" :underline (:color "white" :style line :position t) :family "Iosevka Aile")))) '(mode-line-emphasis ((t (:weight regular)))) '(mode-line-inactive ((t (:inherit mode-line :background "#fbfbfb" :foreground "grey60" :overline "#f9f9f9" :underline (:color "#f9f9f9" :style line :position 0) :weight light)))) '(mu4e-header-highlight-face ((t (:inherit hl-line :extend t :weight bold)))) diff --git a/home/dots/.emacs.d/elisp/keymaps.el b/home/dots/.emacs.d/elisp/keymaps.el new file mode 100644 index 0000000..7c6d614 --- /dev/null +++ b/home/dots/.emacs.d/elisp/keymaps.el @@ -0,0 +1,28 @@ +(defvar keymaps-mode-map (make-sparse-keymap) + "Keymap for `keymaps-mode'") + +;;;###autoload +(define-minor-mode keymaps-mode + "A minor mode so that my key settings override annoying major modes." + ;; If init-value is not set to t, this mode does not get enabled in + ;; `fundamental-mode' buffers even after doing \"(global-my-mode 1)\". + ;; More info: http://emacs.stackexchange.com/q/16693/115 + :init-value t + :lighter " keymaps" + :keymap keymaps-mode-map) + +;;;###autoload +(define-globalized-minor-mode global-keymaps-mode keymaps-mode keymaps-mode) + +;; https://github.com/jwiegley/use-package/blob/master/bind-key.el +;; The keymaps in `emulation-mode-map-alists' take precedence over +;; `minor-mode-map-alist' +(add-to-list 'emulation-mode-map-alists `((keymaps-mode . ,keymaps-mode-map))) + +;; Turn off the minor mode in the minibuffer +(defun turn-off-keymaps-mode () + "Turn off keymaps-mode." + (keymaps-mode -1)) +(add-hook 'minibuffer-setup-hook #'turn-off-keymaps-mode) + +(provide 'custom-keymaps) |