From 77236cbea70e96c7501a4d41abf419855cb9a69b Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 29 Jul 2018 20:15:59 +0200 Subject: [PATCH] Move mode-specific use-package calls to the Org config --- configuration.org | 98 +++++++++++++++++++++++++++++++++++++++++++++++ init.el | 38 ------------------ 2 files changed, 98 insertions(+), 38 deletions(-) diff --git a/configuration.org b/configuration.org index 39a56c0..cf98244 100644 --- a/configuration.org +++ b/configuration.org @@ -654,3 +654,101 @@ Because we can. (use-package diminish :defer t) #+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 diff --git a/init.el b/init.el index 11df293..f14c9a3 100644 --- a/init.el +++ b/init.el @@ -471,8 +471,6 @@ :bind (([f8] . focus-mode))) -(use-package coffee-mode) - (use-package command-log-mode) (use-package company-c-headers) @@ -507,10 +505,6 @@ :bind (([f6] . git-timemachine-toggle))) -(use-package gitconfig-mode) - -(use-package gitignore-mode) - (use-package gnugo) (use-package gobgen) @@ -546,16 +540,6 @@ (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 :demand :bind @@ -566,8 +550,6 @@ (use-package org-projectile) -(use-package sass-mode) - (use-package smart-mode-line-powerline-theme :init (setq-default sml/theme 'powerline)) @@ -581,18 +563,8 @@ ("qi" . sx-inbox) ("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 yaml-mode - :init - (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) - (use-package helm-smex :bind (("M-S-x" . helm-smex))) @@ -972,20 +944,12 @@ INFO plist." (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 :config (setq emmet-self-closing-tag-style "") (add-hook 'web-mode 'emmet-mode) (add-hook 'css-mode 'emmet-mode)) -(use-package dockerfile-mode) - (use-package phi-search) (use-package phi-search-mc @@ -1013,8 +977,6 @@ INFO plist." (concat "am start -a android.intent.action.VIEW --user 0 -d " url)))))) -(use-package less-css-mode) - (use-package feature-mode) (use-package helm-bibtex