[英]Visual Studio Code - Intellisense not working on SSH server even though it's installed
So for some reason my intellisense is not working.因此,出于某种原因,我的智能感知无法正常工作。
I tried the solutions suggested here Visual Studio Code: Intellisense not working .我尝试了此处建议的解决方案Visual Studio Code: Intellisense not working 。
The solution that seems to help most people is adding "python.autoComplete.extraPaths": [ "${workspaceFolder}/customModule" ]
, didn't work.似乎对大多数人有帮助的解决方案是添加
"python.autoComplete.extraPaths": [ "${workspaceFolder}/customModule" ]
,但没有用。 Also VS Code says it doesn't recognize python.pythonPath
when I add it. VS Code 还说当我添加它时它无法识别
python.pythonPath
。
Auto-complete not working, screen capture didn't capture my cursor, but it's right after argparse.
自动完成不起作用,屏幕截图没有捕捉到我的 cursor,但它就在
argparse.
, which should give the option to auto-complete with a list that includes: ArgumentParser
: ,它应该提供自动完成列表的选项,其中包括:
ArgumentParser
:
Remote server installed extensions:远程服务器安装的扩展:
Settings.json This is settings.json
on remote server Settings.json这是远程服务器上的
settings.json
{
"remote.autoForwardPortsSource": "output",
"python.languageServer": "None",
"python.analysis.completeFunctionParens": true,
"python.analysis.diagnosticMode": "workspace",
}
Setup:设置:
Note: Something else off is my "find declaration of function or class" is also not working.注意:还有其他问题是我的“查找 function 或类的声明”也不起作用。
the first solutions are kind of obvious, but ill add them anyway,第一个解决方案有点明显,但无论如何我都会添加它们,
settings.json
, set a language server in "python.languageServer"
.settings.json
,在"python.languageServer"
中设置一个语言服务器。 The Language Server includes: Jedi
(build-in Python extension ), Microsoft
, Pylance
, since you have already installed Pylance
, let's start with that one (if that doesnt work, try the others). Jedi
(内置 Python 扩展名)、 Microsoft
和Pylance
,既然您已经安装了Pylance
,那么让我们从那个开始吧(如果不起作用,请尝试其他)。python.pythonPath
to the path returned in your terminal for which python3
python.pythonPath
设置为在您的终端中返回的路径, which python3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.