Let editorconfig-emacs handle tab settings/delete-trailing-ws
This commit is contained in:
parent
8880e3c0f4
commit
b4458dd729
13 changed files with 11 additions and 41 deletions
|
@ -201,24 +201,6 @@ Examples:
|
|||
(defun narf|enable-hard-wrap ()
|
||||
(turn-on-auto-fill))
|
||||
|
||||
(defun narf|enable-tab-width-2 ()
|
||||
(setq tab-width 2 evil-shift-width 2))
|
||||
|
||||
(defun narf|enable-tab-width-4 ()
|
||||
(setq tab-width 4 evil-shift-width 4))
|
||||
|
||||
(defun narf|enable-tab-width-8 ()
|
||||
(setq tab-width 8 evil-shift-width 8))
|
||||
|
||||
(defun narf|disable-final-newline ()
|
||||
(set (make-local-variable 'require-final-newline) nil))
|
||||
|
||||
(defun narf|enable-tabs ()
|
||||
(setq indent-tabs-mode t))
|
||||
|
||||
(defun narf|disable-tabs ()
|
||||
(setq indent-tabs-mode nil))
|
||||
|
||||
(defun narf|disable-delete-trailing-whitespace ()
|
||||
(remove-hook 'before-save-hook 'delete-trailing-whitespace))
|
||||
|
||||
|
|
|
@ -69,10 +69,10 @@ enable multiple minor modes for the same regexp.")
|
|||
(associate! emacs-lisp-mode :match "\\(/Cask\\|\\.\\(el\\|gz\\)\\)$")
|
||||
(associate! makefile-gmake-mode :match "/Makefile$")
|
||||
(associate! nxml-mode :match "\\.plist$")
|
||||
(associate! conf-mode :match "/\\.?editorconfig$")
|
||||
|
||||
(add-hook! help-mode 'visual-line-mode)
|
||||
(add-hook! special-mode (setq truncate-lines nil))
|
||||
(add-hook! before-save 'delete-trailing-whitespace)
|
||||
(add-hook! python-mode 'electric-indent-local-mode)
|
||||
(add-hook! change-major-mode-hook
|
||||
(when indent-tabs-mode (whitespace-mode +1)))
|
||||
|
@ -134,7 +134,10 @@ enable multiple minor modes for the same regexp.")
|
|||
aw-background t))
|
||||
|
||||
(use-package editorconfig
|
||||
:config (editorconfig-mode +1))
|
||||
:config
|
||||
;; Don't affect lisp indentation (just `tab-width')
|
||||
(setq editorconfig-indentation-alist (delq (assq 'emacs-lisp-mode editorconfig-indentation-alist) editorconfig-indentation-alist))
|
||||
(editorconfig-mode +1))
|
||||
|
||||
(use-package emr
|
||||
:commands (emr-initialize emr-show-refactor-menu emr-declare-command)
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
(add-hook! evil-operator-state-entry 'show-paren-mode)
|
||||
(add-hook! evil-operator-state-exit 'show-paren-mode-off)
|
||||
|
||||
;; Always ensure evil-shift-width is consistent with tab-width
|
||||
(add-hook! evil-local-mode (setq evil-shift-width tab-width))
|
||||
;; Disable highlights on insert-mode
|
||||
(add-hook! evil-insert-state-entry 'evil-ex-nohighlight)
|
||||
:config
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
yas-visit-snippet-file)
|
||||
:init
|
||||
(add-hook! (text-mode prog-mode snippet-mode markdown-mode org-mode) 'yas-minor-mode-on)
|
||||
(add-hook! snippet-mode 'narf|disable-final-newline)
|
||||
|
||||
(setq yas-verbosity 0
|
||||
yas-indent-line 'auto
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue