sh-mode: extract mode associations; use electric-indent
This commit is contained in:
parent
ae7a75f669
commit
3ffde24ca9
1 changed files with 6 additions and 0 deletions
|
@ -1,12 +1,18 @@
|
||||||
;;; module-sh.el --- description
|
;;; module-sh.el --- description
|
||||||
|
|
||||||
|
(associate! sh-mode :match "/\\.dotfiles/aliases$")
|
||||||
|
(associate! sh-mode :match "/\\.?z\\(sh/.*\\|profile\\|login\\|logout\\|shrc\\|shenv\\)$")
|
||||||
|
(associate! sh-mode :match "/\\.?bash\\(/.*\\|rc\\|_profile\\)$")
|
||||||
(after! sh-script
|
(after! sh-script
|
||||||
;; [pedantry intensifies]
|
;; [pedantry intensifies]
|
||||||
(defadvice sh-mode (after sh-mode-rename-modeline activate)
|
(defadvice sh-mode (after sh-mode-rename-modeline activate)
|
||||||
(setq mode-name "sh"))
|
(setq mode-name "sh"))
|
||||||
|
|
||||||
|
(setq sh-indent-after-continuation 'always)
|
||||||
|
|
||||||
(define-repl! sh-mode narf/inf-shell)
|
(define-repl! sh-mode narf/inf-shell)
|
||||||
(add-hook! sh-mode 'flycheck-mode)
|
(add-hook! sh-mode 'flycheck-mode)
|
||||||
|
(add-hook! sh-mode 'electric-indent-local-mode)
|
||||||
|
|
||||||
;; Fontify variables in strings
|
;; Fontify variables in strings
|
||||||
(add-hook 'sh-mode-hook 'narf|sh-extra-font-lock-activate))
|
(add-hook 'sh-mode-hook 'narf|sh-extra-font-lock-activate))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue