emacs: move indentation settings about
parent
1f6e84dc30
commit
31c030183a
|
@ -20,6 +20,13 @@
|
||||||
(interactive "FFile to touch: ")
|
(interactive "FFile to touch: ")
|
||||||
(start-process "agw-touch" nil "touch" (expand-file-name fname)))
|
(start-process "agw-touch" nil "touch" (expand-file-name fname)))
|
||||||
|
|
||||||
|
(defun agw-prog-mode ()
|
||||||
|
"Sets up `prog-mode'."
|
||||||
|
(setq-local tab-always-indent nil)
|
||||||
|
(setq-local tab-width 3)
|
||||||
|
(setq-local standard-indent 3)
|
||||||
|
(setq-local indent-tabs-mode t))
|
||||||
|
|
||||||
(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 indent-tabs-mode nil)
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
mark-ring-max 1024)
|
mark-ring-max 1024)
|
||||||
|
|
||||||
(load custom-file)
|
(load custom-file)
|
||||||
|
(load "~/.emacs.d/data.el")
|
||||||
|
|
||||||
;; encoding
|
;; encoding
|
||||||
(setq current-language-environment "UTF-8"
|
(setq current-language-environment "UTF-8"
|
||||||
|
@ -32,6 +33,8 @@
|
||||||
|
|
||||||
(set-face-attribute 'variable-pitch nil :height 120 :family "Noto Sans")
|
(set-face-attribute 'variable-pitch nil :height 120 :family "Noto Sans")
|
||||||
|
|
||||||
|
(defvaralias 'c-basic-offset 'tab-width)
|
||||||
|
|
||||||
;; ergonomics
|
;; ergonomics
|
||||||
(defalias #'yes-or-no-p #'y-or-n-p)
|
(defalias #'yes-or-no-p #'y-or-n-p)
|
||||||
(setq line-move-ignore-invisible nil
|
(setq line-move-ignore-invisible nil
|
||||||
|
@ -52,26 +55,11 @@
|
||||||
hscroll-step 1)
|
hscroll-step 1)
|
||||||
(set-scroll-bar-mode nil)
|
(set-scroll-bar-mode nil)
|
||||||
|
|
||||||
;; tabulation
|
;; `prog-mode'
|
||||||
(setq tab-always-indent nil
|
|
||||||
tab-width 3
|
|
||||||
standard-indent 3
|
|
||||||
indent-tabs-mode t)
|
|
||||||
|
|
||||||
(defvaralias 'c-basic-offset 'tab-width)
|
|
||||||
(defvaralias 'ruby-indent-level 'tab-width)
|
|
||||||
(defvaralias 'rust-indent-offset 'tab-width)
|
|
||||||
|
|
||||||
(load "~/.emacs.d/data.el")
|
|
||||||
|
|
||||||
;; spelling
|
|
||||||
(add-hook 'prog-mode-hook #'flyspell-prog-mode)
|
(add-hook 'prog-mode-hook #'flyspell-prog-mode)
|
||||||
|
|
||||||
;; prettify symbols
|
|
||||||
(add-hook 'prog-mode-hook #'prettify-symbols-mode)
|
(add-hook 'prog-mode-hook #'prettify-symbols-mode)
|
||||||
|
|
||||||
;; subword mode
|
|
||||||
(add-hook 'prog-mode-hook #'subword-mode)
|
(add-hook 'prog-mode-hook #'subword-mode)
|
||||||
|
(add-hook 'prog-mode-hook #'agw-prog-mode)
|
||||||
|
|
||||||
;; pkgdb
|
;; pkgdb
|
||||||
(setq package-enable-at-startup nil
|
(setq package-enable-at-startup nil
|
||||||
|
@ -152,10 +140,13 @@
|
||||||
(use-package ruby-mode
|
(use-package ruby-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
(defvaralias 'ruby-indent-level 'tab-width)
|
||||||
(setq ruby-insert-encoding-magic-comment nil))
|
(setq ruby-insert-encoding-magic-comment nil))
|
||||||
|
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
:ensure t)
|
:ensure t
|
||||||
|
:init
|
||||||
|
(defvaralias 'rust-indent-offset 'tab-width))
|
||||||
|
|
||||||
;; org-mode
|
;; org-mode
|
||||||
(use-package org
|
(use-package org
|
||||||
|
|
Loading…
Reference in New Issue