简体   繁体   English

如何启用特定的 VScode 通知?

[英]How to enable specific VScode notification?

When I use Shift + Alt + F to format a python file, VScode gives me a notification at bottom-right corner:当我使用Shift + Alt + F格式化一个 python 文件时,VScode 在右下角给我一个通知:

Formatter autopep8 is not installed?未安装格式化程序 autopep8? Install?安装?

Yes | Yes | Use black | Use black | Use yapf | Use yapf | Do not disturb

I am not sure if the last choice is Do not disturb or some other things.我不确定最后的选择是Do not disturb还是其他一些东西。

However I clicked it by accident.但是我不小心点击了它。 Now this notification will not be shown no matter what I do.现在无论我做什么,都不会显示此通知。

How can I make it back?我怎样才能让它回来?

You could use code "pip show autopep8" to check whether autopep8 has been installed because you're not sure which option you clicked.您可以使用代码"pip show autopep8"来检查是否安装了 autopep8,因为您不确定单击了哪个选项。

1. You have chosen the first three options 1. 您已选择前三个选项

If you have installed the autopep8 and you are sure that you want to see this notification again, you can "pip uninstall autopep8" and repeat the previous formatting operation.如果你已经安装了 autopep8 并且你确定你想再次看到这个通知,你可以“pip uninstall autopep8”并重复之前的格式化操作。

Black and yapf do the same. black 和 yapf 也是这样做的。

2.You have chosen the last one 2.你选择了最后一个

After repeated tests and queries, when you select "do not disturb" (for which I uninstall autopep8), there is no new line in setting.json.经过反复测试查询,当你select“请勿打扰”(为此我卸载了autopep8),setting.json中并没有换行。 I queried various keywords in setting and didn't find the content related to this reminder.我在设置中查询了各种关键词,没有找到与此提醒相关的内容。 The setting of this report should exist in the database file of vscode.这个报告的设置应该存在于vscode的数据库文件中。 在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Change the "FORMATTER_NOT_INSTALLED_KEY":true into "false"."FORMATTER_NOT_INSTALLED_KEY":true更改为“false”。

So, the best way to solve this question is to download autopep8 by using "pip install autopep8"因此,解决此问题的最佳方法是使用“pip install autopep8”下载 autopep8

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM