Last active
January 16, 2021 19:30
-
-
Save dysinger/63b7cd03f77ac0125356051b23f47a37 to your computer and use it in GitHub Desktop.
Private spacemacs layer to try out Chris Done's Intero mode for haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 1. place this in ~/.emacs.d/private/intero/packages.el | |
;; 2. add intero, syntax-checking and auto-completion to your | |
;; ~/.spacemacs layer configuration & remove the haskell layer | |
;; if you were using that before | |
;; 3. make sure you have stack installed http://haskellstack.org | |
;; 4. fire up emacs & open up a stack project's source files | |
(defconst intero-packages | |
'(company | |
flycheck | |
haskell-mode | |
hindent | |
(intero :location (recipe | |
:repo "chrisdone/intero" | |
:fetcher github | |
:files ("elisp/intero.el"))))) | |
(defun intero/init-company-mode () | |
(use-package company-mode)) | |
(defun intero/init-hindent () | |
(use-package hindent)) | |
(defun intero/init-haskell-mode () | |
(use-package haskell-mode)) | |
(defun intero/post-init-haskell-mode () | |
(add-hook 'haskell-mode-hook 'hindent-mode) | |
(add-hook 'haskell-mode-hook 'intero-mode)) | |
(defun intero/init-intero () | |
(use-package intero)) | |
(defun intero/post-init-intero () | |
(flycheck-add-next-checker 'intero '(warning . haskell-hlint))) |
Any thoughts on what keybindings this could run under? Perhaps SPC m ..
like the current haskell layer uses, since it's not meant to be mixed?
I am trying to expand on this layer to add keybindings that are consistent with other spacemacs layers, e.g. using SPC m
as leader key and mapping other commands with mnemonic but I cannot it work even with the simplest example:
(defun intero/init-intero ()
(use-package intero
:config
(progn
(spacemacs/set-leader-keys-for-major-mode 'intero-mode "ml" 'intero-repl-load))
))
I am a total noob with spacemacs... Any idea?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@chrisdone thanks, that patch works! I just had to go into the elpa package list and update intero.