-
-
Notifications
You must be signed in to change notification settings - Fork 896
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
Fix lsp-mode's tramp support #4204
Conversation
|
||
`lsp-mode` detects whether a particular file is located on remote machine and looks for a client which matches current file and it is marked as `:remote?` t. Then `lsp-mode` starts the client through tramp. By default `lsp-mode` will copy the local client and mark it as `remote? t`. In most of the cases it is good enough but certain cases this may not work (e. g. if the server configuration contains references to local paths). In this case the user is supposed to create `.dir-local` configuration to override the references to local paths or open an issue on `lsp-mode` side to make the setting remote agnostic. To turn of automatic remote clients registration you can set `lsp-auto-register-remote-clients` to `nil`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yyoncho A small typo here "To turn off" (instead of "To turn of").
But as a side note I've applied this patch and it's been working nicely for my use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sochotnicky thank you, will be applied before merging.
While testing this out, I realized that if the local side has the LSP server installed but remote does not, this will fail with a bit of cryptic message (lsp server failed to start do you want to restart etc). Inspecting the logs it looks like the attempt was to start a server that didn't exist remotely. Not sure if you'd want to tackle that one here or perhaps a separate PR. |
- This fixes the implementation of `lsp-mode` tramp support. After this PR the remote clients will be automatically registered and in most of the cases it will work out of the box. The remote connection is managed to a way similar to what eglot does. Fixes emacs-lsp#4158 Fixes emacs-lsp#4150 Fixes emacs-lsp#4158 Fixes emacs-lsp#4150 Fixes emacs-lsp#3841 Fixes emacs-lsp#3642 Fixes emacs-lsp#3579 Fixes emacs-lsp#3530 Fixes emacs-lsp#3491 Fixes emacs-lsp#3490 Fixes emacs-lsp#3391 Fixes emacs-lsp#3369 Fixes emacs-lsp#3364 Fixes emacs-lsp#3020 Fixes emacs-lsp#3018 Fixes emacs-lsp#3020
@sochotnicky pushed a fix for this issue. Please let me know if it works for you. Thank you for testing it out. |
Fix lsp-mode's tramp support
lsp-mode
tramp support. After this PR theremote clients will be automatically registered and in most of the cases it will
work out of the box. The remote connection is managed to a way similar to what
eglot does.
Fixes #4158
Fixes #4150
Fixes #4158
Fixes #4150
Fixes #3841
Fixes #3642
Fixes #3579
Fixes #3530
Fixes #3491
Fixes #3490
Fixes #3391
Fixes #3369
Fixes #3364
Fixes #3020
Fixes #3018
Fixes #3020