master
Alison G. Watson 2020-12-07 06:02:01 -07:00
rodzic d9fe66af1a
commit ff42f1158d
2 zmienionych plików z 53 dodań i 18 usunięć

Wyświetl plik

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

Wyświetl plik

@ -106,6 +106,9 @@
:foreground "#92ebf0"))
;; major modes
(use-package elisp-mode)
(use-package eldoc)
(use-package powershell
:ensure t
:init
@ -311,6 +314,11 @@
:config
(auto-image-file-mode))
(use-package editorconfig
:ensure t
:config
(editorconfig-mode 1))
;; ergonomics
(use-package mwheel
:init
@ -417,6 +425,26 @@
:config
(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
(setq gc-cons-threshold (* 1 1000 1000))