mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-02 03:01:54 +00:00
language/css: migrate to conform/nvim-lint
This commit is contained in:
parent
e996999c0b
commit
459e97dab7
1 changed files with 8 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.types) enum either listOf package str;
|
||||
|
@ -42,14 +43,6 @@
|
|||
formats = {
|
||||
prettier = {
|
||||
package = pkgs.nodePackages.prettier;
|
||||
nullConfig = ''
|
||||
table.insert(
|
||||
ls_sources,
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
command = "${cfg.format.package}/bin/prettier",
|
||||
})
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
prettierd = {
|
||||
|
@ -132,8 +125,13 @@ in {
|
|||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.lsp.null-ls.enable = true;
|
||||
vim.lsp.null-ls.sources.css-format = formats.${cfg.format.type}.nullConfig;
|
||||
vim.formatter.conform-nvim = {
|
||||
enable = true;
|
||||
setupOpts.formatters_by_ft.css = [cfg.format.type];
|
||||
setupOpts.formatters.${cfg.format.type} = {
|
||||
command = getExe cfg.format.package;
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue