language/astro: remove broken format option

This commit is contained in:
Ching Pei Yang 2025-08-23 15:17:12 +02:00
commit 1869f462ae
No known key found for this signature in database
GPG key ID: B3841364253DC4C8

View file

@ -8,7 +8,7 @@
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
inherit (lib.types) enum package;
inherit (lib.types) enum;
inherit (lib.nvim.attrsets) mapListToAttrs;
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
inherit (lib.generators) mkLuaInline;
@ -40,22 +40,6 @@
};
};
# TODO: specify packages
defaultFormat = "prettier";
formats = {
prettier = {
package = pkgs.prettier;
};
prettierd = {
package = pkgs.prettierd;
};
biome = {
package = pkgs.biome;
};
};
# TODO: specify packages
defaultDiagnosticsProvider = ["eslint_d"];
diagnosticsProviders = {
@ -95,22 +79,6 @@ in {
};
};
format = {
enable = mkEnableOption "Astro formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
type = enum (attrNames formats);
default = defaultFormat;
description = "Astro formatter to use";
};
package = mkOption {
type = package;
default = formats.${cfg.format.type}.package;
description = "Astro formatter package";
};
};
extraDiagnostics = {
enable = mkEnableOption "extra Astro diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
@ -137,16 +105,6 @@ in {
cfg.lsp.servers;
})
(mkIf cfg.format.enable {
vim.formatter.conform-nvim = {
enable = true;
setupOpts.formatters_by_ft.astro = [cfg.format.type];
setupOpts.formatters.${cfg.format.type} = {
command = getExe cfg.format.package;
};
};
})
(mkIf cfg.extraDiagnostics.enable {
vim.diagnostics.nvim-lint = {
enable = true;