今天晚上给 lsp-bridge 加了 vim, robot, lemminx, puppet, svls, rego, camells 7种LSP server, 目前 lsp-bridge 已经支持 105 种 LSP server, 还有 35 种语言, 就把全世界所有编程语言的代码补全给支持了。
欢迎大佬们一起贡献呀:
剩余的35种编程语言:lsp-bridge/todo.md at ae6b4702b6f47dda77e04ff8c820c4a24a8ba708 · manateelazycat/lsp-bridge · GitHub
新LSP Server的样例补丁: Add robot framework support. · manateelazycat/lsp-bridge@68b3b87 · GitHub 非常简单, 10几行就搞定了
6 个赞
早上给 lsp-bridge 增加了ltex-ls, Cucmber, citation-langserver, ballerina-lang-server, Odin, Common Workflow, v-analyzer, TTCN-3, Fennel, Fuzion, Standard ML 11种LSP server 的支持。
目前 lsp-bridge 支持116种 LSP Server, Emacs能打开的编程语言的LSP Server 全部支持啦。
剩下的 19 种大部分都是Emacs没有对应语言的mode, 少部分是Windows专用的编程语言。
5 个赞
还真这么用过 ~ 在Emacs中用 Lua 配置neovim. 然后,运行 NeoVim 看配置效果。
@manateelazycat 大佬,自动出现下面的debug信息:
debug(error (cl-assertion-failed (cl-plusp length)))
(condition-case error (lsp-bridge-epc-net-read) (error (debug 'error error) (error "net-read error: %S" error)))
lsp-bridge-epc-net-read-or-lose(#<process lsp-bridge-epc con 4>)
(let ((event (lsp-bridge-epc-net-read-or-lose process)) (ok nil)) (lsp-bridge-epc-log "<< RECV [%S]" event) (unwind-protect (condition-case err (progn (apply 'lsp-bridge-epc-signal-send (cons (progn (or ... ...) (aref connection 4)) event)) (setq ok t)) ('error (lsp-bridge-epc-log "MsgError: %S / <= %S" err event))) (if ok nil (lsp-bridge-epc-process-available-input connection process))))
(while (lsp-bridge-epc-net-have-input-p) (let ((event (lsp-bridge-epc-net-read-or-lose process)) (ok nil)) (lsp-bridge-epc-log "<< RECV [%S]" event) (unwind-protect (condition-case err (progn (apply 'lsp-bridge-epc-signal-send (cons (progn ... ...) event)) (setq ok t)) ('error (lsp-bridge-epc-log "MsgError: %S / <= %S" err event))) (if ok nil (lsp-bridge-epc-process-available-input connection process)))))
(save-current-buffer (set-buffer (process-buffer process)) (while (lsp-bridge-epc-net-have-input-p) (let ((event (lsp-bridge-epc-net-read-or-lose process)) (ok nil)) (lsp-bridge-epc-log "<< RECV [%S]" event) (unwind-protect (condition-case err (progn (apply 'lsp-bridge-epc-signal-send (cons ... event)) (setq ok t)) ('error (lsp-bridge-epc-log "MsgError: %S / <= %S" err event))) (if ok nil (lsp-bridge-epc-process-available-input connection process))))))
lsp-bridge-epc-process-available-input(#s(lsp-bridge-epc-connection :name "lsp-bridge-epc con 4" :process #<process lsp-bridge-epc con 4> :buffer #<buffer *lsp-bridge-epc con 4*> :channel ("lsp-bridge-epc con 4" nil (methods . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG METHODS: %S" args) (lsp-bridge-epc-handler-methods #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (caadr args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (epc-error . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG EPC-ERROR: %S" args) (apply 'lsp-bridge-epc-handler-epc-error #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (return-error . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG RET-ERROR: %S" args) (apply 'lsp-bridge-epc-handler-return-error #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (return . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG RET: %S" args) (apply 'lsp-bridge-epc-handler-return #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status ok :value nil)) (call . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG CALL: %S" args) (apply 'lsp-bridge-epc-handler-called-method #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)))) #<process lsp-bridge-epc con 4>)
(save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of connection) cl-struct-lsp-bridge-epc-connection-tags) t)) (signal 'wrong-type-argument (list 'lsp-bridge-epc-connection connection))) (aref connection 3))) (goto-char (point-max)) (insert message) (lsp-bridge-epc-process-available-input connection process))
lsp-bridge-epc-process-filter(#s(lsp-bridge-epc-connection :name "lsp-bridge-epc con 4" :process #<process lsp-bridge-epc con 4> :buffer #<buffer *lsp-bridge-epc con 4*> :channel ("lsp-bridge-epc con 4" nil (methods . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG METHODS: %S" args) (lsp-bridge-epc-handler-methods #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (caadr args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (epc-error . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG EPC-ERROR: %S" args) (apply 'lsp-bridge-epc-handler-epc-error #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (return-error . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG RET-ERROR: %S" args) (apply 'lsp-bridge-epc-handler-return-error #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (return . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG RET: %S" args) (apply 'lsp-bridge-epc-handler-return #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status ok :value nil)) (call . #s(lsp-bridge-deferred-object :callback (lambda (args) (lsp-bridge-epc-log "SIG CALL: %S" args) (apply 'lsp-bridge-epc-handler-called-method #s(lsp-bridge-epc-manager :title "python3 /Users/ethanlin/.emacs.d/site-lisp/lsp-bri..." :server-process #<process *lsp-bridge*> :commands ... :port 50641 :connection #1 :methods nil :sessions ... :exit-hooks nil) (lsp-bridge-epc-args args))) :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)))) #<process lsp-bridge-epc con 4> "000010(return 249 ())\n")
(closure ((connection . #s(lsp-bridge-epc-connection :name "lsp-bridge-epc con 4" :process #<process lsp-bridge-epc con 4> :buffer #<buffer *lsp-bridge-epc con 4*> :channel ("lsp-bridge-epc con 4" nil (methods . #s(lsp-bridge-deferred-object :callback ... :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (epc-error . #s(lsp-bridge-deferred-object :callback ... :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (return-error . #s(lsp-bridge-deferred-object :callback ... :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)) (return . #s(lsp-bridge-deferred-object :callback ... :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status ok :value nil)) (call . #s(lsp-bridge-deferred-object :callback ... :errorback lsp-bridge-deferred-resignal :cancel lsp-bridge-deferred-default-cancel :next nil :status nil :value nil)))))) (p m) (lsp-bridge-epc-process-filter connection p m))(#<process lsp-bridge-epc con 4> "000010(return 249 ())\n")
recursive-edit()
这个可能是什么引起的呢?谢谢
重试了下, bug 没重现出来。
刚才在 Terminal 下安装 basedpyright,在 Emacs 中安装了 Tabnine 支持。在 Python 中试了下,转到 Emacs 配置,出现的。
如果再出来,我试着重现,记录下步骤。
1 个赞
我在doom中使用lsp-bridge,希望将 acm-select-next 绑定到 \C-n,结果失败了。但是绑定 [tab] 就是可以的,暂时还没找到解决方案
啊,突然想到也许 issue 里面会有解决方案,还真找到了
opened 03:54PM - 25 Jan 23 UTC
closed 04:07AM - 26 Jan 23 UTC
I want to use keybinding "C-n" "C-p" for select next and preview candidate.
I… use the config as following, but not work.
could you tell me how to reset the default keybing?
```
(with-eval-after-load 'lsp-bridge
(evil-define-key 'normal lsp-bridge-mode-map (kbd "C-n") 'acm-select-next)
(evil-define-key 'normal lsp-bridge-mode-map (kbd "C-p") 'acm-select-prev)
)
```
---
另外,最近在重新整理emacs配置,前后对比了lsp-mode,eglot,lsp-bridge,只想说lsp-bridge太强了,太丝滑了。
感谢懒猫又搞出这么牛逼的东西!比心!
是我使用方式有问题,已在 issue 上做了说明,方便大家检索。感谢懒猫大佬
大佬,开启 copilot 后似乎没有补全选项啊
我特地敲了不完整的单词,login和status输出一切正常,就是complete没反应,而且corfu的补全框也没有啊
剩下该如何调试呢
要付费,zsbd,lsp-bridge不能和corfu一起用
原来,lsp-bridge的补全框时自己处理的
copilot我有购买的,vscode neovim 上的copilot均正常的,包括emacs上copilot-chat插件也能使用
bszzz
2024 年10 月 1 日 13:21
3689
请问lsp-bridge-code-action可以在LSP没有diagnostic信息时使用吗,我经常在neovim里用clangd的expand macro 和 “Add using-declaration for sth. and remove qualifier”
加一个github issue吧,我有空的时候看吧。
我今天检查了 lsp-bridge 的代码, code action 是可以在没有诊断信息的时候发出请求的, 下图就是 lsp-bridge Python 代码, 在没有任何诊断信息的情况下依然可以用 code action.