minor fixes

master
Alison G. Watson 2020-12-07 06:02:01 -07:00
parent d9fe66af1a
commit ff42f1158d
2 changed files with 53 additions and 18 deletions

View File

@ -9,8 +9,14 @@
(defvar-local agw-no-fixes nil (defvar-local agw-no-fixes nil
"Fixes files before save if nil in this buffer.") "Fixes files before save if nil in this buffer.")
(defvar-local agw-no-tabs nil
"Disables tabs in this buffer.")
(defvar-local agw-no-tabs-width 2
"The width of non-hardware tabs with `agw-no-tabs'.")
(defvar-local agw-work nil (defvar-local agw-work nil
"Changes the functionality of `agw-prog-mode'.") "Changes functionality for a work environment.")
(define-minor-mode agw-key-map-mode (define-minor-mode agw-key-map-mode
"Minor mode for key bindings." "Minor mode for key bindings."
@ -23,15 +29,11 @@
(defun agw-fp-mode () (defun agw-fp-mode ()
"Sets up lisp and other functional language major modes." "Sets up lisp and other functional language major modes."
(setq-local indent-tabs-mode nil (setq-local agw-no-tabs t))
standard-indent 2
tab-width 2))
(defun agw-org-mode () (defun agw-org-mode ()
"Sets up `org-mode'." "Sets up `org-mode'."
(setq-local indent-tabs-mode nil (setq-local agw-no-tabs t)
standard-indent 2
tab-width 2)
(define-key evil-normal-state-map (kbd "TAB") 'org-cycle)) (define-key evil-normal-state-map (kbd "TAB") 'org-cycle))
(defun agw-cc-mode () (defun agw-cc-mode ()
@ -64,20 +66,25 @@
(defun agw-prog-mode () (defun agw-prog-mode ()
"Sets up `prog-mode' and `text-mode'." "Sets up `prog-mode' and `text-mode'."
(if agw-work (setq-local tab-always-indent t)
(setq-local tab-always-indent t (when agw-work
tab-width 4 (setq-local agw-no-tabs t
standard-indent 4 agw-no-tabs-width 4))
indent-tabs-mode nil) (if agw-no-tabs
(setq-local tab-always-indent nil (progn
tab-width 3 (setq-local indent-tabs-mode nil
standard-indent 3 standard-indent agw-no-tabs-width
indent-tabs-mode t))) tab-width agw-no-tabs-width)
(smart-tabs-mode 0))
(progn
(setq-local indent-tabs-mode t
standard-indent 3
tab-width 3)
(smart-tabs-mode 1))))
(defun agw-after-local-vars () (defun agw-after-local-vars ()
(if (or (derived-mode-p 'prog-mode) (derived-mode-p 'text-mode)) (if (or (derived-mode-p 'prog-mode) (derived-mode-p 'text-mode))
(agw-prog-mode)) (agw-prog-mode)))
(unless indent-tabs-mode (smart-tabs-mode 0)))
;; Lithium dialogues mode ;; Lithium dialogues mode
(setq agw-lithdlg-highlights (setq agw-lithdlg-highlights

View File

@ -106,6 +106,9 @@
:foreground "#92ebf0")) :foreground "#92ebf0"))
;; major modes ;; major modes
(use-package elisp-mode)
(use-package eldoc)
(use-package powershell (use-package powershell
:ensure t :ensure t
:init :init
@ -311,6 +314,11 @@
:config :config
(auto-image-file-mode)) (auto-image-file-mode))
(use-package editorconfig
:ensure t
:config
(editorconfig-mode 1))
;; ergonomics ;; ergonomics
(use-package mwheel (use-package mwheel
:init :init
@ -417,6 +425,26 @@
:config :config
(fringe-mode 0)) (fringe-mode 0))
(use-package subword)
(use-package dim
:ensure t
:after (editorconfig
eldoc
simple
subword
undo-tree
whitespace)
:config
(dim-minor-names
'((abbrev-mode "Ab")
(editorconfig-mode "Ec")
(eldoc-mode "El")
(isearch-mode "Is")
(subword-mode "Sw")
(undo-tree-mode "Ut")
(whitespace-mode "Ws"))))
;; end of init ;; end of init
(setq gc-cons-threshold (* 1 1000 1000)) (setq gc-cons-threshold (* 1 1000 1000))