Commit Graph

160 Commits

Author SHA1 Message Date
87b616e5d8 refactor!: remove rainbow-delimiters
BREAKING CHANGE: parentheses will no longer be colored by depth. No
substitute is provided because it's trivial for users to install
themselves.

Ref: https://github.com/orgs/doomemacs/projects/5/views/1?pane=issue&itemId=117610828
2025-06-29 18:53:40 +02:00
57fcd95e7d tweak(latex): don't insert braces after sub/superscript
This avoids inserting braces when you type "a_", so you end up typing
"a_i" instead of "a_{i}".

The official LaTeX manual says that braces are correct, but it doesn't
matter for many cases, e.g., when the sub/superscript is just a single
token like "i". It's simply a matter of taste in these cases.
 - Frank Mittelbach, a LaTeX maintainer, says that he types "a_i":
   https://tex.stackexchange.com/questions/82329/how-bad-for-tex-is-omitting-braces-even-if-the-result-is-the-same#comment176261_82331
 - David Carlisle, another LaTeX maintainer, says that a_i "arguably
   improves the look of the source code":
   https://tex.stackexchange.com/a/82337
 - Joseph Wright, yet another LaTeX maintainer, says that he "would
   always use braces here, so favour a_{i}":
   https://tex.stackexchange.com/a/1929

And I think if it is a matter of taste, then the sane default is to
avoid any magic that gets in the way of users. Anyone who prefers braces
can still enable this argument, but people who do not like them won't
get upset every time they type "_" or "^".
2025-06-26 02:37:18 +02:00
b840f90252 revert: fix(latex): run after-compilation-finished hook after Tex-Tex-sentinel
This hack is no longer necessary; it was addressed upstream.

Revert: 79684ade71
Ref: emacsmirror/auctex@650d0f3297
Ref: #8051
2025-04-06 18:36:50 -04:00
90b64a0313 refactor(latex): replace latex-preview-pane w/ auctex-cont-latexmk
Since latex-preview-pane is unmaintained, replace it with auctex-cont-latexmk.el
and a simple function to compile the document and open the default viewer.

Close: #3128
Close: #5249
2025-04-06 00:04:39 -04:00
dac6e05b87 refactor: deprecate appendq!, prependq!, & delq! macros
In the interest of slimming down Doom's core (as we near v3), I've
deprecated these macros. They doesn't really need to exist. Sure, the
alternatives aren't as ergonomic or elegant, but they're good enough
that we don't need these trivial wrappers. Their local uses have been
refactored out as well.
2025-03-25 14:16:56 -04:00
79684ade71 fix(latex): run after-compilation-finished hook after Tex-Tex-sentinel
Fix: #8051
2024-09-06 04:46:36 -04:00
fe54aa436c fix(latex): modes not remapped to auctex modes
Deduced from a comment in 21a252d (where
`TeX-after-compilation-finished-functions` wasn't being triggered
because the user was in latex-mode, instead of LaTeX-mode).

Fix: 21a252d994
2024-09-05 16:01:03 -04:00
78f8026620 fix(latex): auto-reveal folded regions at point
Fix: #8031
2024-08-30 18:45:00 -04:00
c27387ce76 fix(latex): enable LSP on LaTeX-mode-local-vars-hook too 2024-08-22 12:29:15 -04:00
21a252d994 bump!: :lang latex
emacs-straight/auctex@280cd4a0ca -> emacs-straight/auctex@764a53c8e9
emacs-straight/adaptive-wrap@a3b179ea21 -> emacs-straight/adaptive-wrap@dea4e32c18

BREAKING CHANGE: This commit also removes the +latexmk flag from the
`:lang latex` module, since the auctex-latexmk package is no longer
needed (support has been upstreamed into auctex). This means the module
won't set `TeX-command-default` to "LaTeXMk" for you anymore; you'll
have to do it yourself, e.g. (note the capitalization!)

  (setq TeX-command-default "laTeXMk")
  ;; or
  (setq-hook! LaTeX-mode TeX-command-default "LaTeXMk")

Ref: https://git.savannah.gnu.org/cgit/auctex.git/commit/?id=4a345e2234df74f1ad98046ef1372f7ca6fb357d
2024-07-08 13:59:16 -04:00
19482ee582 feat(latex): allow fill-paragraph in description
Ref: #1849
2024-01-24 12:06:35 -05:00
c2818bcfaa fix(latex): avoid stealing focus after compilation
Current LaTeX module uses `TeX-command-run-all` for compilation, which
by default opens the compiled document in a viewer. This behavior causes
a loss of focus from the Emacs window. We address this by adding a
custom compilation function.
2023-11-27 21:35:55 -05:00
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
9cb4c8b637 fix(:lang): ensure lsp! is always appended to hooks 2022-07-25 18:12:03 +02:00
a16571db04 nit(latex): table d'hôte
This is a huge set of pedantic changes, none them affecting actual code.

Mostly, I tried to:
- use consistent names; e.g, use LaTeX wherever possible, not latex;
- fix broken symbol links;
- use capitalized comments with full stops.
2021-11-24 13:08:34 +01:00
c247f9aabd fix(latex): run AUCTeX folding after font locking
This guarantees that `TeX-fold-buffer` is run after the style
hooks and not before. Otherwise, it looks like they may
reset/erase font-lock stuff you have set up.
2021-11-18 19:05:36 +01:00
316209ea61 feat(latex): add keybinds for compilation (#5585) 2021-10-11 00:18:51 +02:00
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
eb3d645bde fix(latex): bind TeX-view in LaTeX-mode-map too
Close #4945
2021-08-01 15:15:45 -04:00
9478a6a901 lang/latex +fold: fix error when yas-snippet-{beg,end} are nil 2021-06-08 16:23:02 +03:00
68d1a45034 Key bindings for latex preview 2021-04-16 21:23:43 +03:00
2ee9e3759c More sane defaults for latex 2021-04-16 21:23:42 +03:00
0d6c32ff25 Fix #4288: no which-key label for TeX-view 2020-11-20 14:10:29 -05:00
4fc084e7bd Fix #4209: void-function +latex/LaTeX-indent-item
This was renamed to +latex-indent-item-fn in 98826f3
2020-11-03 15:24:56 -05:00
55b18b70c3 delete extra paren in :lang latex
introduced in #4183
2020-10-31 11:54:11 +02:00
ccfa2855a1 Map Tex-view to localleader-v 2020-10-31 01:55:36 +02:00
98826f33d0 lang/latex: rethink item continuation indentation
+ Rename +latex-indent-level-item-continuation to
  +latex-indent-item-continuation-offset, which more accurately reflects
  its purpose.
+ +latex-indent-item-continuation-offset now supports `align' and `auto'
  settings.
+ It can also be disabled by setting it to nil.

Fixes #3877
2020-10-20 22:55:20 -04:00
dd775167ae Add evil-tex package to :lang latex 2020-08-08 19:22:05 +03:00
3528fe0ca9 lang/latex: refactor & fix hooks 2020-05-08 06:28:35 -04:00
4d8ab273d5 Remove duplicate latex entry in docs/modules.org 2020-04-26 04:47:26 -04:00
96276a688d Merge branch 'develop' into lsp-tex 2020-04-26 10:40:34 +04:30
e4b570c9ae Fix tex-lsp related commented issues 2020-04-26 10:37:35 +04:30
8a115642ab Merge pull request #2812 from yoavm448/tex-fold
Add +fold flag to lang/latex for TeX-fold
2020-04-07 17:37:47 -04:00
bee1a794a2 Remove redundant variable 2020-04-07 13:16:40 -04:00
5e35662b9f Add +fold flag to lang/latex for TeX-fold 2020-04-07 15:48:49 +03:00
76ae9e687a Move hooks to (after! tex) block 2020-03-27 16:25:33 +04:30
169f9a6121 General, minor refactor & reformatting 2020-03-27 01:25:30 -04:00
6b68dcceee Minor fixes in docs and check for :lang lsp. 2020-03-19 19:19:35 +03:30
d046d35aeb Added +lsp to Tex-Mode. 2020-03-19 13:42:06 +03:30
120818b07e Bump :lang latex
cdominik/cdlatex@b7af5a9 -> cdominik/cdlatex@a5cb624
TheBB/company-reftex@33935e9 -> TheBB/company-reftex@275ef70
2020-03-06 15:42:35 -05:00
2f61c79a86 Pronunciation in a comment 2020-02-10 10:14:42 +02:00
afe819e2a1 Use map! for nilling out cdlatex's keymap
I previously thought this didn't work, but it seems to now...?
2020-02-08 00:37:13 +02:00
883a326e87 Add cdlatex support in latex: +cdlatex
cdlatex has 4 main functionalities:
+ Math and environments snippets: I've disabled these in favor of
  yasnippet when using :editor snippets by just unbinding the TAB in
  cdlatex's keymap
+ Auto insertion of closing delimiters: disabled in favor of smartparens
+ Fast insertion for some macros: `a becomes \alpha. Kept as-is
+ Fast accent insertion: a'~ becomes \tilde{a}. Kept as-is

I also updated the docs, and added a section explaining how to re-enable
cdlatex's snippets despite having yasnippet.
2020-02-07 13:06:14 +02:00
06c604503a Don't auto-fill in latex math/markdonw code blocks
Fixes #2453
2020-02-03 13:28:05 -05:00
a1f6f77ca0 Remove redundant flyspell-mode hook in latex
flyspell-mode is already on text-mode-hook
2019-10-24 13:39:03 -04:00
3140ab7337 lang/latex: fix advice name conflict #1849 2019-10-23 22:28:44 -04:00
237d2d3c3a lang/latex: fix fix for fill-paragraph in latex-mode #1849 2019-10-23 14:14:33 -04:00
da765bebda lang/latex: fix rainbow-delimiters-mode 2019-10-22 23:23:53 -04:00
1e90bc8c14 lang/latex: fix typo 2019-10-22 23:23:41 -04:00
d52be9de3e lang/latex: fix loading style files #1910. 2019-10-17 12:05:43 -04:00