Make language packages nicer

This commit is contained in:
Maciej 2020-07-24 13:07:16 +03:00
parent f1d3e7d6d7
commit 4b10beec8d
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
12 changed files with 82 additions and 28 deletions

View file

@ -1,11 +1,26 @@
;;; elixir -- summary
;;; languages/elixir -- summary
;;; Commentary:
;;; Code:
(require '05prog-mode "$HOME/.emacs.d/05prog-mode.el")
(require '05flycheck "$HOME/.emacs.d/05flycheck.el")
(require '05hydra "$HOME/.emacs.d/05hydra.el")
(use-package elixir-mode
:requires (lsp-mode lsp-ui)
:ensure t
:config)
:ensure t)
(defhydra my-elixir/context-hydra (:color teal :hint nil)
"
Elixir actions
^Elixir^ ^Actions^
^^^^^^^^-----------------------------------------------------------------------
_f_: Format buffer
"
("q" nil "cancel" :color blue)
("f" elixir-format))
(defun activate-elixir-mode ()
"All things Elixir."
@ -13,6 +28,7 @@
(column-enforce-n 98)
(setq-local flycheck-check-syntax-automatically '(save mode-enabled))
(define-key elixir-mode-map (kbd "<f17>") 'elixir-format)
(define-key elixir-mode-map (kbd "C-c l") 'my-elixir/context-hydra/body)
;; Company list override
(add-to-list (make-local-variable 'company-backends)
@ -20,5 +36,5 @@
(add-hook 'elixir-mode-hook 'activate-elixir-mode)
(provide 'elixir)
(provide 'languages/elixir)
;;; elixir.el ends here