Commit graph

51 commits

Author SHA1 Message Date
syl20bnr b7c8ca7383 haskell layer: add haskell-snippets
Fixes #1471
2015-05-03 12:51:29 -04:00
syl20bnr 83bd31a812 haskell layer: replace use-package by eval-after-load 2015-04-19 01:17:35 -04:00
Chris Barrett 65576411c4 haskell fixes
- ensure haskell-indentation is loaded before calling members
- fix misspelled references to keymaps
- fix function names - s/identation/indentation
2015-04-19 01:05:52 -04:00
syl20bnr fdd4e944ef Reload dotfile and layer anywhere with SPC f e R
Replace `SPC m c c` and `C-c C-c` in the dotfile

Resolve #1210
2015-04-18 23:40:24 -04:00
Ben Gamari 04895b4c28 Add cmm-mode to haskell layer 2015-04-11 00:21:28 -04:00
syl20bnr a4919b3eda New layer syntax-checking
Move flycheck
2015-04-10 22:23:16 -04:00
syl20bnr c2fe549158 haskell layer: tweaked company backends 2015-04-10 00:00:51 -04:00
syl20bnr 7f29260205 Add yasnippet backends 2015-04-09 22:28:26 -04:00
syl20bnr 0c6682cbd1 Refactor one more time the auto-completin macros
It is important to define the buffer local backend variables
in a config.el otherwise it is not available in the layer
configuration if the auto-completion layer is removed.
There were also some issues by hiding the explicit
configuration of company inside a macro, for instance
helm-spacemacs is unable to display the company package
configured in a given layer if the auto-completion layer
is removed.
2015-04-09 00:03:51 -04:00
Tristan Hume f04412893e Change company macro name and use push 2015-04-08 12:39:25 -04:00
Tristan Hume ad86ab8fb1 Add a helper for simple company initialization.
Adds the spacemacs|init-layer-company helper to set up company
completion for a language layer and replaces existing simple company
initializations. More complex initializations should use the new
architecture directly and remain untouched by this commit.
2015-04-07 15:21:13 -04:00
syl20bnr 68ea3652e4 haskell layer: remove yasnippet backend 2015-04-06 23:41:27 -04:00
Jeremy Huffman cd3346c125 ghci-ng should now override mht rather than mt 2015-04-04 00:17:31 -04:00
syl20bnr 57fcb93799 Rename *-declarep functions to *-usedp functions
Makes more sense from a user view point.
2015-04-03 19:13:52 -04:00
syl20bnr 318bd23dc4 Add pre and post init functions support to configuration-layers
Now in addition to the <layer>/init-<pkg> function there are
- <layer>/pre-init-<pkg> (executed before <layer>/init-<pkg>)
- <layer>/post-init-<pkg> (executed after <layer>/init-<pkg>)

The init function is mandatory, if it is not present then the
package is ignored and not installed.

This mechanism allows soft (implicit) cross layers dependencies
between packages (see company for more info).

It is now possible to remove flycheck from spacemacs layer and
move it to its own syntax-checking layer.
2015-04-03 17:12:56 -04:00
syl20bnr 769d54da02 New layer auto-completion
Move company and auto-complete to a common layer.
They are not enabled globally anymore, each mode using them
must explicitly declare a hook.
Only one frontend is supported for a given mode, we have to
choose the best between the two.
Only one key binding to toggle auto-completion on `SPC t a` no
matter if it is company or auto-complete. The lighter in the
mode-line is Ⓐ for both frontends.
2015-04-03 00:28:13 -04:00
syl20bnr faca47e088 haskell layer: disable eletric-indent-mode 2015-04-01 12:08:31 -04:00
syl20bnr d825f17874 haskell layer: Remove hi2 and reformat haskell/init-hakell-mode
Resolves #735
2015-04-01 12:04:43 -04:00
syl20bnr 46248b1e73 New local company backends 2015-03-31 22:24:01 -04:00
syl20bnr 0fa0409523 Restore reset of local company-backends and add with-yas param 2015-03-30 00:48:41 -04:00
Tristan Hume cb43a91a15 Add company backend add macro and use it everywhere 2015-03-30 00:01:33 -04:00
Diego Berrocal 78f8c6aae0 Change condition for company-mode detection
changed configuration-layer/package-declaredp for
configuration-layer/layer-declaredp in company-mode
2015-03-29 23:49:37 -04:00
syl20bnr f56c035dea haskell layer: disable ghc-check.el overlays with flycheck enabledcc 2015-03-28 20:45:25 -04:00
syl20bnr 2f27a31176 haskell layer: Fix flycheck configuration
Fixes #594
2015-03-28 20:44:30 -04:00
syl20bnr 814b56ba26 Simplify initialization of flycheck-haskell 2015-03-22 03:11:54 -04:00
syl20bnr b1adef0626 Heavy refactoring of company-mode layer
- Enable lazy-loading of company.
- The company layer is now agnostic of any packages which use company
- company-backends is now buffer local and contains only the backends
which are relevant for the current modes
- New macro `spacemacs|reset-local-company-backends`
2015-03-22 02:23:12 -04:00
Jean-Christophe Petkovich f099537282 Fix for flycheck-haskell-setup autoload
I get the following backtrace after starting any mode that includes
flycheck initialization:

Debugger entered--Lisp error: (void-function flycheck-haskell-setup)
  flycheck-haskell-setup()
  run-hooks(flycheck-mode-hook flycheck-mode-on-hook)
  flycheck-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook python-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook python-mode-hook))
  run-mode-hooks(python-mode-hook)
  python-mode()
  set-auto-mode-0(python-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer setup.py> "~/projects/fast-regression-testing/data/packages/libgcrypt-commits-pkg/setup.py" nil nil "~/projects/fast-regression-testing/data/packages/libgcrypt-commits-pkg/setup.py" (11679577 2052))
  find-file-noselect("/home/jcp/projects/fast-regression-testing/data/packages/libgcrypt-commits-pkg/setup.py" nil nil nil)
  find-file("/home/jcp/projects/fast-regression-testing/data/packages/libgcrypt-commits-pkg/setup.py")
  find-file-at-point("/home/jcp/projects/fast-regression-testing/data/packages/libgcrypt-commits-pkg/setup.py")
  helm-find-file-or-marked("/home/jcp/projects/fast-regression-testing/data/packages/libgcrypt-commits-pkg/setup.py")
  ...
  ABBREVIATED HELM BACKTRACE
  ...
  helm-find-files-1("/home/jcp/" nil)
  helm-find-files(nil)
  call-interactively(helm-find-files nil nil)
  command-execute(helm-find-files)

By moving the `flycheck-mode-hook` manipulation to
`haskell/init-flycheck-haskell`, I no longer get this error.
2015-03-20 21:37:38 -04:00
syl20bnr 72edfcd137 Move SPC m t and SPC m i under SPC m h
`SPC m t` is reserved for tests.
Information commands are considered help commands.
2015-03-18 08:51:20 -04:00
Pierre Radermecker 3deb06fec9 haskell layer: haskell-enable-hindent-support requires a style name
Fixes #758
2015-03-16 01:45:14 -04:00
Michael Hauser-Raspe 519e46bbc9 Add haskell-type-on-previous-line function 2015-03-13 23:22:39 -04:00
Bjarke Vad dda1e8de86 Updated haskell/shm bindings + misc haskell
- Added some shm keybindings that fit a bit better with evil-mode
- Set better(saner at least) default for hindent style
- Removed C-{<right>,<left>} bindings
- Removed flycheck delay for showing error at point
2015-03-02 18:43:43 -05:00
Bjarke Vad 83ea6cd2f3 Fixed flycheck not being properly initialized for haskell-mode 2015-03-02 18:40:03 -05:00
syl20bnr a024d74521 haskell layer: Always install shm and hindent 2015-03-01 00:00:10 -05:00
Michel Kuhlmann dc7d3898ee haskell: optional hindent-mode 2015-02-28 23:58:36 -05:00
syl20bnr 6687f2d0fe Rename haskell variables to enable shm and ghci-ng
`haskell-enable-shm-support`
`haskell-enable-ghci-ng-support`
2015-02-24 20:09:06 -05:00
Bjarke Vad 3b8742f3cc Fixes an issue with company-ghc not loading correctly
- the `ghc-comp-init` function should not be called as a hook when
  `ghc-init` is already called in `haskell-hook`
- load company-ghc with yasnippet support
2015-02-24 18:39:53 -05:00
Bjarke Vad 14c1852f34 Added initial support for structured-haskell-mode 2015-02-23 23:48:06 -05:00
Bjarke Vad 78b794f06c Fixes #641 2015-02-22 12:49:35 -05:00
Bjarke Vad f447e937e8 Added ghci-ng support to haskell layer
- uses the variable `haskell-ghci-ng-support` to enable support
2015-02-22 12:49:10 -05:00
syl20bnr 66e38ec962 Lazy load ghc-comp-init in haskell layer 2015-02-14 22:45:14 -05:00
syl20bnr 22930c3d33 Change all SPC m g bindings to SPC m g g according to conventions 2015-01-20 22:32:13 -05:00
syl20bnr c31d987668 Move hi2 related functions in init-hi2 function in haskell layer 2015-01-14 23:23:08 -05:00
syl20bnr ceefe88b75 Update CONTRIBUTE.md and add file headers
Also add default file header to layer templates.
2015-01-13 23:12:56 -05:00
Chris Barrett d54e1ae4c7 Configure hi2
Resolves #356
2015-01-01 02:09:41 -05:00
Bjarke Vad cb27ee6190 Removed ghci-completion package
- ghci-completion is redundant when using flycheck-haskell
2014-12-28 23:47:47 -05:00
Bjarke Vad 0df1d21c11 set haskell-process-type to auto
Should work in more use-cases
2014-12-28 23:47:44 -05:00
Bjarke Vad ee0b0b240d Updated haskell-mode bindings
- Fits better with conventions
- Check README.md for bindings

Fixes flycheck for haskell

- Disabled haskell-stylish on save as it interferes with flycheck errror highlighting
- Added a new binding, `SPC m f` that runs haskell-stylish

removed haskell-stylish-on-save
2014-12-22 21:49:20 -05:00
Bjarke Vad 9df3400643 Updated Haskell layer
- Uses cabal-repl instead of the deprecated cabal-dev
- Loads company-ghc if company-mode is enabled
- Fixed RET in REPL
- See README.md for keybindings
2014-12-21 23:05:29 -05:00
syl20bnr 59286d8ea4 Move ghc package to Haskell layer 2014-12-13 23:31:03 -05:00
syl20bnr 46a717254d Fixes #226 Flycheck not automatically started in haskell buffers. 2014-12-11 22:34:13 -05:00