Skip to content

A hook to latex-mode doesn't trigger eglot ensure #1340

Answered by maikol-solis
maikol-solis asked this question in Q&A
Discussion options

You must be logged in to vote

Using the default setting didn't trigger any warning or error.

However, I tried this

(add-to-list 'eglot-server-programs
             '(latex-mode . ("texlab")))

And now eglot is triggered automatically by the add-hook part.

I am just random guessing here (I don't know the internals in latex-mode). But, maybe the problem is when tex-mode is called, the default mode for the file is latex-mode and at this point there isn't any server assigned for that mode. So eglot skipped it in the eglot-server-programs list.

In any case, the line I showed before solves the problem.

Thanks.

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
10 replies
@joaotavora
Comment options

@maikol-solis
Comment options

@joaotavora
Comment options

@maikol-solis
Comment options

Answer selected by maikol-solis
@joaotavora
Comment options

@maikol-solis
Comment options

@joaotavora
Comment options

@maikol-solis
Comment options

Comment options

You must be logged in to vote
1 reply
@maikol-solis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants