General module refactor

This commit is contained in:
Henrik Lissner 2019-03-02 01:56:32 -05:00
parent 0bd576673c
commit 7c9e96da87
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
14 changed files with 63 additions and 54 deletions

View file

@ -3,20 +3,10 @@
(def-package! elixir-mode
:defer t
:init
;; Disable default smartparens config; there are too many, they're intrusive
;; and we only want a subset of them (defined below).
;; Disable default smartparens config. There are too many pairs; we only want
;; a subset of them (defined below).
(provide 'smartparens-elixir)
:config
;; ...and only complete the basics
(after! smartparens
(sp-with-modes 'elixir-mode
(sp-local-pair "do" "end"
:when '(("RET" "<evil-ret>"))
:unless '(sp-in-comment-p sp-in-string-p)
:post-handlers '("||\n[i]"))
(sp-local-pair "do " " end" :unless '(sp-in-comment-p sp-in-string-p))
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p))))
(set-pretty-symbols! 'elixir-mode
;; Functional
:def "def"
@ -30,6 +20,16 @@
:for "for"
:return "return" :yield "use")
;; ...and only complete the basics
(after! smartparens
(sp-with-modes 'elixir-mode
(sp-local-pair "do" "end"
:when '(("RET" "<evil-ret>"))
:unless '(sp-in-comment-p sp-in-string-p)
:post-handlers '("||\n[i]"))
(sp-local-pair "do " " end" :unless '(sp-in-comment-p sp-in-string-p))
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p))))
(def-package! alchemist-company
:when (featurep! :completion company)
:commands alchemist-company