mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-30 23:55:15 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -4,11 +4,12 @@
|
|||
config,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
autoGroups = mkOption {
|
||||
type = types.attrsOf helpers.autocmd.autoGroupOption;
|
||||
default = {};
|
||||
default = { };
|
||||
description = "augroup definitions";
|
||||
example = ''
|
||||
autoGroups = {
|
||||
|
@ -21,7 +22,7 @@ with lib; {
|
|||
|
||||
autoCmd = mkOption {
|
||||
type = types.listOf helpers.autocmd.autoCmdOption;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = "autocmd definitions";
|
||||
example = ''
|
||||
autoCmd = [
|
||||
|
@ -35,18 +36,16 @@ with lib; {
|
|||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
inherit (config) autoGroups autoCmd;
|
||||
in
|
||||
mkIf (autoGroups != {} || autoCmd != {}) {
|
||||
config =
|
||||
let
|
||||
inherit (config) autoGroups autoCmd;
|
||||
in
|
||||
mkIf (autoGroups != { } || autoCmd != { }) {
|
||||
# Introduced early October 2023.
|
||||
# TODO remove in early December 2023.
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
all
|
||||
(x: x.description == null)
|
||||
autoCmd;
|
||||
assertion = all (x: x.description == null) autoCmd;
|
||||
message = ''
|
||||
RENAMED OPTION: `autoCmd[].description` has been renamed `autoCmd[].desc`.
|
||||
Please update your configuration.
|
||||
|
@ -55,7 +54,7 @@ with lib; {
|
|||
];
|
||||
|
||||
extraConfigLuaPost =
|
||||
(optionalString (autoGroups != {}) ''
|
||||
(optionalString (autoGroups != { }) ''
|
||||
-- Set up autogroups {{
|
||||
do
|
||||
local __nixvim_autogroups = ${helpers.toLuaObject autoGroups}
|
||||
|
@ -66,7 +65,7 @@ with lib; {
|
|||
end
|
||||
-- }}
|
||||
'')
|
||||
+ (optionalString (autoCmd != []) ''
|
||||
+ (optionalString (autoCmd != [ ]) ''
|
||||
-- Set up autocommands {{
|
||||
do
|
||||
local __nixvim_autocommands = ${helpers.toLuaObject autoCmd}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue