We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 0da6e9b3 authored by Peter Harpending's avatar Peter Harpending

Add TEXTEDITORS.md section about ETAGS

I also tweaked the .dir-locals.el file to automagically regenerate the
tags in Emacs.
parent a0b0a2d3
......@@ -3,5 +3,7 @@
(haskell-indentation-left-offset . 4)
(haskell-indentation-ifte-offset . 4)
(haskell-indentation-where-pre-offset . 2)
(haskell-indentation-where-post-offset . 2)))
(haskell-indentation-where-post-offset . 2)
(evil-shift-width . 2)
(haskell-tags-on-save . t)))
(hamlet-mode . ((hamlet/basic-offset . 4))))
......@@ -51,18 +51,6 @@ Other useful Atom packages to consider:
[GNU Emacs](https://www.gnu.org/software/emacs/) is a traditional, robust,
keyboard-centric text editor with substantial Haskell support.
#### Emacs settings
Our included `.dir-locals.el` file
[makes Emacs use](https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html)
the recommended 4-space indentation.
#### Emacs packages and variants
Emacs users should install
[Haskell Mode](https://github.com/haskell/haskell-mode) and
[Shakespeare Mode](https://github.com/CodyReichert/shakespeare-mode).
If you are new to Emacs,
[Emacs Prelude](https://github.com/bbatsov/prelude) is an enhanced
distribution of Emacs with better default configuration. It includes things like
......@@ -75,6 +63,18 @@ includes Vim's modal keybindings by default along with much of Prelude's default
configuration. Aside from Spacemacs, you can get the Vim keybindings in any
Emacs distribution using [evil-mode](http://www.emacswiki.org/emacs/Evil).
#### Emacs settings
Our included `.dir-locals.el` file
[makes Emacs use](https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html)
the recommended 4-space indentation.
#### Emacs packages and variants
Emacs users should install
[Haskell Mode](https://github.com/haskell/haskell-mode) and
[Shakespeare Mode](https://github.com/CodyReichert/shakespeare-mode).
Also of interest:
* [Magit](http://magit.vc/) is a high-quality Emacs git interface.
......@@ -83,6 +83,10 @@ Also of interest:
* [HIndent](https://github.com/chrisdone/hindent/) (same author again)
will pretty-print your Haskell-code along the same lines as SHM.
* [Haskell Interactive Mode](https://github.com/haskell/haskell-mode/wiki/Haskell-Interactive-Mode-Setup)
will enable automatic regeneration of the TAGS file. (Our
.dir-locals.el file tells haskell-interactive-mode to do that)
### Leksah
[Leksah](http://leksah.org/) is a Haskell-dedicated complete IDE in the works,
......@@ -215,3 +219,22 @@ To auto-update tags in Vim whenever a Haskell file gets written, use fast-tags:
Note: so that we don't generate extra tags files in internal directories, make
sure to only open vim from the main snowdrift project directory from now on.
### Emacs tag usage
If you use Helm, as recommended above, you can run `M-x
helm-etags-select` to select from the `TAGS` file.
If you use haskell-interactive-mode, linked above, Emacs will
automatically regenerate the TAGS file for you (provided you have loaded
a file with `C-c C-l` beforehand). If you don't want to use
haskell-interactive-mode for whatever reason, you can generate the tags
file with
git ls-tree -r HEAD --name-only | grep -E '*.hs' | xargs hasktags -e --ignore-close-implementation
I have this setting in my `~/.emacs` somewhere:
```emacs-lisp
(global-set-key (kbd "M-t") 'helm-etags-select)
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment