Commit Graph

14 Commits

Author SHA1 Message Date
Henrik Lissner
51d3b1b424
💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
Henrik Lissner
69ed1a4a99
feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -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
0b64bc004f
lang/nim: fix wrong-number-of-args error
Meant to use advice-add, not advice-remove
2018-08-31 16:07:33 +02:00
Henrik Lissner
147fa794d3
lang/nim: fix invalid chars in nimsuggest tmp path 2018-08-30 23:36:32 +02:00
Henrik Lissner
bfe7b9f1c4
lang/nim: fix invalid argument errors
The nimsuggest plugin tries to build a unique path for temporary files
for its flycheck checker. This path contains /tmp/emacs-nim-mode/A/B,
where A is the frame ID and B is the full path to the file being checked.

However, the original `nimsuggest--get-dirty-dir' incorrectly extracts
the frame ID from the string representation of `selected-frame' if
frame-title-format has been modified (which Doom has). The result is the
title of the frame, which can contain illegal path characters in
Windows, which in turn causes invalid argument errors when
`nimsuggest--make-tempdir' tries to use it.

This should really be reported upstream!
2018-08-30 22:35:25 +02:00
Henrik Lissner
fcf2a26329
lang/nim: fix blank nimsuggest-path stringp error 2018-08-30 19:42:57 +02:00
Henrik Lissner
e05d7cfee0
Change flycheck initialization strategy
Initialize it globally and turn it off where needed, instead of enabling
it on demand. Also fixes void-function: flycheck-mode errors when
:feature syntax-checker is disabled. This is experimental.

Indirectly fixes #710
2018-06-22 01:49:20 +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
d9874da38a
lang/nim: add doctor.el #568 2018-05-09 10:22:28 +02:00
Henrik Lissner
7f8db56178
lang/nim: revise & conform readme to conventions #568 2018-05-09 10:22:24 +02:00
Henrik Lissner
c8f29b0220
lang/nim: refactor config.el #568 2018-05-09 10:22:03 +02:00
Miguel Santos
1451b952b9 small typos 2018-05-08 11:58:59 -03:00
Miguel Santos
12e26761e2 add basic support for the nim language 2018-05-08 11:50:12 -03:00