Configure TS, Vue, Astro and CSS language servers

- Comment out the Astro extension in Zed
- Add tailwindcss-language-server and typescript-language-server
  packages
- Configure language servers for TypeScript, Astro, Vue, and CSS
- Enable Vue‑specific LSP options and TypeScript inlay hints
- Provide TailwindCSS class extraction regex patterns for the LSP
This commit is contained in:
2026-08-18 19:56:50 +02:00
parent c60f65dfe0
commit f8cdbdf88a
5 changed files with 69 additions and 1 deletions
@@ -25,6 +25,8 @@ _: {
tab_size = 2;
};
TypeScript = {
language_servers = ["typescript-language-server" "!vtsls"];
colorize_brackets = true;
formatter.language_server.name = "biome";
code_actions_on_format = {
"source.fixAll.biome" = true;
@@ -33,6 +35,7 @@ _: {
tab_size = 2;
};
Astro = {
language_servers = ["typescript-language-server" "!vtsls"];
formatter.language_server.name = "biome";
code_actions_on_format = {
"source.fixAll.biome" = true;
@@ -41,6 +44,8 @@ _: {
tab_size = 2;
};
"Vue.js" = {
language_servers = ["vue-language-server" "!vetur" "typescript-language-server" "!vtsls"];
colorize_brackets = true;
formatter.language_server.name = "biome";
code_actions_on_format = {
"source.fixAll.biome" = true;
@@ -65,6 +70,10 @@ _: {
tab_size = 2;
};
CSS = {
language_servers = [
"tailwindcss-intellisense-css"
"!vscode-css-language-server"
];
formatter.language_server.name = "biome";
code_actions_on_format = {
"source.fixAll.biome" = true;
+56
View File
@@ -15,6 +15,62 @@
# ];
# };
# };
vue-language-server = {
initialization_options = {
vue.hybridMode = true;
typescript.tsdk = "./node_modules/typescript/lib";
};
settings = {
"vue.inlayHints.inlineHandlerLeading" = true;
"vue.inlayHints.missingProps" = true;
"vue.inlayHints.optionsWrapper" = true;
"vue.inlayHints.vBindShorthand" = true;
"vue.inlayHints.destructuredProps" = true;
"vue.format.template.initialIndent" = true;
"vue.format.script.initialIndent" = true;
"vue.format.style.initialIndent" = true;
"vue.editor.focusMode" = true;
"vue.editor.reactivityVisualization" = true;
"vue.editor.templateInterpolationDecorators" = true;
"vue.hover.rich" = true;
"vue.autoInsert.bracketSpacing" = true;
};
};
typescript-language-server.initialization_options.preferences = {
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayVariableTypeHints = true;
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
tailwindcss-language-server = {
settings = {
includeLanguages.vue = "html";
classFunctions = ["cva" "cx" "cn"];
};
experimental.classRegex = [
"class=\"([^\"]*)\""
"class='([^']*)'"
":class=\"([^\"]*)\""
":class='([^']*)'"
"\\.className\\s*[+]?=\\s*['\"]([^'\"]*)['\"]"
"\\.setAttributeNS\\(.*,\\s*['\"]class['\"],\\s*['\"]([^'\"]*)['\"]"
"\\.setAttribute\\(['\"]class['\"],\\s*['\"]([^'\"]*)['\"]"
"\\.classList\\.add\\(['\"]([^'\"]*)['\"]"
"\\.classList\\.remove\\(['\"]([^'\"]*)['\"]"
"\\.classList\\.toggle\\(['\"]([^'\"]*)['\"]"
"\\.classList\\.contains\\(['\"]([^'\"]*)['\"]"
"\\.classList\\.replace\\(\\s*['\"]([^'\"]*)['\"]"
"\\.classList\\.replace\\([^,)]+,\\s*['\"]([^'\"]*)['\"]"
"[cls|cn|className]\\s\\:\\=\\s\"([^\"]*)"
];
};
deputy = {
binary = {
path = lib.getExe pkgs.deputy;