emacs-lsp / lsp-docker

Scripts and configurations to leverage lsp-mode in docker environment
GNU General Public License v3.0
243 stars 34 forks source link

container name missing suffix for lsp--client-uri->path-fn #29

Open minikN opened 3 years ago

minikN commented 3 years ago

Describe the bug After starting a language server (intelephense in my case) and executing lsp-ui-peek-find-workspace-symbol I get this error:

Tramp-Buffer:

Error: No such container: lsp-langserver

Messages:

Tramp: Opening connection for lsp-langserver using docker...
Tramp: Sending command ‘exec docker  exec -it  lsp-langserver sh’
Tramp: Waiting for prompts from remote shell...
Tramp failed to connect.  If this happens repeatedly, try
    ‘M-x tramp-cleanup-this-connection’
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for lsp-langserver using docker...failed
Cleaning up the recentf list...done (0 removed)
tramp-signal-hook-function: Tramp failed to connect.  If this happens repeatedly, try
    ‘M-x tramp-cleanup-this-connection’

According to @yyoncho in Gitter:

lsp--client-uri->path-fn is set to the client wihtout the ID at some point we should copy the client and pass the proper lsp--client-uri->path-fn

To Reproduce

Expected behavior The function should open a tramp connection to the docker container with the proper name

Which Language Server did you use intelephense

OS

031 ~ ➜ uname -a
Linux voidwalker 5.8.16_1 emacs-lsp/lsp-mode#1 SMP Sat Oct 17 12:21:35 UTC 2020 x86_64 GNU/Linux
zflat commented 3 years ago

@yyoncho Can you please see my fix in https://github.com/emacs-lsp/lsp-docker/pull/40 ? Do you have any input?

yyoncho commented 3 years ago

Sorry, I saw it then I forgot about it - will review it tomorrow my time