瀏覽代碼

Add haskell

master
Bingen Eguzkitza 5 年之前
父節點
當前提交
eb639be1f1
共有 2 個文件被更改,包括 27 次插入0 次删除
  1. +1
    -0
      init.el
  2. +26
    -0
      lisp/init-haskell.el

+ 1
- 0
init.el 查看文件

@@ -93,6 +93,7 @@
(require 'init-octave)
(require 'init-solidity)
(require 'init-rust)
(require 'init-haskell)
(require 'init-latex)
(require 'init-mu4e)


+ 26
- 0
lisp/init-haskell.el 查看文件

@@ -0,0 +1,26 @@
;;; package --- Haskell mode
;;; Commentary:
;;; Code:

(require-package 'haskell-mode)

;; https://emacsclub.github.io/html/haskell.html#sec-3
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)

;; https://gitlab.haskell.org/ghc/ghc/wikis/emacs
;; Highlight text beyond 80th column
(require 'whitespace)
(defun haskell-custom-line-length ()
(setq whitespace-style '(face lines-tail))
(setq whitespace-line-column 80)
(global-whitespace-mode t))

(add-hook 'haskell-mode-hook 'haskell-custom-line-length)

;; Allows you to jump to the first error in compiled or interpreted code.
(global-set-key (kbd "M-g M-f") 'first-error)

(provide 'init-haskell)

;;; init-haskell.el ends here

Loading…
取消
儲存