如何禁用或移动Spyder中的悬停文档提示?
禁用Spyder 4.0.1悬停文档框/调整位置的解决方法
一、补充设置步骤
你之前取消勾选Tools > Preferences > Completion and linting > Introspection里的「Enable hover tips」后仍生效,可再检查以下设置:
- 打开
Tools > Preferences > Editor > Display,取消勾选「Show documentation on hover」(部分Spyder 4版本该选项在此处) - 完成设置后完全关闭Spyder(包括后台进程),重新启动后查看效果
二、修改配置文件强制禁用
如果上述设置无效,可直接修改Spyder的配置文件:
- 找到Spyder的配置文件路径:
- Windows:
C:\Users\[你的用户名]\.spyder-py3\spyder.ini - macOS:
~/Library/Application Support/spyder-py3/spyder.ini - Linux:
~/.config/spyder-py3/spyder.ini
- Windows:
- 用文本编辑器打开
spyder.ini,找到[introspection]区块,添加或修改:enable_hover_tips = False - 再找到
[editor]区块,添加或修改:hover_doc_enabled = False - 保存文件后,重启Spyder即可
三、调整悬停框位置(替代方案)
如果不想完全禁用,仅调整位置避免遮挡输入区:
- 打开
Tools > Preferences > Completion and linting > Introspection,若你的版本有「Hover tips position」选项,直接选择「Bottom」「Left」等不遮挡输入的位置 - 若版本无可视化设置选项,可在
spyder.ini的[introspection]区块添加:
可选值:hover_position = bottomtop/bottom/left/right
内容的提问来源于stack exchange,提问作者Niels Petter Liset
相关产品推荐
相关产品推荐

