Remove old emacs config cruft
This commit is contained in:
parent
5f5a3c04ea
commit
d0a8cd8b60
1 changed files with 33 additions and 45 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#+PROPERTY: header-args:emacs-lisp :tangle (if (eq system-type 'darwin) "~/dotfiles/guix/init.el" "~/.config/emacs/init.el")
|
||||
#+PROPERTY: header-args:emacs-lisp :tangle "~/.config/emacs/init.el"
|
||||
#+OPTIONS: toc:nil title:nil
|
||||
#+EXPORT_FILE_NAME: ~/code/website/src/content/dotfiles/emacs.md
|
||||
|
||||
|
|
@ -23,14 +23,22 @@ To get started, run =C-c C-v t=
|
|||
#+begin_src emacs-lisp
|
||||
(defun dotfiles/org-babel-tangle-config ()
|
||||
(when (string-equal (buffer-file-name)
|
||||
(expand-file-name "~/dotfiles/guix/init.org"))
|
||||
(expand-file-name "~/.dotfiles/emacs-config.org"))
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-babel-tangle))))
|
||||
(org-babel-tangle)
|
||||
(load-file (expand-file-name "~/.config/emacs/init.el")))))
|
||||
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
(add-hook 'after-save-hook #'dotfiles/org-babel-tangle-config)))
|
||||
(add-hook 'after-save-hook
|
||||
#'dotfiles/org-babel-tangle-config
|
||||
nil
|
||||
t)))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| (lambda nil (add-hook 'after-save-hook #'dotfiles/org-babel-tangle-config nil t)) | org-appear-mode | org-tempo-setup | yas-minor-mode | (lambda nil evil-org-mode) | #[0 \300\301\302\303\304$\207 [add-hook change-major-mode-hook org-fold-show-all append local] 5] | #[0 \300\301\302\303\304$\207 [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] | org-babel-result-hide-spec | org-babel-hide-all-hashes | #[0 \301\211\207 [imenu-create-index-function org-imenu-get-tree] 2] | (lambda nil (display-line-numbers-mode 0)) |
|
||||
|
||||
** Package initialization
|
||||
=TODO:= savehist mode doesn't seem to save the history correctly
|
||||
#+begin_src emacs-lisp
|
||||
|
|
@ -49,7 +57,7 @@ To get started, run =C-c C-v t=
|
|||
(require 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
|
||||
;; (package-refresh-contents)
|
||||
(package-refresh-contents)
|
||||
|
||||
(use-package savehist
|
||||
:init
|
||||
|
|
@ -120,7 +128,7 @@ Eventually I'll set this up so that all these directories are set in the config
|
|||
backup-directory-alist `(("." . "~/.config/emacs/backups/"))
|
||||
auto-save-file-name-transforms `((".*" "~/.config/emacs/autosaves/" t)))
|
||||
|
||||
(projectile-mode)
|
||||
;; (projectile-mode)
|
||||
#+end_src
|
||||
** Helper Functions
|
||||
#+begin_src emacs-lisp
|
||||
|
|
@ -170,7 +178,7 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
|
|||
|
||||
;; (set-frame-font "DejaVu Sans Mono 16")
|
||||
(add-to-list 'default-frame-alist
|
||||
'(font . "DejaVu Sans Mono-16"))
|
||||
'(font . "Fira Code Mono 16"))
|
||||
;; (load-theme 'doom-oceanic-next t)
|
||||
|
||||
(use-package base16-theme)
|
||||
|
|
@ -181,9 +189,10 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
|
|||
:config
|
||||
(default-text-scale-mode))
|
||||
#+end_src
|
||||
|
||||
** Cosmetic
|
||||
#+begin_src emacs-lisp
|
||||
(setq fancy-splash-image "~/dotfiles/guix/sink.png") ;; the best emacs logo
|
||||
(setq fancy-splash-image "~/.dotfiles/sink.png") ;; the best emacs logo
|
||||
(setq lsp-lens-enable nil) ;; gets rid of the '0 references' note from lsp
|
||||
|
||||
;; remove visual noise
|
||||
|
|
@ -270,11 +279,11 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
|
|||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
|
||||
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
|
||||
(define-key evil-normal-state-map (kbd "ghp") 'git-gutter+-previous-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghn") 'git-gutter+-next-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghr") 'git-gutter+-revert-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghs") 'git-gutter+-popup-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghS") 'git-gutter+-stage-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghp") 'git-gutter-previous-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghn") 'git-gutter-next-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghr") 'git-gutter-revert-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghs") 'git-gutter-popup-hunk)
|
||||
(define-key evil-normal-state-map (kbd "ghS") 'git-gutter-stage-hunk)
|
||||
(define-key evil-normal-state-map (kbd "gp") nil)
|
||||
(define-key evil-normal-state-map (kbd "gpn") 'popper-cycle)
|
||||
(define-key evil-normal-state-map (kbd "gpp") 'popper-cycle-backwards)
|
||||
|
|
@ -421,16 +430,6 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
|
|||
|
||||
;; opening 'other window' on a subdir enters 2 window dired mode for copy/paste
|
||||
(setq dired-dwim-target t)
|
||||
(use-package dired-single)
|
||||
|
||||
(defun my-dired-init ()
|
||||
"Bunch of stuff to run for dired, either immediately or when it's loaded."
|
||||
(define-key dired-mode-map [remap dired-find-file]
|
||||
'dired-single-buffer)
|
||||
(define-key dired-mode-map [remap dired-mouse-find-file-other-window]
|
||||
'dired-single-buffer-mouse)
|
||||
(define-key dired-mode-map [remap dired-up-directory]
|
||||
'dired-single-up-directory))
|
||||
|
||||
;; if dired's already loaded, then the keymap will be bound
|
||||
(if (boundp 'dired-mode-map)
|
||||
|
|
@ -449,9 +448,6 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
|
|||
:hook (dired-mode . all-the-icons-dired-mode))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| all-the-icons-dired-mode | dired-extra-startup |
|
||||
|
||||
** Treemacs
|
||||
#+begin_src emacs-lisp
|
||||
(use-package treemacs
|
||||
|
|
@ -516,7 +512,7 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
"-" '(dired :which-key "Find Directory")
|
||||
"d" '(docker :which-key "Docker")
|
||||
"i" '(ian/conditional-imenu :which-key "Imenu")
|
||||
"w" '(ace-window :which-key "Window")
|
||||
"w" '(acewindow :which-key "Window")
|
||||
"W" '(ace-window-manual-dispatch :which-key "Window (dispatch)")
|
||||
|
||||
;; Agenda
|
||||
|
|
@ -603,11 +599,11 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
|
||||
"gh" '(:ignore t :which-key "hunk")
|
||||
|
||||
"ghn" '(git-gutter+-previous-hunk :which-key "jump to previous hunk")
|
||||
"ghp" '(git-gutter+-next-hunk :which-key "jump to next hunk")
|
||||
"ghr" '(git-gutter+-revert-hunk :which-key "revert hunk at point")
|
||||
"ghs" '(git-gutter+-popup-hunk :which-key "show hunk")
|
||||
"ghS" '(git-gutter+-stage-hunk :which-key "stage hunk at point")
|
||||
"ghn" '(git-gutter-previous-hunk :which-key "jump to previous hunk")
|
||||
"ghp" '(git-gutter-next-hunk :which-key "jump to next hunk")
|
||||
"ghr" '(git-gutter-revert-hunk :which-key "revert hunk at point")
|
||||
"ghs" '(git-gutter-popup-hunk :which-key "show hunk")
|
||||
"ghS" '(git-gutter-stage-hunk :which-key "stage hunk at point")
|
||||
|
||||
"gl" '(:ignore t :which-key "list")
|
||||
"gli" '(forge-list-issues :which-key "list issues")
|
||||
|
|
@ -776,9 +772,6 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: t
|
||||
|
||||
* Notes
|
||||
#+begin_src emacs-lisp
|
||||
(use-package deft)
|
||||
|
|
@ -799,8 +792,7 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((emacs-lisp . t)
|
||||
(python . t)
|
||||
(mermaid . t)))
|
||||
(python . t)))
|
||||
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
|
||||
|
|
@ -842,10 +834,6 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
|
||||
(use-package ox-gfm) ; github-flavored-markdown exporter
|
||||
|
||||
(use-package ob-mermaid)
|
||||
|
||||
(setq ob-mermaid-cli-path "/usr/local/bin/mmdc")
|
||||
|
||||
(use-package org-download)
|
||||
|
||||
#+end_src
|
||||
|
|
@ -1291,9 +1279,9 @@ Uses the external fish program to provide fish-style completions to eshell etc
|
|||
#+begin_src emacs-lisp
|
||||
(use-package magit)
|
||||
(use-package magit-todos)
|
||||
(use-package git-gutter+
|
||||
(use-package git-gutter
|
||||
:diminish)
|
||||
(global-git-gutter+-mode t)
|
||||
(global-git-gutter-mode t)
|
||||
(setq magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1)
|
||||
|
||||
(use-package git-timemachine)
|
||||
|
|
@ -1599,7 +1587,7 @@ variables and their documentations).
|
|||
- when toggling shell, enter insert mode
|
||||
- migrate to wezterm, impelement popup term
|
||||
- look into letting org fold blocks or folding bracket blocks in general cases
|
||||
- try (add-hook 'magit-post-refresh-hook 'git-gutter+:refresh)
|
||||
- try (add-hook 'magit-post-refresh-hook 'git-gutter:refresh)
|
||||
- make treemacs enter always open in most recent buffer
|
||||
- add meeting log to reference reaches
|
||||
- install ini-mode plugin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue