Commit graph

60 commits

Author SHA1 Message Date
Daniel Nicolai 073fe39b38
latex layer add auto configure pdf-tools and open in split window
This commit makes the latex layer automatically configure pdf-tools as
latex pdf-viewer if the pdf layer is installed.

Additionally it adds a layer variable to configure pdf-tools to open in a
split-window. (Strangely, finding out how to achieve that is far from trivial,
and also not easy to google, because many hits do not provide the "correct"
answer (see the typical example
[here](https://emacs.stackexchange.com/questions/28056/spacemacs-latex-how-to-make-view-command-tile-vertically-with-emacs-window)).

Update layers/+lang/latex/funcs.el

Co-authored-by: Lucius Hu <1222865+lebensterben@users.noreply.github.com>
2021-09-04 21:14:45 +02:00
Maximilian Wolff ad8acf6d51 [latex] Add missing binding for 'org-ref-insert-cite-key with lsp 2021-05-09 20:37:02 +00:00
Lucius Hu 2713ec8789 Fix #14641 2021-04-15 21:42:17 +02:00
Lucius Hu cd0c914ba1 latex: refactor
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Refactored function
2021-04-04 12:48:21 +02:00
syl20bnr 97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
Maximilian Wolff 6018580958 Make layers activate/deactivate the right version of smartparens
Before layers were sometimes only activating the non strict
version of smartparens. Also some were only disabling
the non-strict version leaving some of the smartparens
advices intact.

With this PR, all layers set the right version of smartparens.
Also if the layer is trying to disable it a standard function
will now take care to disable all versions of smartparens.
2021-03-16 17:47:15 +00:00
duianto 9375d6f54d Add missing space before defun args parens 2021-02-10 08:51:55 +01:00
SALVATI Sylvain 4b8b8bd608 [latex] add support for company-math in latex layer
Combining company-math and company-auctex

Updating documentation and make math-symbol-lists requiring company-math

Back to original readme

math-symbol-lists is used elsewhere and should not be made dependent on the use of company-math

using the result of company-auctex-macros

Add explicit dependency of company-amth to math-symbol-lists
2021-01-10 20:03:17 +00:00
Lucius Hu 2d1d338f46
LaTeX: improved i18n support and documentation (#14204)
* LaTeX: improved i18n support and documentation

- Added a new layer config variable `latex-build-engine`, a thin wrapper of
  `TeX-engine`:
  - For better support of non-european character set rendering, `xetex` is
    chosen when it's found on PATH, and when eithe `chinese` or `japanese`
    layer is enabled
- Added a new layer config variable `latex-enable-preview`:
  - When non-nil, `auto-revert-mode` is added to `doc-view-mode-hook`
  - Previously this is described in documentation but requires users to set it
    manually
- Documentation:
  - Added a section that lists are layer config variables
  - Improved all documentation examples, s.t. they are valid elisp forms to be
    evaluated directly
  - Improved the section on backend:
    - Emphsized that LSP layer is always preferred
    - Provided information on installing the language server
  - Added the default value for layer config variable, `latex-nofil-env`

* minor edits

- Updated CHANGELOG.develop
- Renamed `latex-enable-preview` to `latex-refresh-preview`
- Replaced a fuzzy intra-link in documentation with a proper link

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2020-12-13 10:33:04 +01:00
Maximilian Wolff 0d609c09d4
[latex] Fix broken binding for SPC m R TAB
Fixes key warning mentioned in #12975
2020-11-12 22:03:47 +01:00
Maximilian Wolff 57baf7d237 Add lsp support to latex layer 2020-10-30 21:06:34 +01:00
Robert O'Connor 82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
wangtianshu 235ed43010 Fix ~SPC m ;~ binding 2020-01-20 15:41:20 +01:00
git@f-t.me 25a7111ee1 [latex] added ConTeXt mode to the key bindings 2020-01-08 17:58:26 +01:00
Olivier Verdier 7818fa3ccf add bindings to navigate between errors in tex mode 2019-06-28 20:32:11 +02:00
et2010 2e6e69eeff latex layer: add company-reftex 2019-05-28 11:47:03 +02:00
Matt Kramer df6d744b86
Put magic-latex-buffer in TeX-update-style-hook instead of LaTeX-mode-hook
See https://github.com/zk-phi/magic-latex-buffer/issues/36
2018-10-11 09:12:58 +03:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
syl20bnr 41e546f040 Move all use-package hook declaration to pre-init functions
Had to create dummy init functions at some places since the owner of a package
is the last layer that defines the init function of a package. And a package
can be installed only if it has an owner.
2018-01-10 23:57:18 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
Robbert van der Helm c61ae1a1c1 Add ivy support to the gtags layer
It would be much better to have a single function for each layer that
initializes ggtags, helm-gtags and counsel-gtags for a mode.
2017-12-17 22:03:01 -05:00
Eivind Fonn f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02:00
Eivind Fonn 08561d8631 core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)

This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.

This commit also fixes:

- configuration-layer/describe-package now shows which post-init and pre-init
  functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
  configuration-layer/discover-layers. Previously, this led to all layers being
  recreated after e.g. `SPC h SPC`, without any of the dotfile information.
  Since this information is now necessary for
  configuration-layer/describe-package, it’s important that we don’t clear the
  indexed layers when invoking this function.
2017-06-22 11:53:05 +02:00
Ben cc1b087497 adding the package magic-latex-buffer to the latex layer 2017-05-30 12:28:26 +02:00
syl20bnr f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
2017-03-19 12:40:36 -04:00
bmag 6f463c4d0e TeX fold: add comment about not-autoloaded commands 2017-03-06 15:58:26 +02:00
nashamri f8306a4f5c Add shortcuts for missing latex folding functions 2017-03-06 15:51:03 +02:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Justin Burkett 7bf00ad878 which-key: Update usage of replacement alists
See 19186917eb
2016-11-25 12:32:10 +02:00
Eivind Fonn 5a869764dd Further improve gtags layer
- Add option to disable by default
- Use local-vars hook to allow per-project enable/disable
- Don’t enable helm-gtags-mode (no need)
- Move emacs bindings from helm-gtags-mode-map to ggtags-mode-map
2016-08-22 15:11:25 +02:00
Christian E. Hopps b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +02:00
NJBS b6432e1efe Add prefixes to the LaTex layer 2016-06-12 21:57:14 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
Eivind Fonn ed8c0ca1dc latex: fix auctex-latexmk error 2016-05-29 18:23:51 +02:00
sooheon 15e6290151 Make check for company-mode explicit, not implicit
People may have company-mode installed without necessarily using the
auto-completion layer.
2016-05-27 00:32:05 -04:00
JP-Ellis 97aff9d8db Add BibTeX layer.
Integrates with org mode and LaTeX in order to manage citations.

Signed-off-by: JP-Ellis <josh@jpellis.me>
2016-04-17 00:37:47 -04:00
Kechao CAI f5924d1acb Bind TeX-command-run-all to ~SPC m a~ 2016-02-27 15:00:10 +01:00
Kechao CAI c3fae7dd05 Latex layer: Add shortcuts for fill and comment 2016-02-27 15:00:08 +01:00
adrsta b7eda6f014 added name "preview" to p-prefix 2016-02-16 23:16:01 -05:00
Eivind Fonn e9f8377b92 Tweak flycheck loading process 2016-01-31 23:04:48 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
syl20bnr b0e4232868 latex: move folding on SPC m z and update doc 2016-01-03 23:51:19 -05:00
justbur 93cfc876a6 latex: Add tex-fold-mode option and reorganize
Add the latex-enable-folding variable which turns on TeX-fold-mode and
adds some related bindings.

Reorganize the layer:
1. Move reftex into packages.el and delete the extensions file.
2. Don't duplicate the binding of keys. Use a loop to bind in tex-mode
   and latex-mode. Then just add the additional latex-mode bindings
2016-01-03 22:23:12 -05:00
justbur f3d3404bdb latex: Fill out bindings some more
1. Add ,, and ,k for C-c C-c and C-c C-k.
2. Add useful auctex commands (C-c C-[key] => ,[key]).
2016-01-03 22:23:12 -05:00
justbur 9051fffd7c latex: Fix enabling of minor modes
TeX-PDF-mode and TeX-source-correlate-mode are minor modes with the
usual functions. They should be enabled using the functions and not by
setting the variables as their docstrings both state.
2016-01-03 22:23:12 -05:00
Eivind Fonn ac0ba50154 Make flycheck/flyspell hooks more explicit 2015-12-11 02:08:55 -05:00
Ben fb62086b34 Binding added to open Tex-output-buffer 2015-11-28 15:03:05 +01:00