Kaynağa Gözat

Mostly hook/mode clenaups for use-package declarations

Also made org-bullets not use the circled number stuff.
master
Mitchell Tishmack 6 yıl önce
committed by Mitch Tishmack
ebeveyn
işleme
03d3a0a044
1 değiştirilmiş dosya ile 74 ekleme ve 94 silme
  1. +74
    -94
      emacs.org

+ 74
- 94
emacs.org Dosyayı Görüntüle

@@ -97,6 +97,9 @@ Keep the mode line less cluttered with crap from modes I don't care about.
(diminish 'flyspell-mode)
(diminish 'whitespace-mode)
(diminish 'visual-line-mode)
:hook ((prog-mode . whitespace-mode)
(prog-mode . hl-line-mode)
(prog-mode . visual-line-mode))
)
#+END_SRC

@@ -135,7 +138,9 @@ Sick of solarized, going back to good old black on white minimalism like paper.
TODO: Maybe get this to go dark automagically?

#+BEGIN_SRC emacs-lisp
(use-package minimal-theme :ensure t :config (load-theme 'minimal-light t))
(use-package minimal-theme
:ensure t
:config (load-theme 'minimal-light t))
#+END_SRC

*** os detection
@@ -252,8 +257,10 @@ So if we don't know, call it text-mode.
utf8 is the best. Default to it.

#+BEGIN_SRC emacs-lisp
(use-package unicode-escape :ensure t)
(set-language-environment "UTF-8")
(use-package unicode-escape
:init
(set-language-environment "UTF-8")
:ensure t)
#+END_SRC

#+BEGIN_SRC emacs-lisp
@@ -529,7 +536,7 @@ If editorconfig is around use it.

#+BEGIN_SRC emacs-lisp
(use-package tramp
:defer t
:defer 5
:custom
(tramp-default-method "ssh")
:config
@@ -544,22 +551,20 @@ Turns out that someone wrote this exact thing already. Yay get to drop my own cr
#+BEGIN_SRC emacs-lisp
(use-package exec-path-from-shell
:ensure t
:init (if on-osx (exec-path-from-shell-initialize))
:if (memq window-system '(mac ns))
:config
(exec-path-from-shell-initialize)
)
#+END_SRC

*** osx-clipboard-mode

#+BEGIN_SRC emacs-lisp
(when on-osx
(use-package osx-clipboard
:ensure t
:config
(progn
(osx-clipboard-mode +1)
)
)
)
(use-package osx-clipboard
:if (memq window-system '(mac ns))
:ensure t
:config
(osx-clipboard-mode +1))
#+END_SRC

*** mode-line setup
@@ -576,7 +581,8 @@ oomph with all the crap it did.
(running (eq 'running flycheck-last-status-change)))
(if (or errorp running) (format "•%s" err))))

(use-package quelpa-use-package :ensure t)
(use-package quelpa-use-package
:ensure t)

(use-package mini-modeline
:ensure t
@@ -629,15 +635,11 @@ oomph with all the crap it did.
'("~/.emacs.d/snippets"
"~/.emacs.d/snippets-upstream"
))
:config
(yas/reload-all)
(add-hook 'prog-mode-hook
'(lambda ()
(yas-minor-mode)))
(add-hook 'org-mode-hook
'(lambda ()
(yas-minor-mode)))
)
:config
(yas/reload-all)
:hook ((prog-mode . yas-minor-mode)
(org-mode . yas-minor-mode))
)
#+END_SRC

*** semantic
@@ -655,14 +657,16 @@ Note that not all these functions are defined at package install time
'(global-semantic-idle-scheduler-mode t)
'(global-semantic-idle-local-symbol-highlight-mode t)
)
:init (semantic-mode t)
)
:init
(semantic-mode t))
#+END_SRC

*** expand-region

#+BEGIN_SRC emacs-lisp
(use-package expand-region :ensure t :bind ("C-]" . er/expand-region))
(use-package expand-region
:ensure t
:bind ("C-]" . er/expand-region))
#+END_SRC

*** ivy/swiper/projectile
@@ -673,8 +677,8 @@ Switching to ivy mode+swiper
(use-package projectile
:diminish projectile-mode
:ensure t
:init (projectile-global-mode)
)
:init
(projectile-global-mode))

(use-package counsel
:ensure t
@@ -686,8 +690,7 @@ Switching to ivy mode+swiper
("C-S-o" . counsel-rhythmbox)
("C-c C-r" . ivy-resume))
:custom
(counsel-find-file-at-point t)
)
(counsel-find-file-at-point t))

(use-package swiper
:ensure t
@@ -701,8 +704,7 @@ Switching to ivy mode+swiper
(magit-completing-read-function 'ivy-completing-read)
(ivy-use-virtual-buffers t)
(ivy-height 10)
(ivy-count-format "(%d/%d) ")
)
(ivy-count-format "(%d/%d) "))
#+END_SRC

*** magit
@@ -745,7 +747,8 @@ Save workgroup layouts. Similar..ish to desktop-save.
(wg-session-file "~/.emacs.d/workgroups")
(wg-prefix-key (kbd "C-c C-w"))
(wg-mode-line-display-on nil)
:init (workgroups-mode 1)
:init
(workgroups-mode 1)
)
#+END_SRC

@@ -844,9 +847,7 @@ validate the agenda changes.
(python . t)
(ruby . t)
(shell . t)
)))
(add-hook 'after-init-hook (lambda () (org-reload)))
)
))))
#+END_SRC

**** TODO Org-roam testing :validation:
@@ -883,7 +884,10 @@ Ref:
Validate that this installs from scratch fine, blocking babel executions is ass.

#+BEGIN_SRC emacs-lisp
(use-package ob-async :after org :ensure t :diminish)
(use-package ob-async
:after org
:ensure t
:diminish)
#+END_SRC

**** TODO org-habit customization :testing:
@@ -907,11 +911,13 @@ https://github.com/integral-dw/org-superstar-mode
#+BEGIN_SRC emacs-lisp
(use-package org-bullets
:after org
:diminish
:ensure t
:custom
(org-bullets-bullet-list '("①" "②" "③" "④" "⑤"))
(org-bullets-bullet-list '("◉" "○" "✸" "✿" "✜" "◆" "▶"))
(org-ellipsis "↴")
:hook (org-mode . org-bullets-mode)
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(when window-system
(let* ((variable-tuple (cond ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
((x-list-fonts "Lucida Grande") '(:font "Lucida Grande"))
@@ -960,13 +966,10 @@ Flycheck for on the fly checking of code.

#+BEGIN_SRC emacs-lisp
(use-package flycheck
:diminish flycheck-mode
:ensure t
:custom
(flycheck-indication-mode 'left-fringe)
:config
(add-hook 'prog-mode-hook 'flycheck-mode)
)
:hook (prog-mode . flycheck-mode))
#+END_SRC

**** TODO pkg-config lib stuff for flycheck :broken:
@@ -1000,7 +1003,7 @@ Not tangled into the config intentionally.

Auto complete functionality is nice to have.

#+BEGIN_SRC emacs-lisp :tangle no
#+BEGIN_SRC emacs-lisp
(use-package auto-complete
:diminish auto-complete-mode
:ensure t
@@ -1019,9 +1022,7 @@ Helpfully inserts matching parens, can be a pita too.
(use-package smartparens
:diminish smartparens-mode
:ensure t
:config
(add-hook 'prog-mode-hook 'smartparens-mode)
)
:hook (prog-mode . smartparens-mode))
#+END_SRC

*** rainbow delimiters
@@ -1031,9 +1032,7 @@ Makes matching parens easier.
#+BEGIN_SRC emacs-lisp
(use-package rainbow-delimiters
:ensure t
:config
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
)
:hook (prog-mode . rainbow-delimiters-mode))
#+END_SRC

*** uniquify
@@ -1091,9 +1090,7 @@ Highlight TODO/FIXME type messages in comments.
#+BEGIN_SRC emacs-lisp :tangle no
(use-package fic-mode
:ensure t
:init
(add-hook 'prog-mode-hook 'turn-on-fic-mode)
)
:hook (prog-mode . fic-mode))
#+END_SRC

*** git gutter
@@ -1128,7 +1125,8 @@ Highlight TODO/FIXME type messages in comments.
*** TODO ggtags :broken:

#+BEGIN_SRC emacs-lisp :tangle no
(use-package ggtags :ensure t)
(use-package ggtags
:ensure t)
#+END_SRC

*** TODO company-mode :broken:
@@ -1138,9 +1136,8 @@ Completion tips.
#+BEGIN_SRC emacs-lisp :tangle no
(use-package company-mode
:ensure t
:config
(add-hook 'after-init-hook 'global-company-mode)
)
:hook
(after-init . global-company-mode))
#+END_SRC

*** yaml-mode
@@ -1148,7 +1145,8 @@ Completion tips.
For.. yaml

#+BEGIN_SRC emacs-lisp
(use-package yaml-mode :ensure t)
(use-package yaml-mode
:ensure t)
#+END_SRC

*** writegood-mode
@@ -1156,7 +1154,8 @@ For.. yaml
So I write gooder. Me fail English? Thats unpossible.

#+BEGIN_SRC emacs-lisp
(use-package writegood-mode :ensure t)
(use-package writegood-mode
:ensure t)
#+END_SRC

*** rust-mode
@@ -1336,13 +1335,11 @@ Make undo more useful, and treelike.
Color variables for easy identification, its like a rainbow puked over
everything opened in prog-mode-hook.

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp :tangle no
(use-package color-identifiers-mode
:defer t
:diminish color-identifiers-mode
:config
(add-hook 'prog-mode-hook 'color-identifiers-mode)
)
:hook (prog-mode . color-identifiers-mode))
#+END_SRC

*** idle-highlight-mode
@@ -1350,13 +1347,10 @@ everything opened in prog-mode-hook.
Highlight a variable when you're selecting it, helps in reviewing code to see
where it exists.

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp :tangle no
(use-package idle-highlight-mode
:defer t
:diminish idle-highlight-mode
:config
(add-hook 'prog-mode-hook 'idle-highlight-mode)
)
:diminish
:hook (prog-mode . idle-highlight-mode))
#+END_SRC

*** nix
@@ -1364,8 +1358,11 @@ where it exists.
Instead of text might as well get a decent mode hook going here.

#+BEGIN_SRC emacs-lisp
(use-package nixos-options :defer t)
(use-package company-nixos-options :after company :defer t)
(use-package nixos-options
:defer t)
(use-package company-nixos-options
:after company
:defer t)
#+END_SRC

**** TODO nix-mode :broken:
@@ -1384,7 +1381,8 @@ Instead of text might as well get a decent mode hook going here.
*** docker-mode

#+BEGIN_SRC emacs-lisp
(use-package dockerfile-mode :defer t)
(use-package dockerfile-mode
:defer t)
#+END_SRC

*** TODO cscope or rtags or nuke :testing:validation:
@@ -1400,7 +1398,9 @@ Switch to rtags, or maybe even nuke entirely?
*** rg

#+BEGIN_SRC emacs-lisp
(use-package rg :ensure t :defer t)
(use-package rg
:ensure t
:defer t)
#+END_SRC

* mode related
@@ -1408,26 +1408,6 @@ Switch to rtags, or maybe even nuke entirely?

Common mode defaults I think are sensible.

***** TODO prog-mode hooks to use-package :broken:

ALl this crap should be moved into use-package declarations.

#+BEGIN_SRC emacs-lisp
(add-hook 'prog-mode-hook
'(lambda ()
(interactive)
(hl-line-mode)
(whitespace-mode)
(visual-line-mode)
(flyspell-prog-mode)
(custom-set-variables
'(indent-tabs-mode nil)
'(tab-width 2)
)
)
)
#+END_SRC

***** c

#+BEGIN_SRC emacs-lisp


Yükleniyor…
İptal
Kaydet