diff options
| author | alex <alex@pdp7.net> | 2023-02-20 23:52:34 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-02-20 23:54:19 +0100 |
| commit | 0ff93a1a5affc651d65a049830c2cae2a5e8e7a0 (patch) | |
| tree | 5fd3e6639129f68ecff43652a877c2cd410c882a | |
| parent | e39389225f78bf1a7732bb5f6c36d458d763b878 (diff) | |
Rearrange emacs.el, add comments
| -rw-r--r-- | emacs/emacs.el | 90 |
1 files changed, 59 insertions, 31 deletions
diff --git a/emacs/emacs.el b/emacs/emacs.el index f1ba7e80..e5247a5b 100644 --- a/emacs/emacs.el +++ b/emacs/emacs.el @@ -20,6 +20,34 @@ (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) +;; Nicer defaults + +(setq compilation-scroll-output t) +(setq column-number-mode t) +(setq-default show-trailing-whitespace t) + +;; Colorblind friendly theme. +;; Emacs 28 has modus themes, but EL9 only has emacs 27 + +(straight-use-package 'modus-themes) +(require 'modus-themes) +(load-theme 'modus-operandi :no-confirm) + +;; Install xclip so cutting/copying in Emacs on a terminal affects the graphical clipboard + +(straight-use-package 'xclip) +(xclip-mode 1) + +;; Fancy undo + +(straight-use-package 'undo-tree) +(global-undo-tree-mode) +(setq undo-tree-visualizer-diff t) +(setq undo-tree-visualizer-timestamp t) +(setq undo-tree-auto-save-history t) + +;; nicer completion UI + (straight-use-package 'helm) (global-set-key (kbd "M-x") #'helm-M-x) @@ -28,6 +56,8 @@ (setq helm-ff-skip-boring-files t) +;; nicer project support + (straight-use-package 'projectile) (straight-use-package 'helm-projectile) @@ -35,60 +65,47 @@ (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) (helm-projectile-on) -(straight-use-package 'adoc-mode) - -(straight-use-package - '(flymake-vale :type git :host github :repo "tpeacock19/flymake-vale")) - -(add-hook 'adoc-mode-hook #'flymake-vale-load) -(add-hook 'find-file-hook 'flymake-vale-maybe-load) -(add-hook 'adoc-mode-hook 'flymake-mode) - -(straight-use-package 'flymake-aspell) -(add-hook 'adoc-mode-hook #'flymake-aspell-setup) -(setq ispell-dictionary "en_US-RH") - -(add-hook 'adoc-mode-hook (lambda () (setq flymake-aspell-aspell-mode "asciidoc"))) +;; LSP base for Rust and Java (straight-use-package 'lsp-mode) (straight-use-package 'company-mode) (straight-use-package 'lsp-ui) +;; Rust support + (straight-use-package 'rust-mode) (add-hook 'rust-mode-hook #'lsp) (add-hook 'rust-mode-hook (lambda () (setq indent-tabs-mode nil))) (setq rust-format-on-save t) +;; Python support + (straight-use-package 'elpy) (elpy-enable) +;;; Java Support + (straight-use-package 'lsp-java) (add-hook 'java-mode-hook 'lsp) +;; YAML support + (straight-use-package 'yaml-mode) ;; lsp-mode seems unusably slow, so don't install the Ansible language server ;; if you want to get it working, try https://www.reddit.com/r/emacs/comments/ybbkks/how_to_properly_set_up_lsp_ansible_language/itfxoaa/ + (straight-use-package 'ansible) (add-hook 'yaml-mode-hook 'ansible) -;; mostly for syntax highlighting -(straight-use-package 'puppet-mode) +;; Puppet support; mostly for syntax highlighting -;; emacs 28 has modus themes, but EL9 only has emacs 27 -(straight-use-package 'modus-themes) -(require 'modus-themes) -(load-theme 'modus-operandi :no-confirm) +(straight-use-package 'puppet-mode) -(setq column-number-mode t) -(setq-default show-trailing-whitespace t) +;; ==== WORK ==== -(straight-use-package 'undo-tree) -(global-undo-tree-mode) -(setq undo-tree-visualizer-diff t) -(setq undo-tree-visualizer-timestamp t) -(setq undo-tree-auto-save-history t) +;; Abbrevs for work, declared in emacs.el for version control (clear-abbrev-table global-abbrev-table) @@ -104,8 +121,19 @@ (setq save-abbrevs nil) -(setq compilation-scroll-output t) +;; AsciiDoc + Vale + Aspell support for work -;; and install xclip so cutting/copying in Emacs on a terminal affects the graphical clipboard -(straight-use-package 'xclip) -(xclip-mode 1) +(straight-use-package 'adoc-mode) + +(straight-use-package + '(flymake-vale :type git :host github :repo "tpeacock19/flymake-vale")) + +(add-hook 'adoc-mode-hook #'flymake-vale-load) +(add-hook 'find-file-hook 'flymake-vale-maybe-load) +(add-hook 'adoc-mode-hook 'flymake-mode) + +(straight-use-package 'flymake-aspell) +(add-hook 'adoc-mode-hook #'flymake-aspell-setup) +(setq ispell-dictionary "en_US-RH") + +(add-hook 'adoc-mode-hook (lambda () (setq flymake-aspell-aspell-mode "asciidoc"))) |
