Commit graph

189 commits

Author SHA1 Message Date
Alexander Graul
db2901af71 Update documentation of recognized latex viewers
The user documentation of +latex-viewers did not keep up with changes to
the variable. This commit realigns its documentation.
2019-10-03 12:56:56 +02:00
Henrik Lissner
a7e288c191
Merge pull request #1825 from UndeadKernel/fix_pdf-viewers
lang/latex: +pdf-viewers ordering and hook type-o
2019-09-26 14:31:00 -04:00
Henrik Lissner
7ec6a32c30
lang/latex: associate .tex with LaTeX-mode 2019-09-26 14:26:47 -04:00
Undead Kernel
5385ee4f35 lang/latex: +pdf-viewers ordering and hook type-o
Previously, the last viewer set in `+latex-viewers` would take
precedence. The list is now reversed before applying changes so that the
first set has precedence.

The wrong hook variable was used to revert view buffers after compilation.
2019-09-26 14:35:44 +02:00
Henrik Lissner
1c05773c39
General, minor refactors & comment revision 2019-09-11 23:41:08 -04:00
Henrik Lissner
3fae411918
lang/latex: refactor default viewer resolution
And add evince to list of auto-detected viewers.

This should fix an issue where preview-pane was used regardless of what
viewer(s) were available.
2019-08-27 00:11:52 -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
fbcb4e6973
Minor refactor across the board 2019-03-04 20:47:26 -05:00
Henrik Lissner
3873ab3875
lang/latex: use +latex-bibtex-file 2019-03-03 02:18:02 -05:00
Henrik Lissner
85b1983c89
Merge pull request #1195 from xhcoding/develop
Add: sumatrapdf as pdf viewer on Windows
2019-02-24 21:05:29 -05:00
Henrik Lissner
7c5eefee3e
General, minor refactoring 2019-02-24 13:58:56 -05:00
xhcoding
5da216a1c5 Add: sumatrapdf as pdf viewer on Windows 2019-02-24 17:44:06 +08:00
Henrik Lissner
69ed1a4a99
feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
Henrik Lissner
9f249de569
lang/latex: remove +latex-bibtex-file
An unnecessary layer of abstraction on top of two straight-forward
variables, reftex-default-bibliography and
bibtex-completion-bibliography.
2019-01-05 17:46:37 -05:00
Henrik Lissner
c3c9c01bad
lang/latex: rewrite README 2019-01-05 17:45:42 -05:00
UndeadKernel
de2e41774f latex fix: enable spell checking correctly
The varible `TeX-mode-local-vars-hook` is not called correctly as AucTeX
reports that the major mode in a LaTeX file is `latex-mode`. Instead,
let's use `latex-mode-local-vars-hook` to enable flyspell.

This change enables disabling the feature of flyspell of immediately
spellchecking a document with:

`(setq-hook! 'TeX-mode-hook +spellcheck-immediately nil)`
2019-01-03 13:49:00 +01: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
d6cb0ec5f5
General cleanup & minor refactoring 2018-12-22 04:25:15 -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
5e96b42ccc
lang/latex: fix TeX-latex-mode error
Caused because use-package is creating an autoload for TeX-latex-mode as
if it were in the tex package, but it's in the latex package, instead.

Since auctex already autoloads TeX-latex-mode, there's no need to set
our own.
2018-12-06 19:07:36 -05:00
Henrik Lissner
752b92570d lang/latex: defconst -> defvar #955
Allow +latex-viewers to be set sooner.
2018-10-12 14:20:45 -04:00
Henrik Lissner
675f4fa821
lang/latex: enable flyspell-mode after local-vars
Gives setq hooks and file/directory-local variables the opportunity to
take effect before flyspell activates.
2018-10-06 20:56:18 -04: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
Henrik Lissner
ee4d317293
lang/latex: improve smartparens compatiblity
Also fixes special quote insertion (mentionde in #485)
2018-08-28 01:27:56 +02:00
Henrik Lissner
9653185478
lang/latex: fix PDF Tools viewer on MacOS 2018-08-11 01:59:37 +02:00
Henrik Lissner
7c4a353228
lang/latex: remove redundant visual-line-mode hook 2018-08-02 16:32:39 +02:00
Henrik Lissner
128eb611e0
lang/latex: remove +preview-pane flag
Reported by @UndeadKernel
2018-08-02 16:15:10 +02:00
Henrik Lissner
14816ef173
lang/latex: fix detection for other viewers
Incorrect use of cl-block/cl-return meant latex-preview-pane would
always be used as the default pdf viewer.

Reported by @UndeadKernel
2018-08-02 16:12:53 +02:00
Henrik Lissner
cf4ea445a1
lang/latex: don't reverse +latex-viewers
This incorrectly reversed the priority ordering of +latex-viewers. This
is an artifact from a rejected approach at short-circuiting
+latex-viewer, which was replaced with cl-block->cl-return.

Reported by @UndeadKernel
2018-08-02 15:48:32 +02:00
Henrik Lissner
cbc59f9333
Appease the byte-compiler 2018-07-30 12:10:11 +02:00
Henrik Lissner
14f4e4384a
lang/latex: general refactor 2018-07-30 03:43:43 +02:00
Henrik Lissner
2e6c362df9
lang/latex: replace viewer flags with variable
The +zathura, +skim, +okular and +pdf-tools module flags have been
removed in favor of +latex-viewers, which takes a list of symbols. Its
order determines the priority. The first viewer found on your system is
used.

If none of these viewers are found, it will fall back to
latex-preview-pane.
2018-07-30 03:43:43 +02:00
Henrik Lissner
c96c2aa7fb
Add +latex-symbols-compand-backend delegate #754
If +latex-enable-unicode-math is non-nil, company-math-symbols-unicode
will be used instead of company-math-symbols-latex.
2018-07-30 03:43:42 +02:00
Patrick Elliott
189ff349cc Merge branch 'latexRefactor' of https://github.com/patrl/doom-emacs into latexRefactor 2018-07-23 15:48:23 +02:00
Patrick Elliott
9a23492888 Removed unicode-math setup 2018-07-23 15:47:40 +02:00
Henrik Lissner
66679d2f7b
Remove (ivy|helm)-bibtex def-package's
ivy-bibtex and helm-bibtex are autoloaded by their respective packages' autoloads files, so their def-package! blocks are unnecessary.
2018-07-19 15:44:23 +02:00
Henrik Lissner
5d361534ce
Move set-company-backend! into reftex config
Since the company-reftex config doesn't do anything else, and set-company-backend! is an autodef function, it will no-op if :completion company isn't enabled.
2018-07-19 15:43:30 +02:00
Patrick Elliott
037f872a02 Fix final regression (hopefully!) 2018-07-19 12:10:41 +02:00
Patrick Elliott
eeb10ae6cd Put comment in right place 2018-07-18 17:25:27 +02:00
Patrick Elliott
c502fe6328 Added +unicode-math flag 2018-07-18 17:20:52 +02:00
Patrick Elliott
f497d1bf0d Fix regression 2018-07-18 16:59:15 +02:00
Patrick Elliott
c1381d7747 Defer company-reftex 2018-07-18 16:58:26 +02:00
Patrick Elliott
6b58c8d451 De-tangle company-auctex and company-math
Co-authored-by: Henrik Lissner <henrik@lissner.net>
2018-07-18 16:22:47 +02:00
Patrick Elliott
03e7d1a66c Sort entries and add parencite
Co-authored by: @UndeadKernel
2018-07-18 15:40:09 +02:00
Patrick Elliott
c5fd541773 Implement @hlissner's suggestions 2018-07-18 15:31:35 +02:00
Patrick Elliott
581536396f Tell emacs how to parse tex files 2018-07-18 14:04:23 +02:00
Patrick Elliott
9174b6c0e4 Stop chktex from producing garbage 2018-07-18 14:03:31 +02:00
Patrick Elliott
0aa15c1622 simplify hook 2018-07-18 13:39:30 +02:00
Patrick Elliott
6e67e5b3e4 simplify reftex declaration 2018-07-18 13:39:15 +02:00
Patrick Elliott
e7465018fc This shouldn't be tied to pdf-tools 2018-07-18 13:38:48 +02:00