summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-03-18 21:52:47 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-03-18 21:52:47 -0400
commit72beaca8ef31f137527a7cbe0dac79dacd447f92 (patch)
treea340528f4007e9d13a8a52a9a37f0c7e9e9d0bcc /.config
parenta76623ce319a4c55fccad9cdb3deefd0ca8438fb (diff)
parentea2d3c215b3b781a5a07a6e8ea51de51c580faf1 (diff)
Merge branch 'master' into build64-par/master
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/init.el40
1 files changed, 24 insertions, 16 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 5e6ab1d..903303e 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -52,7 +52,7 @@
;; package.el
(require 'package)
-(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
+(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(setq package-enable-at-startup nil)
(package-initialize)
;; use-package.el
@@ -73,13 +73,28 @@
(smart-tabs-mode 1)
(apply 'smart-tabs-insinuate
(mapcar 'car smart-tabs-insinuate-alist))))
-(use-package editorconfig)
-;; Major modes
+(use-package editorconfig
+ :config (editorconfig-mode 1))
+;; Major modes (non-HTML-related)
(use-package bats-mode :mode "\\.bats\\'")
(use-package bison-mode
:mode (("\\.l\\'" . bison-mode)
("\\.y\\'" . bison-mode)
("\\.jison\\'" . jison-mode)))
+(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'"))
+(use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'"))
+(use-package go-mode :mode "\\.go\\'")
+(use-package graphviz-dot-mode
+ :mode ("\\.dot\\'" "\\.gv\\'")
+ :config (add-hook 'graphviz-dot-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'graphviz-dot-auto-indent-on-semi) nil)
+ )))
+(use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'"))
+(use-package meson-mode :mode "/meson\\(\\.build\\|_options\\.txt\\)\\'")
+(use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'"))
+(use-package yaml-mode :mode "\\.\\(e?ya?\\|ra\\)ml\\'")
+;; Major modes (HTML-related)
(use-package coffee-mode
:mode ("\\.coffee\\'"
"\\.iced\\'"
@@ -91,27 +106,14 @@
(set (make-local-variable 'tab-width) 2)
(set (make-local-variable 'indent-tabs-mode) nil)
)))
-(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'"))
-(use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'"))
-(use-package go-mode :mode "\\.go\\'")
-(use-package graphviz-dot-mode
- :mode ("\\.dot\\'" "\\.gv\\'")
- :config (add-hook 'graphviz-dot-mode-hook
- '(lambda ()
- (set (make-local-variable 'graphviz-dot-auto-indent-on-semi) nil)
- )))
(use-package haml-mode :mode "\\.haml\\'")
(use-package less-css-mode :mode "\\.less\\'")
-(use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'"))
-(use-package meson-mode :mode "/meson\\(\\.build\\|_options\\.txt\\)\\'")
-(use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'"))
(use-package php-mode
:mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")
:interpreter "php\\(?:-?[3457]\\(?:\\.[0-9]+\\)*\\)?")
(use-package scss-mode :mode "\\.scss\\'")
(use-package typescript-mode :mode "\\.ts\\'")
(use-package vue-mode :mode "\\.vue\\'")
-(use-package yaml-mode :mode "\\.\\(e?ya?\\|ra\\)ml\\'")
;;(use-package nxhtml) ; nxhtml is invasive, only enable if actively using
@@ -325,6 +327,12 @@ sh-script.el is broken."
(define-key erc-mode-map (kbd "C-c C-u") 'erc-cmd-QUERY)
))
+(add-hook 'js-mode-hook
+ (lambda ()
+ (hs-minor-mode t)
+ (local-set-key [C-tab] 'hs-toggle-hiding)
+ ))
+
(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.mak\\'" . makefile-gmake-mode))