Commit Graph

82 Commits

Author SHA1 Message Date
Henrik Lissner
d545fccf47 fix(:lang): missing grammar recipes
I removed the grammar recipes in 3b58741 to avoid redundancy with the
upstream recipes, but didn't realize that those upstream recipes weren't
added until Emacs 31, so users on 30 and older would get errors when
trying to install any missing grammars.

This also establishes a hard dependency between :lang (php +tree-sitter)
and :lang ({javascript,web} +tree-sitter).

Amend: 3b58741522
2025-08-31 14:39:38 +02:00
Henrik Lissner
ab4dace692 refactor(:lang): remove redudant mode-alist lines
Amend: 3b58741522
2025-08-30 10:30:26 +02:00
Henrik Lissner
3b58741522 refactor(tree-sitter): centralize grammar config & hacks
Easier to track and maintain.
2025-08-27 16:57:28 +02:00
Henrik Lissner
7cb23f3359 feat(markdown): add treesit support 2025-05-15 13:01:40 +02:00
Henrik Lissner
122e3732f7 fix(markdown): disable meta keybinds if evil-disable-insert-state-bindings
While I don't intend to respect `evil-disable-insert-state-bindings`
everywhere, exhaustively (such as org's rebinding of return or tab), I
will do it for non-essential keybinds that have a high likeliness of
overwriting navigation commands (like meta keys).
2024-08-21 13:40:11 -04:00
Henrik Lissner
c45318d493 nit(markdown): revise comments & reformat 2024-07-11 03:37:37 -04:00
Henrik Lissner
df5f6696ec tweak(markdown): fontify code blocks natively
Enable `markdown-fontify-code-blocks-natively`, which was disabled in
f5570db due to performance issues, which I try to fix by suppressing
mode hooks on `markdown-fontify-code-block-natively`.

Amend: f5570db4c2
Close: #7930
Co-authored-by: real-or-random <real-or-random@users.noreply.github.com>
2024-07-10 01:47:18 -04:00
Henrik Lissner
a4869f32e7 refactor(org): org-src-lang-modes: move md alias
This is a general convenience for org users, not specifically for users
of the markdown module, so it belongs in :lang org.
2024-07-09 20:59:53 -04:00
Henrik Lissner
3820ead9e3 tweak(markdown): disable wiki links & math highlights by default
These two features are relatively expensive and shouldn't be enabled as
a global default.
2024-03-11 00:53:44 -04:00
Henrik Lissner
659f7bfc71 refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
Jonas Jelten
7fb69fac64 bump: :lang markdown
jrblevin/markdown-mode@c765b73b37 -> jrblevin/markdown-mode@b1a862f016

- The workaround introduced aad7bc521f addressed an issue that was
  fixed upstream (jrblevin/markdown-mode@44f0e89534).

Ref: jrblevin/markdown-mode#578
Revert: aad7bc521f
2023-11-24 11:05:30 -05:00
Henrik Lissner
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
e7d56f2ce7 feat(markdown): add toggle keybinds under <localleader> t
Close: #6308
Co-authored-by: iyefrat <iyefrat@users.noreply.github.com>
2022-07-23 16:42:29 +02:00
Henrik Lissner
2180d44a26 bump: :lang markdown
Fanael/edit-indirect@e3d86416bc -> Fanael/edit-indirect@f80f63822f
jrblevin/markdown-mode@521658eb32 -> jrblevin/markdown-mode@1f709778ac
seagle0128/grip-mode@6b427143a8 -> seagle0128/grip-mode@6d6ddbe0af
2022-06-18 16:57:17 +02:00
Henrik Lissner
438483c4eb nit(markdown): reformat keybinds 2022-06-18 16:57:17 +02:00
Henrik Lissner
f5570db4c2 perf(markdown): fontify-code-blocks-natively = nil
This is a source of slowdowns in markdown-mode buffers, even
ones without code blocks, which drastically affects typing and motion
latency. This appears to be an upstream issue.
2021-08-05 16:31:07 -04:00
Henrik Lissner
aad7bc521f markdown-nested-imenu-heading-index = nil
See jrblevin/markdown-mode#578.
2021-07-12 18:08:55 -04:00
Henrik Lissner
f604ce6d01 Minor refactors & reformatting 2021-05-25 10:35:21 -04:00
Nathan Lovato
c63eceb43b Markdown: add keymap for insert commands 2021-01-03 18:48:33 -06:00
Saúl Germán Gutiérrez Calderón
e333feaf54 Add mathjax support for markdown preview in pandoc 2020-10-22 21:47:32 -05:00
Henrik Lissner
2f91183e48 Fix #3997: downcase checkboxes in markdown
To be consistent with the markdown formatter.
2020-10-15 18:13:42 -04:00
Henrik Lissner
aa06309067 lang/markdown: fontify rust blocks correctly 2020-08-31 22:02:54 -04:00
Henrik Lissner
e3750dbf66 checkers/spell: add +flyspell flag
spell-fu lacks support for multiple dictionaries, affix expansion, and
many non-English dictionaries, so I've added back flyspell support to
the spell module, but opt-in, because it is still the significantly
slower option and spell-fu may support them one day.

If not, tlikonen/wcheck-mode is another alternative to consider.

Fixes #3813
2020-08-23 18:48:50 -04:00
Henrik Lissner
ff9c1ace22 checkers/spell: replace flyspell with spell-fu
Spell-fu is significantly faster, but does produce more false
positives (more faces must be added to spell-fu-faces-exclude to reduce
these).

Unfortunately, there is no fancy "correction" interface for spell-fu
yet, so we'll have to resort to ispell-word (on z=) for now.
2020-08-21 18:57:10 -04:00
Henrik Lissner
a634aaa4e8 Bump :lang markdown
jrblevin/markdown-mode@c927a11 -> jrblevin/markdown-mode@f47a2e9
ardumont/markdown-toc@eda9650 -> ardumont/markdown-toc@a9f13ee
Somelauw/evil-markdown@46cd81b -> Somelauw/evil-markdown@685d7fb

Reverts 35f18c5e74 because Somelauw/evil-markdown#1 was merged
2020-05-10 18:28:16 -04:00
Henrik Lissner
725c5f7e38 Document some of lang/markdown's lines 2020-04-30 19:16:41 -04:00
Henrik Lissner
7ed9ee2ae5 Bind <localleader> m ' -> markdown-edit-code-block
For consistency with org and latex.
2020-04-21 23:19:17 -04:00
Henrik Lissner
24e35b95d5 Move org lang alias to markdown module 2020-04-10 02:04:00 -04:00
Henrik Lissner
35f18c5e74 Temporary fix for Somelauw/evil-markdown#1 2020-03-29 18:19:55 -04:00
Henrik Lissner
a084318932 Prevent backtick auto-pairing before word/same 2020-02-21 00:39:06 -05:00
Henrik Lissner
eca387d670 Refactor +lookup/file & update :file handlers
+ Removed idris-mode's file handler. It doesn't do what I thought it
  did.
+ Fix markdown-follow-thing-at-point file handler creating empty buffer.
2020-02-06 16:55:28 -05:00
Henrik Lissner
06c604503a Don't auto-fill in latex math/markdonw code blocks
Fixes #2453
2020-02-03 13:28:05 -05:00
Sune Simonsen
580de0be1f Fix source code highlighting when using marked.js
I'm currently experiencing problems getting the source code highlighting to work with https://github.com/markedjs/marked

The reason is that Marked outputs the following structure:

```html
<pre><code class="language-js">const hello = 'world';</code></pre>
```

and the current selector expects the `pre` tag to have a `lang` attribute. 

This PR splits the forwarding of the `lang` attribute to a class and the code that initialise the highlighting for each block. It will try to initialise the highlighting for every `code` block that is inside a `pre` tag.
2020-01-03 17:19:44 +01:00
Henrik Lissner
133f0d5f30 lang/markdown: improve evil+markdown integration 2019-10-19 01:46:46 -04:00
Henrik Lissner
875225cdd9 lang/markdown: minor refactor
And remove README.markdown support. What madman uses that extension?
2019-10-18 17:26:13 -04:00
Henrik Lissner
75715e4e93 lang/markdown: add github header & css to previews 2019-10-18 17:26:04 -04:00
Akhil Wali
ed71b9fa43 Add grip-mode for live GF markdown previews 2019-10-19 10:16:33 +13:00
Henrik Lissner
51973dca9b Move auto-fill-mode to text-mode-hook 2019-10-14 18:25:02 -04:00
Henrik Lissner
051bceb0a8 Refactor localleader keybinds #1270
Introduces a select few of the localleader keybind standards proposed in
issue #1270, corrects a few typos and introduces more localleader
keybinds in general.

Co-authored-by: yuhan0 <>
2019-10-04 22:04:47 -04:00
Henrik Lissner
81ee250c09 Minor refactor & revision across the board 2019-09-03 00:59:46 -04:00
Henrik Lissner
76cacb5bfe 💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
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
768ebda95b lang/markdown: add multimarkdown compiler support 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
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
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