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

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

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#扩展覆盖了主题设置的语法吗?

  1. using5 chars
  2. language csharp
  3. standard token type Other
  4. foreground #009C8F
  5. background #E1F4F4
  6. contrast ratio 3.00
  7. textmate scopes keyword.other.using.cs
  8. source.cs
  9. foreground keyword.other
  10. { "foreground": "#009C8F" }

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

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

  1. using5 chars
  2. language csharp
  3. standard token type Other
  4. foreground #D0A00F
  5. background #E1F4F4
  6. contrast ratio 2.12
  7. semantic token type keyword
  8. foreground keyword.control
  9. keyword.package.go
  10. keyword.operator.pointer.go
  11. keyword.control
  12. keyword.control.conditional
  13. storage.modifier
  14. keyword.operator.new
  15. keyword.operator.expression
  16. keyword.begin.blade
  17. keyword.end.blade
  18. keyword.blade
  19. keyword.type-alias
  20. keyword.type
  21. support.class.console
  22. keyword.other.await
  23. storage.type.class.jsdoc
  24. punctuation.definition.block.tag.jsdoc
  25. keyword.other.new
  26. keyword.other.phpdoc
  27. keyword.other.use.php
  28. keyword.operator.logical.python
  29. keyword.other.import.static.groovy
  30. keyword.other.import.groovy
  31. punctuation.definition.attribute.swift
  32. source.svelte meta.scope.tag.main.svelte meta.tag.start.svelte variable.function.svelte
  33. meta.directive.on.svelte entity.name.type.svelte
  34. keyword.other.special-method.elixir
  35. keyword.edge
  36. entity.name.function.edge
  37. support.constant.edge
  38. keyword.other.gdscript
  39. keyword.other.onready.gdscript
  40. source.graphql meta.fragment.graphql keyword.on.graphql
  41. source.graphql meta.type.interface.graphql keyword.implements.graphql
  42. source.graphql meta.type.interface.graphql meta.type.object.graphql meta.type.list.graphql keyword.operator.nulltype.graphql
  43. source.graphql meta.variables.graphql keyword.operator.nulltype.graphql
  44. source.graphql meta.type.interface.graphql meta.type.object.graphql keyword.operator.nulltype.graphql
  45. keyword.operator.class.php
  46. keyword.operator.spread.php
  47. keyword.operator.type.php
  48. keyword.operator.increment-decrement.php
  49. keyword.operator.increment-increment.php
  50. punctuation.support.type.property-name.begin.json
  51. punctuation.support.type.property-name.end.json
  52. keyword.operator.string.php
  53. keyword.operator.ternary.php
  54. keyword.operator.variadic.php
  55. keyword.operator.nullable-type.php
  56. keyword.other.use-as.php
  57. keyword.import.go
  58. keyword.operator.address.go
  59. keyword.operator.null-coalescing
  60. keyword.operator.arrow
  61. keyword.struct.go
  62. keyword.operator.liquid
  63. keyword.operator.optional.ts
  64. keyword.cmake
  65. { "foreground": "#d0a00f" }
  66. textmate scopes keyword.other.using.cs
  67. source.cs
  68. foreground keyword.other
  69. { "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#扩展覆盖了主题设置的语法吗?

  1. using5 chars
  2. language csharp
  3. standard token type Other
  4. foreground #009C8F
  5. background #E1F4F4
  6. contrast ratio 3.00
  7. textmate scopes keyword.other.using.cs
  8. source.cs
  9. foreground keyword.other
  10. { "foreground": "#009C8F" }

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

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

  1. using5 chars
  2. language csharp
  3. standard token type Other
  4. foreground #D0A00F
  5. background #E1F4F4
  6. contrast ratio 2.12
  7. semantic token type keyword
  8. foreground keyword.control
  9. keyword.package.go
  10. keyword.operator.pointer.go
  11. keyword.control
  12. keyword.control.conditional
  13. storage.modifier
  14. keyword.operator.new
  15. keyword.operator.expression
  16. keyword.begin.blade
  17. keyword.end.blade
  18. keyword.blade
  19. keyword.type-alias
  20. keyword.type
  21. support.class.console
  22. keyword.other.await
  23. storage.type.class.jsdoc
  24. punctuation.definition.block.tag.jsdoc
  25. keyword.other.new
  26. keyword.other.phpdoc
  27. keyword.other.use.php
  28. keyword.operator.logical.python
  29. keyword.other.import.static.groovy
  30. keyword.other.import.groovy
  31. punctuation.definition.attribute.swift
  32. source.svelte meta.scope.tag.main.svelte meta.tag.start.svelte variable.function.svelte
  33. meta.directive.on.svelte entity.name.type.svelte
  34. keyword.other.special-method.elixir
  35. keyword.edge
  36. entity.name.function.edge
  37. support.constant.edge
  38. keyword.other.gdscript
  39. keyword.other.onready.gdscript
  40. source.graphql meta.fragment.graphql keyword.on.graphql
  41. source.graphql meta.type.interface.graphql keyword.implements.graphql
  42. source.graphql meta.type.interface.graphql meta.type.object.graphql meta.type.list.graphql keyword.operator.nulltype.graphql
  43. source.graphql meta.variables.graphql keyword.operator.nulltype.graphql
  44. source.graphql meta.type.interface.graphql meta.type.object.graphql keyword.operator.nulltype.graphql
  45. keyword.operator.class.php
  46. keyword.operator.spread.php
  47. keyword.operator.type.php
  48. keyword.operator.increment-decrement.php
  49. keyword.operator.increment-increment.php
  50. punctuation.support.type.property-name.begin.json
  51. punctuation.support.type.property-name.end.json
  52. keyword.operator.string.php
  53. keyword.operator.ternary.php
  54. keyword.operator.variadic.php
  55. keyword.operator.nullable-type.php
  56. keyword.other.use-as.php
  57. keyword.import.go
  58. keyword.operator.address.go
  59. keyword.operator.null-coalescing
  60. keyword.operator.arrow
  61. keyword.struct.go
  62. keyword.operator.liquid
  63. keyword.operator.optional.ts
  64. keyword.cmake
  65. { "foreground": "#d0a00f" }
  66. textmate scopes keyword.other.using.cs
  67. source.cs
  68. foreground keyword.other
  69. { "foreground": "#009C8F" }

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

答案1

得分: 1

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

  1. "csharp.semanticHighlighting.enabled": false, // 我不确定这一行是否实际上是必要的
  2. "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:

  1. "csharp.semanticHighlighting.enabled": false, // I'm not sure if this line is actually necessary
  2. "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:

确定