manateelazycat / lsp-bridge

A blazingly fast LSP client for Emacs
GNU General Public License v3.0
1.46k stars 214 forks source link

Fix problem of sometimes remote file has no popup menu #819

Closed nohzafk closed 10 months ago

nohzafk commented 10 months ago

Fix #769

the core fix is on acm.el L1498

fix lsp-bridge-remote-send-func-request "ctags_complete" using (file-local-name (buffer-file-name)) it will raise an error

file-local-name: Wrong type argument: stringp, nil

it interupt the whole process and stop the completion menu from appearing.

when editing remote file, the buffer do not associate with an actual file on the disk, it is created by lsp-bridge-opne-remote-file--response hence (buffer-file-name) will return nil, it should use buffer local variable lsp-bridge-remote-file-path.

manateelazycat commented 10 months ago

Can you remove any unnecessary indentation?

manateelazycat commented 10 months ago

Fix #769

the core fix is on acm.el L1498

fix lsp-bridge-remote-send-func-request "ctags_complete" using (file-local-name (buffer-file-name)) it will raise an error

file-local-name: Wrong type argument: stringp, nil

it interupt the whole process and stop the completion menu from appearing.

when editing remote file, the buffer do not associate with an actual file on the disk, it is created by lsp-bridge-opne-remote-file--response hence (buffer-file-name) will return nil, it should use buffer local variable lsp-bridge-remote-file-path.

  • formatting the file according to emacs lisp standard
  • add logging

Please send patch just fix stringp error, please remove logging code. Thanks.

nohzafk commented 10 months ago

commit only bug fix code, remove unrelated code.

manateelazycat commented 10 months ago

thanks for patch