mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-02 09:05:55 +00:00
Merge 78066496b2 into 0390abd673
This commit is contained in:
commit
091269687b
3 changed files with 45 additions and 1 deletions
|
|
@ -13,6 +13,7 @@
|
|||
inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption deprecatedSingleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.languages) setLanguageIndent;
|
||||
inherit (lib.trivial) warn;
|
||||
|
||||
cfg = config.vim.languages.markdown;
|
||||
|
|
@ -205,5 +206,11 @@ in {
|
|||
cfg.extraDiagnostics.types);
|
||||
};
|
||||
})
|
||||
|
||||
(setLanguageIndent {
|
||||
language = "markdown";
|
||||
indentSize = 6;
|
||||
})
|
||||
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,16 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (builtins) attrNames toString;
|
||||
inherit (lib) concatStringsSep;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.types) int;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics deprecatedSingleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.languages) setLanguageIndent;
|
||||
|
||||
cfg = config.vim.languages.nix;
|
||||
|
||||
|
|
@ -106,6 +108,12 @@ in {
|
|||
inherit defaultDiagnosticsProvider;
|
||||
};
|
||||
};
|
||||
|
||||
indentSize = mkOption {
|
||||
description = "Sets the indent size in spaces for .nix files";
|
||||
type = int;
|
||||
default = 10;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
|
|
@ -160,5 +168,11 @@ in {
|
|||
cfg.extraDiagnostics.types);
|
||||
};
|
||||
})
|
||||
|
||||
(setLanguageIndent {
|
||||
language = "nix";
|
||||
indentSize = cfg.indentSize;
|
||||
})
|
||||
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue