VS Code C#扩展覆盖了主题设置的语法吗?

huangapple go评论104阅读模式
英文:

VS Code C# extension overrides syntax set by theme?

问题

I use VS Code. As far as I can tell my code syntax set by my theme is getting overridden by c# extension.

When I turn the extension off it looks normal but when I turn it on it gets overridden.

In the extension settings, there is a setting to c# semantic highlighting that I have turned off since it didn't help much.
In VS Code settings, the semantic highlighting is set to 'configureByTheme'.

Here's how I want it to look, and how it looks when the extension is disabled:

VS Code C#扩展覆盖了主题设置的语法吗?

using5 chars
language	csharp
standard token type	Other
foreground	#009C8F
background	#E1F4F4
contrast ratio	3.00
textmate scopes	keyword.other.using.cs
source.cs
foreground	keyword.other
{ "foreground": "#009C8F" }

How it looks when the extension is enabled and how I don't want it to look:

VS Code C#扩展覆盖了主题设置的语法吗?

using5 chars
language	csharp
standard token type	Other
foreground	#D0A00F
background	#E1F4F4
contrast ratio	2.12
semantic token type	keyword
foreground	keyword.control
keyword.package.go
keyword.operator.pointer.go
keyword.control
keyword.control.conditional
storage.modifier
keyword.operator.new
keyword.operator.expression
keyword.begin.blade
keyword.end.blade
keyword.blade
keyword.type-alias
keyword.type
support.class.console
keyword.other.await
storage.type.class.jsdoc
punctuation.definition.block.tag.jsdoc
keyword.other.new
keyword.other.phpdoc
keyword.other.use.php
keyword.operator.logical.python
keyword.other.import.static.groovy
keyword.other.import.groovy
punctuation.definition.attribute.swift
source.svelte meta.scope.tag.main.svelte meta.tag.start.svelte variable.function.svelte
meta.directive.on.svelte entity.name.type.svelte
keyword.other.special-method.elixir
keyword.edge
entity.name.function.edge
support.constant.edge
keyword.other.gdscript
keyword.other.onready.gdscript
source.graphql meta.fragment.graphql keyword.on.graphql
source.graphql meta.type.interface.graphql keyword.implements.graphql
source.graphql meta.type.interface.graphql meta.type.object.graphql meta.type.list.graphql keyword.operator.nulltype.graphql
source.graphql meta.variables.graphql keyword.operator.nulltype.graphql
source.graphql meta.type.interface.graphql meta.type.object.graphql keyword.operator.nulltype.graphql
keyword.operator.class.php
keyword.operator.spread.php
keyword.operator.type.php
keyword.operator.increment-decrement.php
keyword.operator.increment-increment.php
punctuation.support.type.property-name.begin.json
punctuation.support.type.property-name.end.json
keyword.operator.string.php
keyword.operator.ternary.php
keyword.operator.variadic.php
keyword.operator.nullable-type.php
keyword.other.use-as.php
keyword.import.go
keyword.operator.address.go
keyword.operator.null-coalescing
keyword.operator.arrow
keyword.struct.go
keyword.operator.liquid
keyword.operator.optional.ts
keyword.cmake
{ "foreground": "#d0a00f" }
textmate scopes	keyword.other.using.cs
source.cs
foreground	keyword.other
{ "foreground": "#009C8F" }

Here is the extension I have been mentioning: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp.

英文:

I use VS Code. As far as I can tell my code syntax set by my theme is getting overridden by c# extension.

When I turn the extension off it looks normal but when I turn it on it gets overridden.

In the extension settings, there is a setting to c# semantic highlighting that I have turned off since it didn't help much.
In VS Code settings, the semantic highlighting is set to 'configureByTheme'.

Here's how I want it to look, and how it looks when the extension is disabled:

VS Code C#扩展覆盖了主题设置的语法吗?

using5 chars
language	csharp
standard token type	Other
foreground	#009C8F
background	#E1F4F4
contrast ratio	3.00
textmate scopes	keyword.other.using.cs
source.cs
foreground	keyword.other
{ "foreground": "#009C8F" }

How it looks when the extension is enabled and how I don't want it to look:

VS Code C#扩展覆盖了主题设置的语法吗?

using5 chars
language	csharp
standard token type	Other
foreground	#D0A00F
background	#E1F4F4
contrast ratio	2.12
semantic token type	keyword
foreground	keyword.control
keyword.package.go
keyword.operator.pointer.go
keyword.control
keyword.control.conditional
storage.modifier
keyword.operator.new
keyword.operator.expression
keyword.begin.blade
keyword.end.blade
keyword.blade
keyword.type-alias
keyword.type
support.class.console
keyword.other.await
storage.type.class.jsdoc
punctuation.definition.block.tag.jsdoc
keyword.other.new
keyword.other.phpdoc
keyword.other.use.php
keyword.operator.logical.python
keyword.other.import.static.groovy
keyword.other.import.groovy
punctuation.definition.attribute.swift
source.svelte meta.scope.tag.main.svelte meta.tag.start.svelte variable.function.svelte
meta.directive.on.svelte entity.name.type.svelte
keyword.other.special-method.elixir
keyword.edge
entity.name.function.edge
support.constant.edge
keyword.other.gdscript
keyword.other.onready.gdscript
source.graphql meta.fragment.graphql keyword.on.graphql
source.graphql meta.type.interface.graphql keyword.implements.graphql
source.graphql meta.type.interface.graphql meta.type.object.graphql meta.type.list.graphql keyword.operator.nulltype.graphql
source.graphql meta.variables.graphql keyword.operator.nulltype.graphql
source.graphql meta.type.interface.graphql meta.type.object.graphql keyword.operator.nulltype.graphql
keyword.operator.class.php
keyword.operator.spread.php
keyword.operator.type.php
keyword.operator.increment-decrement.php
keyword.operator.increment-increment.php
punctuation.support.type.property-name.begin.json
punctuation.support.type.property-name.end.json
keyword.operator.string.php
keyword.operator.ternary.php
keyword.operator.variadic.php
keyword.operator.nullable-type.php
keyword.other.use-as.php
keyword.import.go
keyword.operator.address.go
keyword.operator.null-coalescing
keyword.operator.arrow
keyword.struct.go
keyword.operator.liquid
keyword.operator.optional.ts
keyword.cmake
{ "foreground": "#d0a00f" }
textmate scopes	keyword.other.using.cs
source.cs
foreground	keyword.other
{ "foreground": "#009C8F" }

Here is the extension I have been mentioning: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp.

答案1

得分: 1

你说你已经关闭了语义高亮,但接下来又说它被设置为“configuredByTheme”?请在你的settings.json文件中尝试以下内容:

"csharp.semanticHighlighting.enabled": false, // 我不确定这一行是否实际上是必要的
"editor.semanticHighlighting.enabled": false,
英文:

You say you turned semantic highlighting off, but then next say that it is set to "configuredByTheme"? Try the following in your settings.json file:

"csharp.semanticHighlighting.enabled": false, // I'm not sure if this line is actually necessary
"editor.semanticHighlighting.enabled": false,

huangapple
  • 本文由 发表于 2023年8月5日 00:40:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76837792.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定