我公司开发服务器日常SSH延迟超过1秒,不给装mosh。其他用户一跑大任务终端里的Emacs就卡住,代码都看不动。我昨天终于崩溃,准备转VSCode Remote……
当然如果哪位能给个VSCode Remote那样能客户端服务端异步、断线重连自动恢复现场的Emacs工作流更好……

Follow

@hako 我试过查看服务器上的文件,想C-x C-f开个新文件就巨卡,应该是SSH延迟太高。另外我始终没搞懂LSP怎么搞,以及我断网重连能不能自动恢复现场……

@fulkrum@qoto.org LSP 我是用的 Eglot

(use-package eglot :defer t :hook ((cmake-ts-mode bash-ts-mode sh-mode c-mode c-ts-mode c++-mode c++-ts-mode css-mode css-ts-mode go-ts-mode go-mod-ts-mode html-mode js-mode js-ts-mode js-json-mode json-ts-mode markdown-mode python-mode python-ts-mode rust-ts-mode typescript-ts-mode yaml-ts-mode) . eglot-ensure))

用 TRAMP 的話會嘗試在目標機器上運行語言服務器。

然後
ElDoc box 顯示文檔。

(use-package eldoc-box :defer t :hook ((eldoc-mode . eldoc-box-hover-mode)) :custom (eldoc-box-only-multi-line t))


確實挺卡的……我目前用得比較少所以還能接受。

搜索中發現這篇文章寫了些相關的東西,也許可以看看
https://umarahmad.xyz/blog/editing-remote-code-with-emacs/

@hako 感谢,我来看看……另外奈奈推荐了SSHFS,我也试试。

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.