记录
在这里使用Error Lens扩展遇到了一个问题,就是他会显示 Unknown word
语法的问题,这里看到这个显示是有点烦的,但这个扩展好用,又不想卸载,这里就去验证了一下,找到了两个解决办法,第一种一劳永逸,第二种使用可能会出现问题,这里看情况选择。
问题预览
第一种
出现这个问题的原因是,你的扩展项有安装 Code Spell Checker
这个扩展,禁用或者卸载即可。
第二种
这里去查询了settings.json
设置项,这里看了下,就把背景色和文字颜色删除了。
在
C:\Users\用户\.vscode\extensions
找到usernamehw.errorlens-<版本号>
,找到package.json
这个文件。使用CTRL+F按键,查找
errorLens.infoBackground
删除大括号内的配置。查找
errorLens.infoForeground
删除大括号内的配置。
Colors (26)
Can be specified in (workbench.colorCustomizations
section)settings.json
Color | Dark | Light | HC | Description |
---|---|---|---|---|
errorLens.errorBackground | #e454541b | #e4545420 | #e454541b | Background color of the entire line containing error. |
errorLens.errorMessageBackground | #e4545419 | #e4545419 | #e4545419 | Background color of the error message. |
errorLens.errorBackgroundLight | #e4545420 | #e4545420 | #e4545420 | Background color of the entire line containing error (Only in light themes). |
errorLens.errorForeground | #ff6464 | #e45454 | #ff6464 | Text color used to highlight lines containing errors. |
errorLens.errorForegroundLight | #e45454 | #e45454 | #e45454 | Text color used to highlight lines containing errors (Only in light themes). |
errorLens.warningBackground | #ff942f1b | #ff942f20 | #ff942f1b | Background color used to highlight lines containing warnings. |
errorLens.warningMessageBackground | #ff942f19 | #ff942f19 | #ff942f19 | Background color of the warning message. |
errorLens.warningBackgroundLight | #ff942f20 | #ff942f20 | #ff942f20 | Background color used to highlight lines containing warnings (Only in light themes). |
errorLens.warningForeground | #fa973a | #ff942f | #fa973a | Text color used to highlight lines containing warnings. |
errorLens.warningForegroundLight | #ff942f | #ff942f | #ff942f | Text color used to highlight lines containing warnings (Only in light themes). |
errorLens.infoBackground | #00b7e420 | #00b7e420 | #00b7e420 | Background color used to highlight lines containing info. |
errorLens.infoMessageBackground | #00b7e419 | #00b7e419 | #00b7e419 | Background color of the info message. |
errorLens.infoBackgroundLight | #00b7e420 | #00b7e420 | #00b7e420 | Background color used to highlight lines containing info (Only in light themes). |
errorLens.infoForeground | #00b7e4 | #00b7e4 | #00b7e4 | Text color used to highlight lines containing info. |
errorLens.infoForegroundLight | #00b7e4 | #00b7e4 | #00b7e4 | Text color used to highlight lines containing info (Only in light themes). |
errorLens.hintBackground | #17a2a220 | #17a2a220 | #17a2a220 | Background color used to highlight lines containing hints. |
errorLens.hintMessageBackground | #17a2a219 | #17a2a219 | #17a2a219 | Background color of the hint message. |
errorLens.hintBackgroundLight | #17a2a220 | #17a2a220 | #17a2a220 | Background color used to highlight lines containing hints (Only in light themes). |
errorLens.hintForeground | #2faf64 | #2faf64 | #2faf64 | Text color used to highlight lines containing hints. |
errorLens.hintForegroundLight | #2faf64 | #2faf64 | #2faf64 | Text color used to highlight lines containing hints (Only in light themes). |
errorLens.statusBarIconErrorForeground | #ff6464 | #e45454 | #ff6464 | Status bar icon item error color. Foreground is used when the setting is disabled.errorLens.statusBarIconsUseBackground |
errorLens.statusBarIconWarningForeground | #fa973a | #ff942f | #fa973a | Status bar icon item error color. Foreground is used when the setting is disabled.errorLens.statusBarIconsUseBackground |
errorLens.statusBarErrorForeground | #ff6464 | #e45454 | #ff6464 | Status bar item error color. |
errorLens.statusBarWarningForeground | #fa973a | #ff942f | #fa973a | Status bar item warning color. |
errorLens.statusBarInfoForeground | #00b7e4 | #00b7e4 | #00b7e4 | Status bar item info color. |
errorLens.statusBarHintForeground | #2faf64 | #2faf64 | #2faf64 | Status bar item hint color. |
扩展说明
这里配置使用是因为自己想用而已,这里可以根据你的情况自行调整,如果你认为这样显示也挺好的,可以不进行调整,根据自己的喜好来,这里只是提供一些参考。
评论
匿名评论隐私政策
✅ 你无需删除空行,直接评论以获取最佳展示效果