haskell-init.el
changeset 53 0b3217376059
parent 45 12715da9a300
child 54 e1b82f67f96e
equal deleted inserted replaced
52:b54c3f2e12f6 53:0b3217376059
     1 ;; ~/.emacs.d/haskell-init.el
     1 ;; ~/.emacs.d/haskell-init.el
     2 ;; Luke Hoersten <[email protected]>
     2 ;; Luke Hoersten <[email protected]>
     3 
     3 
     4 ;; scion
     4 (add-to-list 'load-path "~/.emacs.d/thirdparty/haskell-mode") ; override haskell mode on system
     5 ;; (if (file-exists-p "~/.cabal/share/scion-0.1.0.10/emacs")
     5 (load "haskell-site-file")
       
     6 
       
     7 ;; ;; scion
       
     8 ;; (if (file-exists-p "~/.cabal/share/scion-0.3/emacs/scion.el")
     6 ;;     (progn
     9 ;;     (progn
     7 ;;       (add-to-list 'load-path "~/.cabal/share/scion-0.1.0.10/emacs")
    10 ;;       (add-to-list 'load-path "~/.cabal/share/scion-0.3/emacs")
     8 ;;       (require 'scion)
    11 ;;       (require 'scion)
     9 ;;       (setq scion-program "~/.cabal/bin/scion-server")
    12 ;;       (setq scion-program "~/.cabal/bin/scion-server")
    10 ;;       (add-hook
    13 ;;       (add-hook
    11 ;;        'haskell-mode-hook
    14 ;;        'haskell-mode-hook
    12 ;;        (lambda ()
    15 ;;        (lambda ()
    15 ;;          (setq scion-completing-read-function 'ido-completing-read)))))
    18 ;;          (setq scion-completing-read-function 'ido-completing-read)))))
    16 
    19 
    17 (add-hook
    20 (add-hook
    18  'haskell-mode-hook
    21  'haskell-mode-hook
    19  (lambda ()
    22  (lambda ()
    20    (haskell-indentation-mode nil)
    23    (turn-on-haskell-indent)
    21    (haskell-indent-mode t)
    24    (capitalized-words-mode)
    22    (capitalized-words-mode t)
    25    (turn-on-haskell-doc-mode)
       
    26    (turn-on-haskell-decl-scan)
    23    (imenu-add-menubar-index)
    27    (imenu-add-menubar-index)
    24    (haskell-doc-mode t)
    28    (local-set-key (kbd "C-x C-s") 'haskell-mode-save-buffer)
    25    (setq
    29    (setq
       
    30     haskell-font-lock-haddock t
       
    31     haskell-stylish-on-save t
       
    32     ;; haskell-tags-on-save t
    26     haskell-program-name "ghci"
    33     haskell-program-name "ghci"
    27     haskell-indent-offset 4
    34     haskell-indent-offset 4
    28     whitespace-line-column 78))
    35     whitespace-line-column 78)
    29  t) ; append instead of prepend else haskell-mode overwrites these settings
    36    ))
    30 
    37 
    31 (message "Loading haskell-init...done")
    38 (message "Loading haskell-init...done")
    32 (provide 'haskell-init)
    39 (provide 'haskell-init)