From 8586460c56792abc7c4e84a2352d74c8c9b3df69 Mon Sep 17 00:00:00 2001 From: Dan Kessler Date: Wed, 14 Feb 2024 11:05:02 -0800 Subject: [PATCH] Handle AUCTeX's new mode naming convention Recently, AUCTeX renamed several of its major modes to avoid shadowing emacs built-in modes. This is documented here: https://git.savannah.gnu.org/cgit/auctex.git/tree/doc/changes.texi As a result, if one has the newer version of AUCTeX (the version currently available from ELPA) then when they activate LaTeX-mode, lsp will be unavailable. This is a simple fix to add support for the new TeX-mode and LaTeX-mode. --- lsp-latex.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lsp-latex.el b/lsp-latex.el index abf36e8..4ff3bad 100644 --- a/lsp-latex.el +++ b/lsp-latex.el @@ -964,8 +964,10 @@ PARAMS progress report notification data." (lsp-stdio-connection #'lsp-latex-new-connection) :major-modes '(tex-mode + TeX-mode ;; AUCTeX 14+ has renamed tex-mode to TeX-mode yatex-mode latex-mode + LaTeX-mode ;; AUCTeX 14+ has renamed latex-mode to LaTeX-mode bibtex-mode) :server-id 'texlab2 :priority 2