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
|
|
@ -17,10 +17,12 @@
|
||||||
^Elixir^ ^Actions^
|
^Elixir^ ^Actions^
|
||||||
^^^^^^^^-----------------------------------------------------------------------
|
^^^^^^^^-----------------------------------------------------------------------
|
||||||
_f_: Format buffer
|
_f_: Format buffer
|
||||||
|
_i_: imenu
|
||||||
"
|
"
|
||||||
("q" nil "cancel" :color blue)
|
("q" nil "cancel" :color blue)
|
||||||
|
|
||||||
("f" elixir-format))
|
("f" elixir-format)
|
||||||
|
("i" lsp-ui-imenu))
|
||||||
|
|
||||||
(defun activate-elixir-mode ()
|
(defun activate-elixir-mode ()
|
||||||
"All things Elixir."
|
"All things Elixir."
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,30 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|
||||||
|
(defhydra my-fsharp/context-hydra (:color teal :hint nil)
|
||||||
|
"
|
||||||
|
Fsharp actions
|
||||||
|
|
||||||
|
^Fsharp^ ^Actions^
|
||||||
|
^^^^^^^^-----------------------------------------------------------------------
|
||||||
|
_f_: Format buffer
|
||||||
|
_i_: imenu
|
||||||
|
"
|
||||||
|
("q" nil "cancel" :color blue)
|
||||||
|
|
||||||
|
("f" lsp-format-buffer)
|
||||||
|
("i" lsp-ui-imenu))
|
||||||
|
|
||||||
(defun activate-fsharp-mode ()
|
(defun activate-fsharp-mode ()
|
||||||
"Activate F# goodies."
|
"Activate F# goodies."
|
||||||
(set-indent 4)
|
(set-indent 4)
|
||||||
(column-enforce-n 100)
|
(column-enforce-n 100)
|
||||||
(lsp-deferred))
|
(lsp-deferred)
|
||||||
|
(define-key fsharp-mode-map (kbd "C-c l") 'my-fsharp/context-hydra/body)
|
||||||
|
|
||||||
|
;; Company list override
|
||||||
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
|
'(company-capf company-yasnippet)))
|
||||||
|
|
||||||
(add-hook 'fsharp-mode-hook 'activate-fsharp-mode)
|
(add-hook 'fsharp-mode-hook 'activate-fsharp-mode)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,20 +18,37 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|
||||||
(use-package dante
|
(use-package lsp-haskell
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer 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 ()
|
(defun activate-haskell-mode ()
|
||||||
"Run this in haskell-mode."
|
"Run this in haskell-mode."
|
||||||
(set-indent 2)
|
(set-indent 2)
|
||||||
(column-enforce-n 80)
|
(column-enforce-n 80)
|
||||||
(dante-mode)
|
(lsp)
|
||||||
|
(define-key haskell-mode-map (kbd "C-c l") 'my-haskell/context-hydra/body)
|
||||||
|
|
||||||
;; Company list override
|
;; Company list override
|
||||||
(add-to-list (make-local-variable 'company-backends)
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
'(dante-company company-yasnippet)))
|
'(company-capf company-yasnippet)))
|
||||||
|
|
||||||
(add-hook 'haskell-mode-hook 'activate-haskell-mode)
|
(add-hook 'haskell-mode-hook 'activate-haskell-mode)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue