Update hydras for Elixir, FSharp and Haskell
This commit is contained in:
parent
1f4e8c4eff
commit
55f0f06a12
3 changed files with 44 additions and 6 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue