Skip to content

Commit 1869f46

Browse files
committed
language/astro: remove broken format option
1 parent 2e7079e commit 1869f46

File tree

1 file changed

+1
-43
lines changed

1 file changed

+1
-43
lines changed

modules/plugins/languages/astro.nix

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
inherit (lib.options) mkEnableOption mkOption;
99
inherit (lib.modules) mkIf mkMerge;
1010
inherit (lib.meta) getExe;
11-
inherit (lib.types) enum package;
11+
inherit (lib.types) enum;
1212
inherit (lib.nvim.attrsets) mapListToAttrs;
1313
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
1414
inherit (lib.generators) mkLuaInline;
@@ -40,22 +40,6 @@
4040
};
4141
};
4242

43-
# TODO: specify packages
44-
defaultFormat = "prettier";
45-
formats = {
46-
prettier = {
47-
package = pkgs.prettier;
48-
};
49-
50-
prettierd = {
51-
package = pkgs.prettierd;
52-
};
53-
54-
biome = {
55-
package = pkgs.biome;
56-
};
57-
};
58-
5943
# TODO: specify packages
6044
defaultDiagnosticsProvider = ["eslint_d"];
6145
diagnosticsProviders = {
@@ -95,22 +79,6 @@ in {
9579
};
9680
};
9781

98-
format = {
99-
enable = mkEnableOption "Astro formatting" // {default = config.vim.languages.enableFormat;};
100-
101-
type = mkOption {
102-
type = enum (attrNames formats);
103-
default = defaultFormat;
104-
description = "Astro formatter to use";
105-
};
106-
107-
package = mkOption {
108-
type = package;
109-
default = formats.${cfg.format.type}.package;
110-
description = "Astro formatter package";
111-
};
112-
};
113-
11482
extraDiagnostics = {
11583
enable = mkEnableOption "extra Astro diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
11684

@@ -137,16 +105,6 @@ in {
137105
cfg.lsp.servers;
138106
})
139107

140-
(mkIf cfg.format.enable {
141-
vim.formatter.conform-nvim = {
142-
enable = true;
143-
setupOpts.formatters_by_ft.astro = [cfg.format.type];
144-
setupOpts.formatters.${cfg.format.type} = {
145-
command = getExe cfg.format.package;
146-
};
147-
};
148-
})
149-
150108
(mkIf cfg.extraDiagnostics.enable {
151109
vim.diagnostics.nvim-lint = {
152110
enable = true;

0 commit comments

Comments
 (0)