我正在使用 VSC 来创建 flutter 应用程序,我发现小部件注释的结尾太占主导地位(我使用了安静的灯光主题)。有什么办法可以把这条评论的颜色改成浅灰色?
I've been using prettier plugin for ESLint for a while and now I've got project with different .eslintrc.js. My config use to be like:
module.exports = {
...
extends: [
'airbnb',
'prettier',
'prettier/react',
],
...
plugins: [
'react',
'prettier',
],
rules: {
'prettier/prettier': [
'error',
{
'trailingComma': 'es5',
'singleQuote': true,
'printWidth': 120,
}
],
'react/jsx-filename-extension': [1, { 'extensions': ['.js', '.jsx'] }],
},
...
};
Run Code Online (Sandbox Code Playgroud)
I got rid of all of those rules & plugins & extensions, however, I still …
我正在使用 VS Code,我想知道是否有一种方法可以在类似于其他流行 IDE 的项目中快速创建新的类文件。目前我坚持手动创建新文件,命名它something.java,并用必要的代码填充它。我已经安装了常见的 Java 扩展包(调试器、dep.viewer、语言支持、maven)。
有什么线索吗?也许是第三方扩展?
提前致谢
丹尼尔
我想在我的项目中使用绝对路径以避免丑陋的路径,并在项目树中的文件所在的任何位置进行常量导入。
我已经在 tsconfig.json
"paths": {
"@myapp/*": ["*", "app/*"]
}
Run Code Online (Sandbox Code Playgroud)
我现在可以有工作导入,import { ... } from '@myapp/...'但从 Visual Studio Code 自动导入仍然是相对的。
我在想这settings.json(写在https://blog.angulartraining.com/path-mapping-with-typescript-cac16d12c416)
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
Run Code Online (Sandbox Code Playgroud)
但它没有帮助。如何使 Visual Studio Code 的自动导入使用路径映射。另外,有没有一种工具可以帮助我重构我的所有代码?
仅供参考,这是我第一次在 Linux 上使用 Visual Studio Code。但我确实有很多在 Windows 上使用 Visual Studio 201x 的背景。
我已经在我的 Linux 中安装了 dotnet sdk,并将 DOTNET_ROOT 和 PATH 设置为 $HOME/dotnet。当我在 bash 上运行 dotnet 命令时完全没问题。
如果我在 Visual Studio 中运行终端并输入 dotnet,它也能正常运行。
但是,当我尝试触发构建和调试时,它会启动任务 - 构建:
> Executing task: dotnet build /usr/local/myPath/dotnet-docs-samples/appengine/flexible/HelloWorld/HelloWorld.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <
The terminal shell path "dotnet" is a directory
Terminal will be reused by tasks, press any key to close it.
Run Code Online (Sandbox Code Playgroud)
从 Visual Studio Code 在终端中运行相同的命令也可以正常工作。只是不与构建任务(CTRL + SHIFT + B =>构建)
是什么原因?我该如何解决这个问题?
我有 10 个应用程序,我一直在开发。有时我需要单独打开它们以对它们运行 bash 命令。有没有办法为每个文件夹创建一个 Windows 快捷方式,然后我选择所有 10 个快捷方式并单击 Enter 以启动 10 个不同的 VSCode 应用程序,每个应用程序都打开了我设置的各自文件夹?
我正在尝试在 Ubuntu 上使用 vscode 开发 Linux 内核模块,但是 vscode 会抛出很多关于 Linux 系统头、内核宏等的错误(即使它只是一个几乎空的驱动程序......)
有人可以帮我配置 vscode 来消除这些错误吗?
下面是我的配置和错误截图。
//c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}",
"/usr/src/linux-headers-4.15.0-65/include"
],
"defines": [
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c99",
"cppStandard": "c++14",
"browse": {
"path": [
"${workspaceFolder}",
"/usr/src/linux-headers-4.15.0-65/include"
],
"limitSymbolsToIncludedHeaders": true
},
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
Run Code Online (Sandbox Code Playgroud)
//settings.json
{
"files.associations": {
"init.h": "c",
"module.h": "c",
"workqueue.h": "c",
"list.h": "c",
"types.h": "c",
"posix_types.h": "c"
},
"C_Cpp.errorSquiggles": "Enabled",
"clang.cflags": [
"-std=c99",
"-I/usr/src/linux-headers-4.15.0-65/include",
"-DMODULE",
]
}
Run Code Online (Sandbox Code Playgroud)

升级到 macOS Catalina 后,Flutter 不再记录任何内容。我正在使用带有 Flutter 扩展的 VS Code。我是通过 Visual Studio Code 扩展还是使用flutter run.
既不print也不debugPrint也不developer.log产生任何输出。
以防万一,在我的小部件顶部的构建方法中:
developer.log('log me', name: 'my.app.category');
print("log me");
debugPrint("log me");
Run Code Online (Sandbox Code Playgroud)
什么都不做。在 VS Code 中设置断点也被完全忽略。我想这与升级到 Catalina 有关,但我不知道如何修复它。
我是使用 Visual Studio 代码的用户。几天前,我遇到了一些问题。这是关于“空白终端”。我不确定是什么触发了这个问题。我想这与 vs 代码更新的 1.39 版本有关。我附上了下面的图片。
在此处输入图像描述 我已尝试搜索解决方案以解决此问题。但我失败了。1.删除1.39版本。并重新安装vscode。(删除 vscode 文件) - sudo apt remove vscode,sudo apt autoremove - 我搜索了 .vscode 然后删除了所有(留下了一些设置文件。) 2. 我试图通过 snap 安装 vscode,但结果是一样的。3. 我从 root 开始 - sudo 代码 --user-data-dir => 可以看到终端,但环境不起作用 => 失败 4. 我试过降级。- 版本 38,37 => 失败(结果相同) - 版本 32 => 成功(但它是旧版本,限制了几个实用程序)
**Ubuntu 18.04.3 LTS , 64 位 任何有同样问题并正在解决的人,请告诉一些方法。我期待着得到答复。谢谢。
我很清楚如何从 Visual Studio Code 中执行 Python 代码的线程
但是他们都没有展示如何让 >>> python shell 与导入的文件一起运行。因为我想单独调用函数。我知道我可以通过python在终端中简单地输入来获得 python shell,但是 python 文件中的函数每次都必须手动导入。
有没有办法像在 IDLE 中一样在 VSCode 中运行文件?
flutter ×2
.net-core ×1
angular ×1
dart ×1
debian ×1
eslint ×1
java ×1
javascript ×1
linux ×1
prettier ×1
python ×1
python-idle ×1
themes ×1
typescript ×1
ubuntu-18.04 ×1