[英]“Unknown Configuration Setting” VSCode greyed Out
I have trouble configurating my settings.json in VSCode.我无法在 VSCode 中配置我的 settings.json。 At first, I had my code opened as a workspace and it underlined general Python imports such as from django.db import models
or from django.core import serializers
or import nltk
.起初,我将我的代码作为工作区打开,它强调了一般的 Python 导入,例如from django.db import models
或from django.core import serializers
程序或import nltk
。 The warning I got was "unresolved import".我得到的警告是“未解决的导入”。 This happened for all basic Python / Django imports.这发生在所有基本的 Python / Django 进口。
I realized that I didn't have an interpreter in my.venv folder, so then followed this answer .我意识到我在 my.venv 文件夹中没有解释器,所以然后按照这个答案。 I re-opened my code in Ubuntu with . code
我在 Ubuntu 中用. code
. code
and now all personalized settings I have are greyed out: . code
,现在我所有的个性化设置都是灰色的:
settings.json: picture of greyed out settings settings.json:灰色设置图片
On hover, the warning I get is Unknown Configuration Setting No quick fixes available
在 hover 上,我收到的警告是Unknown Configuration Setting No quick fixes available
How do I activate these settings again?如何再次激活这些设置?
Ok, I've found the reason: the right Python extensions hadn't been installed.好的,我找到了原因:没有安装正确的 Python 扩展。
There is an option to install the Python extension in Ubuntu WSL which is what I am working on.有一个选项可以在 Ubuntu WSL 中安装 Python 扩展,这是我正在做的。 After installing this, the settings were known.安装后,设置是已知的。 :) :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.