Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I change servers? #12

Open
maikol-solis opened this issue Apr 9, 2024 · 3 comments
Open

How can I change servers? #12

maikol-solis opened this issue Apr 9, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@maikol-solis
Copy link

Hi. Thanks for this package, it's very useful.

There is just a little glitch that I don't understand.

In these lines,

eglot-ltex/eglot-ltex.el

Lines 94 to 95 in b61e36f

(add-to-list 'eglot-server-programs
`(,eglot-ltex-active-modes . ,(eglot-ltex--server-command)))

the eglot-ltex adds all the registered modes into eglot-server-programs.

However, I think is will be worthy using the eglot-alternatives command .

According to the documentation

If you have fools and phewls installed, the function produced by eglot-alternatives will prompt for the server to use in foo-mode buffers. Else it will use whichever is available.

So, for example, if I'm in a latex buffer, and start eglot I can choose between texlab or ltex depending on the task that I need to do.

WDYT?

@maikol-solis
Copy link
Author

As temporary solution, I have this in my config.el

  (add-to-list 'eglot-server-programs
               `((latex-mode :language-id "latex")
                 . ,(eglot-alternatives '(("texlab")
                                          ("ltex-ls")))))

@jcs090218
Copy link
Member

It sounds like a great idea. What do you have in mind? 🤔 Feel free to open PRs for this.

@jcs090218 jcs090218 added the enhancement New feature or request label Apr 9, 2024
@maikol-solis
Copy link
Author

maikol-solis commented Apr 9, 2024

Nothing in concrete yet. I don't if we can modify any element on the list of servers in the eglot.el.

In the worst case, we need to copy all the servers for the affected modes (markdown, latex, etc.) and put them at the top of eglot-server-programs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants