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