1

最近(目前在 1.58.2),似乎 VS Code 在自动完成名称时变得更加“有用”。以前,我可以打字

除了 pydantic.Val

然后当我击球时,Tab我最终会得到

except pydantic.ValidationError

但现在在从内置插件int到第三方库的情况下,VS Code 得到了 suuuuper 的帮助,并认为我想调用它并将签名作为片段给我:

在此处输入图像描述

如何恢复“笨蛋”行为?我很聪明,但恕我直言,我至少需要用一个开放的括号来发出信号,而不是呕吐我需要手动选择删除的文本。


我当前的设置非常沉闷:

{
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "window.titleBarStyle": "custom",
    "gitlens.blame.separateLines": false,
    "gitlens.codeLens.enabled": false,
    "editor.renderWhitespace": "all",
    "python.formatting.blackArgs": [
        "--experimental-string-processing"
    ],
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "window.zoomLevel": 1,
    "notebook.cellToolbarLocation": {
        "default": "right",
        "jupyter-notebook": "left"
    }
}

python.autoComplete.addBrackets当前默认的设置false,即使我在我的设置中明确表示,或者设置它true,据我所知没有区别。

扩展:

eamodio.gitlens
EFanZh.graphviz-preview
joaompinto.vscode-graphviz
lextudio.restructuredtext
mechatroner.rainbow-csv
ms-azuretools.vscode-docker
ms-python.python
ms-toolsai.jupyter
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.sublime-keybindings
mscgenjs.vscode-mscgen
rust-lang.rust
samuelcolvin.jinjahtml
sleistner.vscode-fileutils
tamasfe.even-better-toml
tsandall.opa
4

1 回答 1

1

您正在使用JediLSP语言服务器,不是吗?

您可以修改参数并使用 跳转到下一个参数Tab

您可以尝试切换到Pylance语言服务器吗?它仍然具有“愚蠢”的行为。您可以在 settings.json 文件中进行设置:

"python.languageServer": "Pylance",
于 2021-08-03T02:32:22.497 回答