Svelte

Svelte 支持通过 Svelte 扩展提供。

额外的主题样式配置

您可以修改指令和修饰符等特定样式在属性中的显示方式

"syntax": {
  // Styling for directives (e.g., `class:foo` or `on:click`) (the `on` or `class` part of the attribute).
  "attribute.function": {
    "color": "#ff0000"
  },
  // Styling for modifiers at the end of attributes, e.g. `on:<click|preventDefault|stopPropagation>`
  "attribute.special": {
    "color": "#00ff00"
  }
}

内嵌提示

Zed 为内嵌提示设置以下初始化选项

"inlayHints": {
  "parameterNames": {
    "enabled": "all",
    "suppressWhenArgumentMatchesName": false
  },
  "parameterTypes": {
    "enabled": true
  },
  "variableTypes": {
    "enabled": true,
    "suppressWhenTypeMatchesName": false
  },
  "propertyDeclarationTypes": {
    "enabled": true
  },
  "functionLikeReturnTypes": {
    "enabled": true
  },
  "enumMemberValues": {
    "enabled": true
  }
}

以便在 Zed 在设置中启用内嵌提示时,语言服务器能够发回内嵌提示。

使用

"lsp": {
  "svelte-language-server": {
    "initialization_options": {
      "configuration": {
        "typescript": {
          ......
        },
        "javascript": {
          ......
        }
      }
    }
  }
}

覆盖这些设置。

有关更多信息,请参阅 https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/package.json。