From 9a5f3cad10e85cf632ca26531db327dfc02fb022 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 Apr 2016 01:50:55 -0400 Subject: [PATCH] sh: refactor config --- modules/module-sh.el | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/modules/module-sh.el b/modules/module-sh.el index 7038ca99c..93f694f00 100644 --- a/modules/module-sh.el +++ b/modules/module-sh.el @@ -1,29 +1,22 @@ ;;; module-sh.el --- description -(use-package company-shell - :defer t - :config - (setq company-shell-delete-duplicates t)) - (associate! sh-mode :match "\\.\\(ba\\|z\\)sh$") (associate! sh-mode :match "/\\.?z\\(sh\\(/.*\\|$\\)\\|profile\\|login\\|logout\\|shrc\\|shenv\\)$") (associate! sh-mode :match "/\\.?bash\\(/.*\\|rc\\|_profile\\)$") (after! sh-script - (add-hook 'sh-mode-hook 'flycheck-mode) - (add-hook 'sh-mode-hook 'narf|sh-extra-font-lock-activate) ; Fontify variables in strings - (add-hook! sh-mode - (electric-indent-local-mode +1) - (setq narf-electric-indent-words '("else" "elif" "fi" "done"))) - (define-repl! sh-mode narf/inf-shell) (setq sh-indent-after-continuation 'always) - ;; [pedantry intensifies] - (defadvice sh-mode (after sh-mode-rename-modeline activate) - (setq mode-name "sh")) + (add-hook 'sh-mode-hook 'flycheck-mode) + (add-hook 'sh-mode-hook 'narf|sh-extra-font-lock-activate) ; Fontify variables in strings + (add-hook! sh-mode (setq mode-name "sh")) ; [pedantry intensifies] + (add-hook! sh-mode + (electric-indent-local-mode +1) + (setq narf-electric-indent-words '("else" "elif" "fi" "done"))) (require 'company-shell) + (setq company-shell-delete-duplicates t) (sp-with-modes '(sh-mode) (sp-local-pair "case" "" :when '(("SPC")) :post-handlers '((:add narf/sp-insert-yasnippet)) :actions '(insert))