Commit graph

105 commits

Author SHA1 Message Date
Henrik Lissner
3ef05d95ca
lang/markdown: fix TAB/S-TAB keys for evil users
They were being masked by the default tab/shiftab keybinds in
config/default.
2019-07-22 02:37:44 +02:00
Henrik Lissner
fc4ebb1b85
lang/markdown: don't misinterpret first line as front matter 2019-07-22 02:37:44 +02:00
Henrik Lissner
6153af9594
lang/markdown: only warn if all compilers are unavailable
Rather than check each individual module.
2019-07-14 00:24:09 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
chrunchyjesus
9bf47e2c96
fix spelling 2019-05-22 17:23:31 +02:00
Henrik Lissner
6f41a592d4
lang/markdown: remove boilerplate 2019-05-21 17:29:17 -04:00
Henrik Lissner
e96205ed9f
lang/markdown: add README 2019-05-21 17:24:23 -04:00
Henrik Lissner
768ebda95b
lang/markdown: add multimarkdown compiler support 2019-05-21 17:24:23 -04:00
Henrik Lissner
b1e23238e6
lang/markdown: generalize markdown compile fn
So it can be used with the original perl script, discout, or the renamed
executable on MacOS.
2019-05-21 17:24:23 -04:00
Henrik Lissner
ece2f86480
lang/markdown: remove vestigial pandoc-mode 2019-05-21 17:24:23 -04:00
Henrik Lissner
4c9a3dd191
lang/markdown: remove +pandoc
The new default for markdown-command will try pandoc, if it is
available. This makes pandoc-mode redundant. The mode also doesn't quite
belong to the markdown module.
2019-05-20 21:09:10 -04:00
Henrik Lissner
a6ebd95aee
lang/markdown: fix doctor's executable detection 2019-05-20 21:09:10 -04:00
Henrik Lissner
30319d1c3e
lang/markdown: auto-resolve build & open programs
Markdown-mode will now auto-detect a markdown compiler when you use
markdown-preview (SPC m b). It will try marked, pandoc and markdown, in
that order.

As for markdown-open, it will now use "open" on MacOS and "xdg-open" on
Linux, by default.
2019-05-18 00:53:39 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
d3784a0074
lang/markdown: remove opinionated formatting
Don't adjust line-spacing or fill-column, this interferes with global
defaults as is too opinionated.
2019-04-04 16:47:52 -04:00
Henrik Lissner
da02fa8c38
lang/markdown: add markdown-command check 2019-03-30 02:17:52 -04:00
Henrik Lissner
cdd6587450
lang/markdown: only bind meta keys in insert mode
Fixes #1241
2019-03-11 13:19:25 -04:00
Henrik Lissner
7c9e96da87
General module refactor 2019-03-02 02:04:11 -05:00
Henrik Lissner
da9c4802eb
Fix wrong-number-of-args from +markdown/insert-del 2019-03-02 01:35:00 -05:00
Henrik Lissner
db2949ff32
Improve flyspell support
+ Make flyspell more selective about what to scan in markdown buffers.
+ Don't mark duplicates when proseline or langtool are present.
+ Add set-flyspell-predicate! for seeing mode-specific word predicates.
2019-02-26 16:55:28 -05:00
Henrik Lissner
4daa9271a0
Introduce general.el & rewrite map!
+ Now uses an overriding keymap for leader keys, so that it is always
  available, even outside of normal/visual states. In insert/emacs
  states, or in sessions where evil is absent, an alternative prefix is
  used for leader/localleader keys. See these variables:
  + doom-leader-prefix
  + doom-leader-alt-prefix
  + doom-localleader-prefix
  + doom-localleader-alt-prefix
+ Keybinds now support alternative prefixes through the new :alt-prefix
  property. This is useful for non-evil users and non-normal evil
  states. By default, this is M-SPC (leader) and M-SPC m (localleader).
+ Removed +evil-commands flag from config/default (moved to
  feature/evil/+commands.el).
+ config/default/+bindings.el has been split into
  config/default/+{evil,emacs}-bindings.el, which one is loaded depends
  on whether evil is present or not. The latter is blank, but will soon
  be populated with a keybinding scheme for non-evil users (perhaps
  inspired by #641).
+ The define-key! macro has been replaced; it is now an alias for
  general-def.
+ Added unmap! as an alias for general-unbind.
+ The following modifier key conventions are now enforced for
  consistency, across all OSes:
    alt/option      = meta
    windows/command = super
  It used to be
    alt/option      = alt
    windows/command = meta
  Many of the default keybinds have been updated to reflect this switch,
  but it is likely to affect personal meta/super keybinds!

The map! macro has also been rewritten to use general-define-key. Here
is what has been changed:

+ map! no longer works with characters, e.g. (map! ?x #'do-something) is
  no longer supported. Keys must be kbd-able strings like "C-c x" or
  vectors like [?C-c ?x].
+ The :map and :map* properties are now the same thing. If specified
  keymaps aren't defined when binding keys, it is automatically
  deferred.
+ The way you bind local keybinds has changed:

    ;; Don't do this
    (map! :l "a" #'func-a
          :l "b" #'func-b)
    ;; Do this
    (map! :map 'local "a" #'func-a
                      "b" #'func-b)

+ map! now supports the following new blocks:
  + (:if COND THEN-FORM ELSE-FORM...)
  + (:alt-prefix PREFIX KEYS...) -- this prefix will be used for
    non-normal evil states. Equivalent to :non-normal-prefix in general.
+ The way you declare a which-key label for a prefix key has changed:

    ;; before
    (map! :desc "label" :prefix "a" ...)
    ;; now
    (map! :prefix ("a" . "label") ...)

+ It used to be that map! supported binding a key to a key sequence,
  like so:

    (map! "a" [?x])  ; pressing a is like pressing x

  This functionality was removed *temporarily* while I figure out the
  implementation.

Addresses: #448, #814, #860
Mentioned in: #940
2018-12-22 04:14:43 -05:00
Henrik Lissner
5ef94de541 Minor refactor, reformat & comment revision 2018-09-18 21:39:54 -04:00
Henrik Lissner
9684b34389
lang/markdown: fix next/previous link keybinds
They were the other way around.
2018-09-14 09:41:06 -04:00
Patrick Elliott
faf59ff2a9 undo header scaling 2018-07-20 14:23:17 +02:00
Patrick Elliott
8b00a208cf typo 2018-07-20 13:56:04 +02:00
Patrick Elliott
ccd6ceab86 fix typo 2018-07-20 13:54:23 +02:00
Patrick Elliott
75278663cc header scaling 2018-07-20 13:48:02 +02:00
Patrick Elliott
e5afab1e17 math highlighting and org-mode compat 2018-07-20 12:29:44 +02:00
Henrik Lissner
d6461d495b
General & minor reformatting+refactor 2018-07-19 03:40:31 +02:00
HaoZeke
595d9e593c
doctor: Fix error with markdown 2018-06-25 17:41:52 +05:30
Patrick Elliott
5f5732b95b added rudimentary support for markdown compilation via pandoc 2018-06-22 14:02:35 +02:00
Patrick Elliott
c99a02fa53 added check for pandoc executable when +pandoc feature is enabled 2018-06-22 14:02:35 +02:00
Henrik Lissner
b81ac61d84
Remove unnecessary markdown-toc def-package! block
markdown-toc-generate-toc is autoloaded by the package, so we don't need
to.
2018-06-03 15:50:46 +02:00
Henrik Lissner
1e81a35461
Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00
Henrik Lissner
48ee4ff71e
lang/markdown: markdown-enable-math = nil
Not a common necessity when writing markdown, and slows down modes with
markdown submode regions (like magithub, when initializing issue/PR
bodies).

This is easily toggled with markdown-toggle-math anyway.
2018-06-01 17:08:48 +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
80adb9c1f6
General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
Henrik Lissner
168cb74794
Replace add-hook! with setq-hook! where possible 2018-05-07 22:37:19 +02:00
Henrik Lissner
6b573bc66b
Refactor :lang auto-mode-alist entries 2018-05-07 19:26:31 +02:00
Henrik Lissner
6c4e048c23
General refactor & cleanup 2018-02-14 07:47:22 -05:00
Bryan Gilbert
3287b5b0b3 Fix markdown specific keybindings being added to global map 2017-10-05 07:02:12 -04:00
Henrik Lissner
d28c64b4fa
General refactor & cleanup 2017-09-02 16:39:51 +02:00
Henrik Lissner
bb5907cadb
Rethink smartparens config #181
+ Parts of my smartparens config that were personal preference have been
  moved to my private module.
+ The css-mode config was redundant and was removed
+ Moved lang-specific config to their respective modules
+ Markdown config was redundant with native electric support, and thus
  removed.
2017-09-02 16:11:21 +02:00
Henrik Lissner
6a5bd216e5
Appease byte-compiler senpai 2017-07-14 18:19:08 +02:00
Henrik Lissner
822c78554f
destructuring-bind => cl-destructuring-bind 2017-06-25 02:04:50 +02:00
Henrik Lissner
354a1058ae
lang/markdown: markdown-asymmetric-header = t 2017-06-20 16:33:25 +02:00
Henrik Lissner
0574ba2d84
Refactor lang/markdown; add fontify code blocks 2017-06-16 02:10:33 +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
b0bb013601 General refactor & cleanup + update TODO 2017-05-17 18:27:02 +02:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00