manateelazycat / lsp-bridge

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

rust remote server 失败,可能是在远程主机没有启动 tabnine #944

Closed getong closed 1 month ago

getong commented 1 month ago

启动报错:

--- [16:02:28.263397] Client connect from 192.168.31.70:40908

--- [16:02:28.678724] init_search_backends finish

--- [16:02:30.889491] wait for init_search_backends to finsih execution

看 lsp_bridge.py 代码:

    # Functions for initialization
    def init_search_backends(self):
        # Init tabnine.
        self.tabnine = TabNine()

        # Init codeium
        self.codeium = Codeium()

        # Init copilot
        self.copilot = Copilot()

我 ps aux | grep -i tabnine , 没发现 tabnine 在远程主机运行。 但我在远程主机单独启动 emacs,是能够补全的, 也发现 tabnine 进程在运行。 综上,很可能是这段代码在远程主机上没有启动 tabnine 导致的。

manateelazycat commented 1 month ago

远程编辑应该是没有适配 TabNine 的

manateelazycat commented 1 month ago

大佬有精力可以帮忙看一下, 欢迎发PR

manateelazycat commented 1 month ago

@getong 目前是从 tabnine-bridge-binaries-folder 变量中读取TabNine的值, 并在 https://github.com/manateelazycat/lsp-bridge/blob/87ecb45eebf345a2f60bdca47e9073ec833f7737/core/tabnine.py#L92 获取 TabNine 的值。

需要给出 tabnine-bridge-binaries-folder 的值和服务器上 TabNine 的路径, 然后我们再看看怎么修复。

getong commented 1 month ago
(tabnine-bridge-binaries-folder (expand-file-name "~/.backup-emacs/tabnine-bridge/tabnine-binaries"))

我加了打印,但没执行到executable_path, 输出错误信息跟上面的一致。

manateelazycat commented 1 month ago

你在服务器端是怎么启动 lsp-bridge 的?

getong commented 1 month ago

python3 ~/.emacs.d/var/straight/repos/lsp-bridge/lsp_bridge.py

manateelazycat commented 1 month ago

应该是不知道什么原因 https://github.com/manateelazycat/lsp-bridge/blob/72b02ecec0449335fefda56054251a35d834e26b/core/remote_file.py#L354 这行代码没执行