Update hydras for Elixir, FSharp and Haskell

This commit is contained in:
Maciej 2020-10-09 14:34:40 +03:00
parent 1f4e8c4eff
commit 55f0f06a12
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
3 changed files with 44 additions and 6 deletions

View file

@ -18,20 +18,37 @@
:ensure t
:defer t)
(use-package dante
(use-package lsp-haskell
:ensure t
:defer t
:requires (haskell-mode))
:requires (lsp-mode lsp-ui haskell-mode)
:config
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper"))
(defhydra my-haskell/context-hydra (:color teal :hint nil)
"
Haskell actions
^Haskell^ ^Actions^
^^^^^^^^-----------------------------------------------------------------------
_f_: Format buffer
_i_: imenu
"
("q" nil "cancel" :color blue)
("f" lsp-format-buffer)
("i" lsp-ui-imenu))
(defun activate-haskell-mode ()
"Run this in haskell-mode."
(set-indent 2)
(column-enforce-n 80)
(dante-mode)
(lsp)
(define-key haskell-mode-map (kbd "C-c l") 'my-haskell/context-hydra/body)
;; Company list override
(add-to-list (make-local-variable 'company-backends)
'(dante-company company-yasnippet)))
'(company-capf company-yasnippet)))
(add-hook 'haskell-mode-hook 'activate-haskell-mode)