Move mode-specific use-package calls to the Org config

This commit is contained in:
Gergely Polonkai 2018-07-29 20:15:59 +02:00
parent e91a08594e
commit 77236cbea7
2 changed files with 98 additions and 38 deletions

View File

@ -654,3 +654,101 @@ Because we can.
(use-package diminish (use-package diminish
:defer t) :defer t)
#+END_SRC #+END_SRC
* Mode specific ~use-package~ calls
** JavaScript
#+BEGIN_SRC emacs-lisp
(use-package js2-mode
:pin melpa-stable
:mode "\\.js\\'")
#+END_SRC
** TypeScript
#+BEGIN_SRC emacs-lisp
(use-package typescript-mode
:mode "\\.ts\\'")
#+END_SRC
** CoffeeScript
#+BEGIN_SRC emacs-lisp
(use-package coffee-mode
:mode "\\.coffee\\'")
#+END_SRC
** JSON
#+BEGIN_SRC emacs-lisp
(use-package json-mode
:mode "\\.json\\'")
#+END_SRC
** YAML
#+BEGIN_SRC emacs-lisp
(use-package yaml-mode
:mode (("\\.yml\\'" . yaml-mode)
("\\.yaml\\'" . yaml-mode))
:init
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
#+END_SRC
** Markdown
#+BEGIN_SRC emacs-lisp
(use-package markdown-mode
:mode (("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode)))
#+END_SRC
** Less
#+BEGIN_SRC emacs-lisp
(use-package less-css-mode
:mode "\\.less\\'")
#+END_SRC
** Sass
#+BEGIN_SRC emacs-lisp
(use-package sass-mode
:mode "\\.sass\\'")
#+END_SRC
** Vala
#+BEGIN_SRC emacs-lisp
(use-package vala-mode
:mode "\\.vala\\'")
#+END_SRC
** Web
#+BEGIN_SRC emacs-lisp
(use-package web-mode
:mode "\\.html?\\'"
:config
(setq web-mode-enable-auto-indentation nil)
(setq web-mode-enable-engine-detection t))
#+END_SRC
** Dockerfile
#+BEGIN_SRC emacs-lisp
(use-package dockerfile-mode)
#+END_SRC
** ~.gitconfig~
#+BEGIN_SRC emacs-lisp
(use-package gitconfig-mode)
#+END_SRC
** ~.gitignore~
#+BEGIN_SRC emacs-lisp
(use-package gitignore-mode)
#+END_SRC

38
init.el
View File

@ -471,8 +471,6 @@
:bind :bind
(([f8] . focus-mode))) (([f8] . focus-mode)))
(use-package coffee-mode)
(use-package command-log-mode) (use-package command-log-mode)
(use-package company-c-headers) (use-package company-c-headers)
@ -507,10 +505,6 @@
:bind :bind
(([f6] . git-timemachine-toggle))) (([f6] . git-timemachine-toggle)))
(use-package gitconfig-mode)
(use-package gitignore-mode)
(use-package gnugo) (use-package gnugo)
(use-package gobgen) (use-package gobgen)
@ -546,16 +540,6 @@
(use-package jinja2-mode) (use-package jinja2-mode)
(use-package js2-mode
:pin melpa-stable)
(use-package json-mode)
(use-package markdown-mode
:config
(push '("\\.markdown\\'" . markdown-mode) auto-mode-alist)
(push '("\\.md\\'" . markdown-mode) auto-mode-alist))
(use-package mc-extras (use-package mc-extras
:demand :demand
:bind :bind
@ -566,8 +550,6 @@
(use-package org-projectile) (use-package org-projectile)
(use-package sass-mode)
(use-package smart-mode-line-powerline-theme (use-package smart-mode-line-powerline-theme
:init :init
(setq-default sml/theme 'powerline)) (setq-default sml/theme 'powerline))
@ -581,18 +563,8 @@
("qi" . sx-inbox) ("qi" . sx-inbox)
("qs" . sx-search))) ("qs" . sx-search)))
(use-package typescript-mode)
(use-package vala-mode
:init
(add-to-list 'auto-mode-alist '("\\.vala\\'" . vala-mode)))
(use-package xlicense) (use-package xlicense)
(use-package yaml-mode
:init
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
(use-package helm-smex (use-package helm-smex
:bind :bind
(("M-S-x" . helm-smex))) (("M-S-x" . helm-smex)))
@ -972,20 +944,12 @@ INFO plist."
(use-package csharp-mode) (use-package csharp-mode)
(use-package web-mode
:config
(setq web-mode-enable-auto-indentation nil)
(setq web-mode-enable-engine-detection t)
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)))
(use-package emmet-mode (use-package emmet-mode
:config :config
(setq emmet-self-closing-tag-style "") (setq emmet-self-closing-tag-style "")
(add-hook 'web-mode 'emmet-mode) (add-hook 'web-mode 'emmet-mode)
(add-hook 'css-mode 'emmet-mode)) (add-hook 'css-mode 'emmet-mode))
(use-package dockerfile-mode)
(use-package phi-search) (use-package phi-search)
(use-package phi-search-mc (use-package phi-search-mc
@ -1013,8 +977,6 @@ INFO plist."
(concat "am start -a android.intent.action.VIEW --user 0 -d " (concat "am start -a android.intent.action.VIEW --user 0 -d "
url)))))) url))))))
(use-package less-css-mode)
(use-package feature-mode) (use-package feature-mode)
(use-package helm-bibtex (use-package helm-bibtex