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:
@@ -37,3 +37,4 @@ in
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
# https://github.com/imputnet/helium-linux/releases/download/0.11.7.1/helium-0.11.7.1-x86_64.AppImage
|
# https://github.com/imputnet/helium-linux/releases/download/0.11.7.1/helium-0.11.7.1-x86_64.AppImage
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ _: {
|
|||||||
"dockerfile"
|
"dockerfile"
|
||||||
"git-firefly"
|
"git-firefly"
|
||||||
"vue"
|
"vue"
|
||||||
"astro"
|
# "astro"
|
||||||
"docker-compose"
|
"docker-compose"
|
||||||
"nix"
|
"nix"
|
||||||
"csv"
|
"csv"
|
||||||
|
|||||||
@@ -9,5 +9,7 @@
|
|||||||
python314
|
python314
|
||||||
ruff
|
ruff
|
||||||
deputy
|
deputy
|
||||||
|
tailwindcss-language-server
|
||||||
|
typescript-language-server
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ _: {
|
|||||||
tab_size = 2;
|
tab_size = 2;
|
||||||
};
|
};
|
||||||
TypeScript = {
|
TypeScript = {
|
||||||
|
language_servers = ["typescript-language-server" "!vtsls"];
|
||||||
|
colorize_brackets = true;
|
||||||
formatter.language_server.name = "biome";
|
formatter.language_server.name = "biome";
|
||||||
code_actions_on_format = {
|
code_actions_on_format = {
|
||||||
"source.fixAll.biome" = true;
|
"source.fixAll.biome" = true;
|
||||||
@@ -33,6 +35,7 @@ _: {
|
|||||||
tab_size = 2;
|
tab_size = 2;
|
||||||
};
|
};
|
||||||
Astro = {
|
Astro = {
|
||||||
|
language_servers = ["typescript-language-server" "!vtsls"];
|
||||||
formatter.language_server.name = "biome";
|
formatter.language_server.name = "biome";
|
||||||
code_actions_on_format = {
|
code_actions_on_format = {
|
||||||
"source.fixAll.biome" = true;
|
"source.fixAll.biome" = true;
|
||||||
@@ -41,6 +44,8 @@ _: {
|
|||||||
tab_size = 2;
|
tab_size = 2;
|
||||||
};
|
};
|
||||||
"Vue.js" = {
|
"Vue.js" = {
|
||||||
|
language_servers = ["vue-language-server" "!vetur" "typescript-language-server" "!vtsls"];
|
||||||
|
colorize_brackets = true;
|
||||||
formatter.language_server.name = "biome";
|
formatter.language_server.name = "biome";
|
||||||
code_actions_on_format = {
|
code_actions_on_format = {
|
||||||
"source.fixAll.biome" = true;
|
"source.fixAll.biome" = true;
|
||||||
@@ -65,6 +70,10 @@ _: {
|
|||||||
tab_size = 2;
|
tab_size = 2;
|
||||||
};
|
};
|
||||||
CSS = {
|
CSS = {
|
||||||
|
language_servers = [
|
||||||
|
"tailwindcss-intellisense-css"
|
||||||
|
"!vscode-css-language-server"
|
||||||
|
];
|
||||||
formatter.language_server.name = "biome";
|
formatter.language_server.name = "biome";
|
||||||
code_actions_on_format = {
|
code_actions_on_format = {
|
||||||
"source.fixAll.biome" = true;
|
"source.fixAll.biome" = true;
|
||||||
|
|||||||
@@ -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 = {
|
deputy = {
|
||||||
binary = {
|
binary = {
|
||||||
path = lib.getExe pkgs.deputy;
|
path = lib.getExe pkgs.deputy;
|
||||||
|
|||||||
Reference in New Issue
Block a user