From 981aa0a5ec0647622802b0469f6da27080552aef Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 20 Nov 2017 14:00:39 +0100 Subject: emacs: added support for BATS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/custom.el | 2 +- emacs/init.html | 201 ++++++++++++++++++++++++++++++-------------------------- emacs/init.org | 7 ++ 3 files changed, 115 insertions(+), 95 deletions(-) (limited to 'emacs') diff --git a/emacs/custom.el b/emacs/custom.el index acc4390..39a56ae 100644 --- a/emacs/custom.el +++ b/emacs/custom.el @@ -15,7 +15,7 @@ '(markdown-command "/usr/bin/markdown-calibre") '(package-selected-packages (quote - (bool-flip salt-mode flycheck-rust rust-playground rust-mode vue-mode coffee-mode json-reformat erc-hl-nicks emoji-cheat-sheet-plus helm-circe htmlize cmake-mode websocket markdown-mode go-mode magit evil-leader evil helm projectile writeroom-mode org-eldoc evil-commentary yasnippet yaml-mode which-key web-mode wc-mode use-package terraform-mode smart-tabs-mode slim-mode scss-mode rainbow-delimiters php-mode org-evil olivetti mu4e-alert mmm-jinja2 markdown-preview-mode helm-projectile helm-ag go-eldoc go-add-tags flycheck expand-region evil-surround evil-org evil-numbers evil-mu4e evil-magit evil-args dockerfile-mode disable-mouse default-text-scale crux cmake-font-lock ag)))) + (bats-mode bool-flip salt-mode flycheck-rust rust-playground rust-mode vue-mode coffee-mode json-reformat erc-hl-nicks emoji-cheat-sheet-plus helm-circe htmlize cmake-mode websocket markdown-mode go-mode magit evil-leader evil helm projectile writeroom-mode org-eldoc evil-commentary yasnippet yaml-mode which-key web-mode wc-mode use-package terraform-mode smart-tabs-mode slim-mode scss-mode rainbow-delimiters php-mode org-evil olivetti mu4e-alert mmm-jinja2 markdown-preview-mode helm-projectile helm-ag go-eldoc go-add-tags flycheck expand-region evil-surround evil-org evil-numbers evil-mu4e evil-magit evil-args dockerfile-mode disable-mouse default-text-scale crux cmake-font-lock ag)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/emacs/init.html b/emacs/init.html index 2aa8ee5..a812e63 100644 --- a/emacs/init.html +++ b/emacs/init.html @@ -4,7 +4,7 @@ mssola's GNU Emacs configuration - + @@ -186,16 +186,17 @@ for the JavaScript code in this tag.
  • Languages
  • WoMan
  • @@ -814,7 +815,7 @@ require it here on the very top.
    -
    (use-package diminish
    +
    (use-package diminish
       :ensure t)
     
    @@ -832,7 +833,7 @@ Ayo silver!
    -
    (use-package ag
    +
    (use-package ag
       :ensure t
       :config
     
    @@ -854,12 +855,12 @@ Then, for keeping up with my projects I use the Projectile + Helm combination.
     
     
    -
    (use-package projectile
    +
    (use-package projectile
       :ensure t
       :config
       (projectile-mode 1))
     
    -(use-package helm
    +(use-package helm
       :ensure t
       :config
       (setq projectile-completion-system 'helm)
    @@ -891,10 +892,10 @@ Then, for keeping up with my projects I use the Projectile + Helm combination.
       (define-key helm-map (kbd "C-j") 'helm-next-line)
       (define-key helm-map (kbd "C-k") 'helm-previous-line)
     
    -  (use-package helm-ag
    +  (use-package helm-ag
         :ensure t))
     
    -(use-package helm-projectile
    +(use-package helm-projectile
       :ensure t
       :config
       (helm-projectile-on)
    @@ -1007,10 +1008,10 @@ extension. This works with lots of languages with proper glue code.
     
     
    -
    (use-package let-alist
    +
    (use-package let-alist
       :ensure t)
     
    -(use-package flycheck
    +(use-package flycheck
       :ensure t
       :diminish
       :config
    @@ -1033,7 +1034,7 @@ with your editor, you have to increase/decrease the fonts. I use the
     
     
    -
    (use-package default-text-scale
    +
    (use-package default-text-scale
       :ensure t
       :config
       (global-set-key (kbd "C-+") 'default-text-scale-increase)
    @@ -1050,7 +1051,7 @@ supports it).
     
     
    -
    (use-package rainbow-delimiters
    +
    (use-package rainbow-delimiters
       :ensure t)
     
    @@ -1061,7 +1062,7 @@ I never use the mouse.
    -
    (use-package disable-mouse
    +
    (use-package disable-mouse
       :ensure t
       :config
       (global-disable-mouse-mode)
    @@ -1077,7 +1078,7 @@ commands for the current chord as a list.
     
     
    -
    (use-package which-key
    +
    (use-package which-key
       :ensure t
       :diminish which-key-mode
       :config
    @@ -1092,7 +1093,7 @@ this, we have wc-mode.
     
     
    -
    (use-package wc-mode
    +
    (use-package wc-mode
       :ensure t)
     
    @@ -1104,7 +1105,7 @@ that often, but it's cool to have a distraction-free screen from time to time.
    -
    (use-package writeroom-mode
    +
    (use-package writeroom-mode
       :ensure t)
     
    @@ -1117,7 +1118,7 @@ most of my uses, it's convenient to have this tool anyways.
    -
    (use-package expand-region
    +
    (use-package expand-region
       :ensure t
       :config
     
    @@ -1169,7 +1170,7 @@ remember some of these snippets, I've mapped , h to
     
     
    -
    (use-package yasnippet
    +
    (use-package yasnippet
       :ensure t
       :diminish yas-minor-mode
       :init (yas-global-mode)
    @@ -1186,7 +1187,7 @@ remember some of these snippets, I've mapped , h to
     
     
    -
    (use-package bool-flip
    +
    (use-package bool-flip
       :ensure t
       :config
       (global-set-key (kbd "C-c b") 'bool-flip-do-flip))
    @@ -1342,7 +1343,7 @@ Now make sure that Evil is installed, and call the relevant configuration functi
     
     
    -
    (use-package evil
    +
    (use-package evil
       :ensure t
       :config
     
    @@ -1372,7 +1373,7 @@ Vim into Evil.
     
     
    -
    (use-package evil-leader
    +
    (use-package evil-leader
       :ensure t
       :config
       (global-evil-leader-mode)
    @@ -1399,7 +1400,7 @@ having double quotes with single quotes in a single command).
     
     
    -
    (use-package evil-surround
    +
    (use-package evil-surround
       :ensure t
       :config
       (global-evil-surround-mode 1))
    @@ -1415,7 +1416,7 @@ the current line, regardless of the programming language.
     
     
    -
    (use-package evil-commentary
    +
    (use-package evil-commentary
       :ensure t
       :config
       (evil-commentary-mode t))
    @@ -1431,7 +1432,7 @@ respectively.
     
     
    -
    (use-package evil-args
    +
    (use-package evil-args
       :ensure t
       :config
       ; Configuration taken from the documentation of evil-args.
    @@ -1457,7 +1458,7 @@ into Evil: C-a for increasing a number, and
     
     
    -
    (use-package evil-numbers
    +
    (use-package evil-numbers
       :ensure t
       :config
       (define-key evil-normal-state-map (kbd "C-a") 'evil-numbers/inc-at-pt)
    @@ -1477,7 +1478,7 @@ certainly useful for some common tasks (I guess that I still need some learning)
     
     
    -
    (use-package magit
    +
    (use-package magit
       :ensure t
       :config
     
    @@ -1530,7 +1531,7 @@ And repair some key bindings from Evil mode.
    (with-eval-after-load 'evil-leader
       (evil-leader/set-key "s" 'magit-status)
     
    -  (use-package evil-magit
    +  (use-package evil-magit
         :ensure t
         :config
     
    @@ -1878,7 +1879,7 @@ I want desktop notifications when receiving email.
     
     
    -
    (use-package mu4e-alert
    +
    (use-package mu4e-alert
       :ensure t
       :config
     
    @@ -1894,7 +1895,7 @@ I want desktop notifications when receiving email.
     
     ; Evil mode in mu4e
     (with-eval-after-load 'evil
    -  (use-package evil-mu4e
    +  (use-package evil-mu4e
         :ensure t
         :config
     
    @@ -2038,7 +2039,7 @@ blocks to be converted into HTML as well, so we can properly colorize it).
     
     
    -
    (use-package htmlize
    +
    (use-package htmlize
       :ensure t)
     
    @@ -2245,7 +2246,7 @@ I'm using -
    (use-package erc
    +
    (use-package erc
       :config
     
    @@ -2327,7 +2328,7 @@ Use the erc-hl-nicks package, so highlight support for nicknames is
    -
    (use-package erc-hl-nicks
    +
    (use-package erc-hl-nicks
       :ensure t
       :init
       (with-eval-after-load 'erc
    @@ -2439,8 +2440,20 @@ context too. In this case, I want spell check and wc-mode activated
     
    -

    Lisp

    +

    Shell

    +
    + +
    (use-package bats-mode
    +  :ensure t)
    +
    +
    +
    +
    + +
    +

    Lisp

    +

    Emacs lisp needs rainbow-delimiters, so the amount of parenthesis is less confusing. Moreover, I'm also enabling eldoc-mode and the aforementioned @@ -2461,9 +2474,9 @@ confusing. Moreover, I'm also enabling eldoc-mode and the aforement

    -
    -

    C and C++

    -
    +
    +

    C and C++

    +

    C and C++ only require the warnings-mode-hook function, spell checking for the comments and the usage of tabs instead of spaces. @@ -2491,7 +2504,7 @@ CMake for y'all.

    -
    (use-package cmake-mode
    +
    (use-package cmake-mode
       :ensure t
       :config
     
    @@ -2501,7 +2514,7 @@ CMake for y'all.
              '(("\\.cmake\\'" . cmake-mode))
              auto-mode-alist))
     
    -  (use-package cmake-font-lock
    +  (use-package cmake-font-lock
         :ensure t
         :config
     
    @@ -2512,9 +2525,9 @@ CMake for y'all.
     
    -
    -

    Ruby

    -
    +
    +

    Ruby

    +

    Include warning keywords in Ruby.

    @@ -2527,9 +2540,9 @@ Include warning keywords in Ruby.
    -
    -

    Go

    -
    +
    +

    Go

    +

    And now my Go configuration. This includes stuff like the usage of goimports, gofmt on save, among many other useful things. @@ -2558,18 +2571,18 @@ And now my Go configuration. This includes stuff like the usage of goimpor (flyspell-prog-mode) ; eldoc support - (use-package go-eldoc + (use-package go-eldoc :ensure t :config (require 'go-eldoc)) - (use-package go-add-tags + (use-package go-add-tags :ensure t :config (evil-leader/set-key "t" 'go-add-tags))) ;; Go -(use-package go-mode +(use-package go-mode :ensure t :pin melpa-stable :config @@ -2582,16 +2595,16 @@ And now my Go configuration. This includes stuff like the usage of goimpor

    -
    -

    Rust

    -
    +
    +

    Rust

    +

    Install rust-mode and add some hooks to make it friendlier.

    -
    (use-package rust-mode
    +
    (use-package rust-mode
       :ensure t
       :config
     
    @@ -2600,7 +2613,7 @@ Install rust-mode and add some hooks to make it friendlier.
                     (when (eq major-mode 'rust-mode)
                       (rust-format-buffer))))
     
    -  (use-package flycheck-rust
    +  (use-package flycheck-rust
         :ensure t
         :config
     
    @@ -2610,9 +2623,9 @@ Install rust-mode and add some hooks to make it friendlier.
     
    -
    -

    Tabs vs spaces

    -
    +
    +

    Tabs vs spaces

    +

    Tabs or spaces? Both. The smart-tabs-mode has the philosophy of: tabs for indentation, spaces for alignment. This is only applied in languages where I'm @@ -2621,7 +2634,7 @@ usings tabs for indentation (C, C++ and Go).

    -
    (use-package smart-tabs-mode
    +
    (use-package smart-tabs-mode
       :ensure t
       :config
       (smart-tabs-add-language-support golang go-mode-hook
    @@ -2633,13 +2646,13 @@ usings tabs for indentation (C, C++ and Go).
     
    -
    -

    Inferior markup languages.

    -
    +
    +

    Inferior markup languages.

    +
    ;; Markdown mode with preview mode in the browser.
    -(use-package markdown-mode
    +(use-package markdown-mode
       :ensure t
       :config
     
    @@ -2649,14 +2662,14 @@ usings tabs for indentation (C, C++ and Go).
     
       ; Preview mode does its things through websockets, so it's a requirement.
       ; After that, we can safely require it.
    -  (use-package websocket
    +  (use-package websocket
         :ensure t
         :config
    -    (use-package markdown-preview-mode
    +    (use-package markdown-preview-mode
           :ensure t)))
     
     ; YAML
    -(use-package yaml-mode
    +(use-package yaml-mode
       :ensure t
       :config
     
    @@ -2666,26 +2679,26 @@ usings tabs for indentation (C, C++ and Go).
     
    -
    -

    Web-related stuff.

    -
    +
    +

    Web-related stuff.

    +

    Slim and SCSS.

    -
    (use-package slim-mode
    +
    (use-package slim-mode
       :ensure t)
     
    -(use-package scss-mode
    +(use-package scss-mode
       :ensure t
       :config
     
       (setq scss-compile-at-save nil)
       (add-hook 'yaml-mode-hook 'warnings-mode-hook))
     
    -(use-package coffee-mode
    +(use-package coffee-mode
       :ensure t)
     
    @@ -2697,10 +2710,10 @@ bundle of features which are interesting for web-related stuff.
    -
    (use-package php-mode
    +
    (use-package php-mode
       :ensure t)
     
    -(use-package web-mode
    +(use-package web-mode
       :ensure t
       :config
     
    @@ -2719,7 +2732,7 @@ bundle of features which are interesting for web-related stuff.
                   (setq js-indent-level 2)
                   (rainbow-delimiters-mode 1)))
     
    -  (use-package vue-mode
    +  (use-package vue-mode
         :ensure t
         :config
         (setq mmm-submode-decoration-level 0))
    @@ -2746,23 +2759,23 @@ can be frustrating without proper formatting.
     
     
    -
    (use-package json-reformat
    +
    (use-package json-reformat
       :ensure t)
     
    -