From e4b570c9aeb15473e56d6c8351108706fdaee366 Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" Date: Sun, 26 Apr 2020 10:33:10 +0430 Subject: [PATCH] Fix tex-lsp related commented issues --- docs/modules.org | 2 +- modules/lang/latex/README.org | 4 ++-- modules/lang/latex/config.el | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 25ed94402..e062d5113 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -114,7 +114,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO + kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= =+lsp= - TODO ++ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex +lsp= - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO diff --git a/modules/lang/latex/README.org b/modules/lang/latex/README.org index 9b6fe2e4b..8a52cea48 100644 --- a/modules/lang/latex/README.org +++ b/modules/lang/latex/README.org @@ -30,8 +30,8 @@ Provide a helping hand when working with LaTeX documents. ** Module Flags + =+latexmk= Use LatexMk instead of LaTeX to compile documents. + =+cdlatex= Enable [[https://github.com/cdominik/cdlatex][cdlatex]] for fast math insertion. -+ =+lsp= Start LSP automatically in `tex-mode-hook`. This - requires the =:tools lsp= module. ++ =+lsp= Start LSP automatically in `tex-mode-hook`. This requires the =:tools + lsp= module. Supported servers are `digestif` and `TexLab`. ** Plugins + [[http://www.gnu.org/software/auctex/][auctex]] diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 081edf29b..19a12c7b4 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -76,9 +76,10 @@ If no viewers are found, `latex-preview-pane' is used.") ;; quotes or not, via `+latex-enable-plain-double-quotes' (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))) ;; Hook lsp if enabled - (when (and (featurep! +lsp) (featurep! :tools lsp)) - (add-hook 'tex-mode-local-vars-hook #'lsp!) - (add-hook 'latex-mode-local-vars-hook #'lsp!))) + (when (featurep! +lsp) + (add-hook! '(tex-mode-local-vars-hook + latex-mode-local-vars-hook) + #'lsp!))) (after! latex @@ -178,6 +179,7 @@ If no viewers are found, `latex-preview-pane' is used.") (add-to-list '+latex--company-backends #'company-auctex-environments nil #'eq) (add-to-list '+latex--company-backends #'company-auctex-macros nil #'eq)) + (use-package! company-math :when (featurep! :completion company) :defer t