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

lsp-mode using shell-file-name for TRAMP connections #4371

Open
3 tasks done
cj-obrien opened this issue Mar 15, 2024 · 0 comments · May be fixed by #4384
Open
3 tasks done

lsp-mode using shell-file-name for TRAMP connections #4371

cj-obrien opened this issue Mar 15, 2024 · 0 comments · May be fixed by #4384
Labels

Comments

@cj-obrien
Copy link

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

lsp-mode.el uses shell-file-name to launch the language server (clangd, in my case) even when connected to a remote host via TRAMP. I use fish on my local host, but it is not installed on a remote machine I use for development; this prevents me from using lsp-mode unless I first customize shell-file-name.

Surely the TRAMP remote-shell property would be a more appropriate choice?

https://www.gnu.org/software/tramp/#Predefined-connection-information

Steps to reproduce

  1. Launch emacs from fish shell
  2. Browse remote host via TRAMP
  3. Open C source file on remote host
  4. Configure project root when prompted
  5. Receive notification that clangd process has failed to start
  6. Check clangd-tramp::stderr buffer and observe that clangd did not start because /usr/bin/fish was not found.

Expected behavior

The shell specified by the TRAMP remote-shell property for this host is used in place of fish

Which Language Server did you use?

lsp-clangd

OS

Linux

Error callstack

No response

Anything else?

No response

@cj-obrien cj-obrien added the bug label Mar 15, 2024
vljosa-vivodyne added a commit to vljosa-vivodyne/lsp-mode that referenced this issue Mar 20, 2024
Use the tramp-remote-shell property on the current tramp connection
instead of assuming that it's the same as the shell on the local
machine.

Resolves emacs-lsp#4371
@vljosa-vivodyne vljosa-vivodyne linked a pull request Mar 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant