Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewbauer/nix-haskell-mode
Automatic Haskell setup in Emacs, for Nix users
https://github.com/matthewbauer/nix-haskell-mode
Last synced: about 1 month ago
JSON representation
Automatic Haskell setup in Emacs, for Nix users
- Host: GitHub
- URL: https://github.com/matthewbauer/nix-haskell-mode
- Owner: matthewbauer
- License: gpl-3.0
- Created: 2019-03-29T18:22:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-15T01:35:43.000Z (over 5 years ago)
- Last Synced: 2024-10-11T23:42:06.631Z (2 months ago)
- Language: Emacs Lisp
- Size: 121 KB
- Stars: 28
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
- awesome-nix - nix-haskell-mode - Automatic Haskell setup in Emacs. (Programming Languages / Haskell)
README
#+title: nix-haskell-mode
#+author: Matthew Bauer
#+email: [email protected]
#+language: en
#+keywords: nix haskell emacs
#+html_head:
#+link_home: https://github.com/matthewbauer/nix-haskell-mode[[https://melpa.org/#/nix-haskell-mode][file:https://melpa.org/packages/nix-haskell-mode-badge.svg]]
nix-haskell-mode is an easy way to get Haskell projects set up in
Emacs. It uses haskell-mode’s interactive-haskell-mode to provide
integration with Emacs. Nix is used to pull in dependencies of each
Cabal file.To use with use-package, just add this to your configuration,
#+BEGIN_SRC emacs-lisp
(use-package nix-haskell-mode
:hook (haskell-mode . nix-haskell-mode))
#+END_SRCnix-haskell-mode is available in MELPA. You can install it yourself
with =M-x package-install nix-haskell-mode=. Alternative configuration
for vanilla Emacs is available below,#+BEGIN_SRC emacs-lisp
(require 'haskell-mode)
(require 'nix-haskell-mode)
(add-hook 'haskell-mode-hook 'nix-haskell-mode)
#+END_SRCThis configuration should work out of the box with Cabal projects. If
you have custom dependencies that need to be available, you should
create override in Haskell packages in Nix. More documentation on this
is available in the Nixpkgs manual available here:https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure
* Affected modes
These modes are affected by nix-haskell-mode. They are listed below
along with what variables are set by nix-haskell-mode.- Flycheck - sets =flycheck-ghc-package-databases= and
=flycheck-haskell-ghc-executable=.
- Haskell Mode - sets =haskell-process-type= to =cabal-new-repl=,
=haskell-process-path-cabal=, =haskell-process-args-cabal-new-repl=.* Project information
This project is available at
http://github.com/matthewbauer/nix-haskell-mode. Pull requests and
issues are accepted.* Disabling nix-haskell-mode for a project
Occasionally you will want to disable nix-haskell-mode. This might
occur in very large projects where interactive-haskell-mode fails at
or when some dependency cannot be fetched succesfully. In these cases,
you should run the following in the root of your project:=M-x
add-dir-local-variablehaskell-modeeval(nix-haskell-mode
-1)=