如今不限制语言跨buffer补全的最佳方案是?

道友们好,想要寻找一个轻量级(类似 dabbrev-completion )但能够跨buffer(捕捉我打开的buffer)的补全代码的方案。

小生近期疏忽精进emacs,以及检索到的方案都不是很理想,特此来询问。

小生本地安装了corfu 以及开启了和 dabbrev 的配合方案,可能因为工作在小众语言的缘故,并没有感受到太多corfu的效用。

诚听道友们的建议!

dabbrev-expand是不是就可以?

1 个赞

跨buffer不知道,但不限语言在任何buffer都可以补全的最佳方案应该是基于ctags的方案,比如company-ctags,而且也轻量级,至少比lsp轻量太多,小众语言也支持

测试了一下真的OK,好用!

考虑过tags的解决方案,但我平时只工作在几个文件,感觉有点大材小用哈哈

lsp-bridge开箱即用

1 个赞

dabbrev 本就可以跨 buffer。保持这个变量为 nil 就行了:

(defcustom dabbrev-search-these-buffers-only nil
  "If non-nil, a list of buffers which dabbrev should search.
If this variable is non-nil, dabbrev will only look in these buffers.
It will not even look in the current buffer if it is not a member of
this list."
  :type '(choice (const nil) (repeat :tag "List of buffers" string))
  :group 'dabbrev)

说实话 lsp-bridge 的配置过程还是比较复杂的 :grinning:

不复杂哇, 开箱即用哇。