Commit graph

53 commits

Author SHA1 Message Date
Henrik Lissner
a3e262c7ac
💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
Henrik Lissner
9eaee096c8
Minor comment revision & general code reformatting 2019-07-23 17:30:32 +02:00
Henrik Lissner
0c891dc33e
lang/haskell: minor refactor & reformatting 2019-03-04 04:57:07 -05:00
Aria Edmonds
b8be64f3b5 Add haskell lsp mode 2019-02-23 03:21:20 +11:00
Henrik Lissner
69ed1a4a99
feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
Henrik Lissner
94b16cba6c
Standardize REPL commands & improve SPC o r
- SPC o r now prompts for a REPL to open when none was found for the
  current buffer.
- REPL handlers must now follow the naming convention "*/open*-repl".
  e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc.
- +eval/open-repl has been split in two:
  - +eval/open-repl-other-window
  - +eval/open-repl-same-window
2019-02-18 01:59:56 -05:00
Henrik Lissner
c82f71e7fe
lang/haskell: disable subword-mode by default
subword-mode is enabled by default for no other language, nor is it the
default behavior in vim (and it affects evil word motions), so it should
be opt-in.

Mentioned in #1083
2018-12-29 21:06:49 -05:00
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Patrick Elliott
9b3442edae
Removed hindent (included in format-all) 2018-08-27 12:05:03 +02:00
Henrik Lissner
ce9f7f9bde
lang/haskell: minor reformatting & refactor
Conform to conventions, use `add-hook!` for multiple hooks, use single semi-colon for eol comments, remove comments redundant with code, and use sharp-quote to indicate function symbol.
2018-07-19 19:03:05 +02:00
Patrick Elliott
82fee01611 fix typo 2018-07-19 17:13:56 +02:00
Patrick Elliott
4980c66e15 Disable overlays conditionally if flycheck is loaded 2018-07-19 17:09:19 +02:00
Patrick Elliott
b0af6bcbef Add some useful haskell-mode options 2018-07-19 17:00:01 +02:00
Patrick Elliott
864e15f19d Add support for folding haskell code blocks 2018-07-19 16:37:22 +02:00
Patrick Elliott
3a5af1d591 Added subword mode hook. 2018-07-19 16:34:13 +02:00
Patrick Elliott
9d4c9c3306 Move haskell-mode bindings 2018-07-19 11:04:17 +02:00
Patrick Elliott
406e8f31f6 Move dante mode map 2018-07-19 11:03:16 +02:00
Patrick Elliott
dc68d7aad8 Moved intero map 2018-07-19 11:02:26 +02:00
Patrick Elliott
b0a754391a Added stack build support for intero users 2018-07-18 09:11:48 +02:00
Patrick Elliott
6334af8a84 Fix typo 2018-07-18 08:59:07 +02:00
Patrick Elliott
1f9fcd5c10 Lazily load bindings properly 2018-07-18 08:50:55 +02:00
Patrick Elliott
a0f800421e Merge develop 2018-07-18 08:36:29 +02:00
Henrik Lissner
2968374081
lang/haskell: fix haskell-hlint checker
Causing "not a valid syntax checker" errors because it haskell-hlint was
defined too soon.
2018-07-17 23:47:57 +02:00
Patrick Elliott
f981b9886e Add haskell keybindings 2018-07-17 23:43:08 +02:00
Henrik Lissner
0a4cdf8202
Make haskell-hlint setup DRY 2018-07-17 03:09:45 +02:00
Henrik Lissner
c31bb6a744
Add haskell-mode-jump-to-def-or-tag lookup handler 2018-07-15 20:44:47 +02:00
Henrik Lissner
69c8ef4141
Fix void-function haskell-interactive-mode 2018-07-15 20:44:11 +02:00
Henrik Lissner
e4db3f0020
Insert module file template in haskell files #752
Use file-template module instead of hook so it only gets triggered in a
valid project.
2018-07-14 23:16:39 +02:00
Henrik Lissner
80c4abc8bf
Enable haskell-interactive-mode in haskell-mode #752 2018-07-14 23:16:39 +02:00
Henrik Lissner
a76c080930
lang/haskell: improve REPL support #752 2018-07-14 23:16:39 +02:00
Patrick Elliott
19400598b4 got rid of hindent as a seperate feature 2018-06-26 19:34:36 +02:00
Patrick Elliott
bec2ad4859 factored hindent out as a seperate feature. 2018-06-26 19:15:07 +02:00
Henrik Lissner
588359cc5f
Replace :eval/:repl with autodef functions
+ :eval => set-eval-handler!
+ :repl => set-repl-handler!
+ Updates all internal references.
2018-06-15 16:20:20 +02:00
Henrik Lissner
1a452b6842
💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
0cfe8e305e
Bring back aggressive loading of autoloads files #446
package-initialize, once again, isn't called on every startup, which
means package autoloads won't be loaded in most interactive sessions, so
must do it manually for certain packages.
2018-03-07 03:01:17 -05:00
Henrik Lissner
3e6d9cf03a
lang/haskell: fix ESC ESC keybind in REPL; move company-ghc to +dante 2018-03-01 01:12:23 -05:00
Henrik Lissner
138ec2bf07
Remove manual loading of pkg-autoloads files
No longer necessary as of 0c80bb42
2018-02-28 17:57:30 -05:00
Henrik Lissner
bac73ec938
Replace warn => warn! 2018-02-14 07:46:38 -05:00
Oliver Charles
e688bd8c85
haskell: Fix warning about ghc-mod
The warning confusingly states that `ghc-mode` couldn't be found, implying it's some kind of emacs mode. However, the predicate is actually checking for the `ghc-mod` executable, which is something entirely different.
2018-01-04 11:06:05 +00:00
Henrik Lissner
061e71a846
[breaking] lang/haskell: refactor + require flags #158
The +intero/+dante module flags are now required; there is no default.
2017-10-03 02:57:00 +02:00
Valentin Robert
d399e7715b inf-haskell: fix mode-map name 2017-09-09 11:31:57 -07:00
Henrik Lissner
56382f1215
lang/haskell: add intero support #158
To use dante instead, change `haskell` to `(haskell +dante)` in
~/.emacs.d/init.el.
2017-08-09 14:52:48 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
0e78cde69d lang/haskell: refactor + add company-ghc 2017-05-25 20:09:36 +02:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
b73218c88e lang/haskell: fix #42; enable interactive-haskell-mode 2017-03-28 16:23:09 -04:00
Henrik Lissner
3fee758e20 General cleanup + minor tweaks 2017-03-16 23:39:39 -04:00
Henrik Lissner
134c813c46 lang/haskell: fix haskell-mode + add dante 2017-03-16 17:22:13 -04:00