如题…………
这个不行吗?
GitHub - emacs-lsp/lsp-mode: Emacs client/library for the Language Server Protocol + GitHub - palantir/python-language-server: An implementation of the Language Server Protocol for Python 直接用没什么问题呀,
安装 server
pip install 'python-language-server[all]'
谢谢楼上朋友的回复,已经可以用了,就是company-box那个文档提示占用面积太大,能不能设置手动,需要时在弹出?
我现在用的是eglot,
用lsp-python-ms
一直报错:
File mode specification error: (void-variable lsp-server-install-dir)
除了README,还设置了
(setq lsp-python-ms-dir "~/.emacs.d/site-lisp/"
lsp-python-ms-executable "~/path/to/output/bin/Release/linux-x64/publish/Microsoft.Python.LanguageServer")
可以帮忙解答吗?
lsp-python-ms
依赖于lsp-mode
,不是用于 eglot 的。
我可能断句不明显,
我现在用的是eglot,但是还想试试lsp-python-ms
,主要比较一下速度,但是却总是报错:File mode specification error: (void-variable lsp-server-install-dir)
这句一直没解决。
几处抄来的配置综合起来:
(use-package lsp-python-ms
:defer t
:after lsp-mode python
;; :if (or *python3* *python*)
:hook
(python-mode . (lambda ()
(require 'lsp-python-ms)
(lsp)))
:custom
(lsp-python-executable-cmd "python3")
:config
(setq lsp-python-ms-dir "~/.emacs.d/site-lisp/"
lsp-python-ms-executable "~/.emacs.d/site-lisp/Microsoft.Python.LanguageServer"))
升级 lsp-mode
。lsp-server-install-dir
在 lsp-mode
中定义的。
1 个赞