使用 coc.nvim
配置 python 补全
- coc-jedi
- coc-python 配置失败
- python LSP 配置失败
python LSP
需要配置 coc-settings.json
LSP重启5次失败
coc-python
推荐使用,coc-settings.json
中不能配置 LSP
支持两种:
- jedi (工作不正常)
- MPLS (网络原因,不能正常下载)
coc-jedi
与 coc-python
冲突,需要先卸载,基于 jedi-language-server
$ python3 -m pip install --user pipx
$ pipx install jedi-language-server
coc-settings.json
配置如下
"jedi.enable": true,
"jedi.trace.server": "messages",
"jedi.diagnostics.enable": true,
"jedi.diagnostics.didOpen": true,
"jedi.diagnostics.didChange": true,
"jedi.diagnostics.didSave": true