From 874b5eac1d6900fb2c2c35557ed14c24dd234300 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 25 Jan 2017 17:41:29 +0100 Subject: emacs: improved yasnippet and diminish some minor modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/init.html | 60 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 18 deletions(-) (limited to 'emacs/init.html') diff --git a/emacs/init.html b/emacs/init.html index fb71af3..c4c85c2 100644 --- a/emacs/init.html +++ b/emacs/init.html @@ -4,7 +4,7 @@ mssola's GNU Emacs configuration - + @@ -709,6 +709,18 @@ package-install, I decided on use-package because I feel more well-organized. (package-install 'use-package)) + +

+Some use-package calls require diminish.el to be available. So, let's +require it here on the very top. +

+ +
+ +
(use-package diminish
+  :ensure t)
+
+
@@ -854,9 +866,13 @@ recent versions of GNU Emacs.
(with-eval-after-load 'undo-tree
   (global-undo-tree-mode 1)
+
   (setq undo-tree-visualizer-diff t
         undo-tree-visualizer-timestamps t
         undo-tree-visualizer-relative-timestamps t)
+
+  (diminish 'undo-tree-mode)
+
   (with-eval-after-load 'evil-leader
     (evil-leader/set-key
       "u" 'undo-tree-visualize)))
@@ -875,6 +891,7 @@ extension. This works with lots of languages with proper glue code.
 
 (use-package flycheck
   :ensure t
+  :diminish
   :config
   (add-hook 'after-init-hook 'global-flycheck-mode)
 
@@ -925,6 +942,7 @@ I never use the mouse.
 
 
(use-package disable-mouse
   :ensure t
+  :diminish
   :config
   (global-disable-mouse-mode))
 
@@ -999,6 +1017,27 @@ covers most of my uses, it's convenient to have this tool anyways. (add-hook 'text-mode-hook 'er/add-text-mode-expansions)
+ +

+Last but not least, YASnippet. This package allows people to define shortcuts +for writing some common blocks. Moreover, it comes with a set of builtin +snippets already. Since I don't remember some of these snippets, I've mapped +, a to yas-describe-tables, which shows the available +snippets in another buffer. +

+ +
+ +
(use-package yasnippet
+  :ensure t
+  :diminish yas-minor-mode
+  :init (yas-global-mode)
+  :config
+  (yas-global-mode 1)
+  (with-eval-after-load 'evil-leader
+    (evil-leader/set-key "h" 'yas-describe-tables)))
+
+
@@ -1521,7 +1560,7 @@ render an HTML message with Webkit.

-Look for mu4e-msg2pdf in the exec path. The reason for this is that that OBS +Look for mu4e-msg2pdf in the exec path. The reason for this is that the OBS package installs mu's toys into the exec path, but mu4e doesn't really count on it.

@@ -2169,21 +2208,6 @@ criteria really). (add-hook lang-hook 'soria-purple-identifiers)) - -

-Last but not least, YASnippet. This package allows people to define shortcuts -for writing some common blocks. -

- -
- -
(use-package yasnippet
-  :ensure t
-  :config
-  (yas-reload-all)
-  (add-hook 'prog-mode-hook #'yas-minor-mode))
-
-
@@ -2261,7 +2285,7 @@ along with this program. If not, see < -- cgit v1.2.3