mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
language/astro: remove broken format option
This commit is contained in:
parent
2e7079e429
commit
1869f462ae
1 changed files with 1 additions and 43 deletions
|
@ -8,7 +8,7 @@
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.types) enum package;
|
inherit (lib.types) enum;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
|
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
|
||||||
inherit (lib.generators) mkLuaInline;
|
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
|
# TODO: specify packages
|
||||||
defaultDiagnosticsProvider = ["eslint_d"];
|
defaultDiagnosticsProvider = ["eslint_d"];
|
||||||
diagnosticsProviders = {
|
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 = {
|
extraDiagnostics = {
|
||||||
enable = mkEnableOption "extra Astro diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
|
enable = mkEnableOption "extra Astro diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
|
||||||
|
|
||||||
|
@ -137,16 +105,6 @@ in {
|
||||||
cfg.lsp.servers;
|
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 {
|
(mkIf cfg.extraDiagnostics.enable {
|
||||||
vim.diagnostics.nvim-lint = {
|
vim.diagnostics.nvim-lint = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue