mirror of
https://github.com/nix-community/home-manager
synced 2024-06-01 04:23:34 +02:00
Merge 64b3ffa49c
into 6d3b6dc922
This commit is contained in:
commit
6c105e394e
|
@ -31,6 +31,26 @@ in {
|
||||||
for supported values.
|
for supported values.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
keybinds = mkOption {
|
||||||
|
type = jsonFormat.type;
|
||||||
|
default = {
|
||||||
|
"Alt-/" = "lua:comment.comment";
|
||||||
|
"CtrlUnderscore" = "lua:comment.comment";
|
||||||
|
};
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
"Ctrl-y" = "Undo";
|
||||||
|
"Ctrl-z" = "Redo";
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration written to
|
||||||
|
{file}`$XDG_CONFIG_HOME/micro/bindings.json`. See
|
||||||
|
<https://github.com/zyedidia/micro/blob/master/runtime/help/keybindings.md>
|
||||||
|
for supported values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,5 +59,8 @@ in {
|
||||||
|
|
||||||
xdg.configFile."micro/settings.json".source =
|
xdg.configFile."micro/settings.json".source =
|
||||||
jsonFormat.generate "micro-settings" cfg.settings;
|
jsonFormat.generate "micro-settings" cfg.settings;
|
||||||
|
|
||||||
|
xdg.configFile."micro/bindings.json".source =
|
||||||
|
jsonFormat.generate "micro-keybinds" cfg.keybinds;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
autosu = false;
|
autosu = false;
|
||||||
cursorline = false;
|
cursorline = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
keybinds = {
|
||||||
|
"Ctrl-y" = "Undo";
|
||||||
|
"Ctrl-z" = "Redo";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.micro = { };
|
test.stubs.micro = { };
|
||||||
|
@ -20,5 +25,13 @@
|
||||||
"cursorline": false
|
"cursorline": false
|
||||||
}
|
}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
assertFileContent home-files/.config/micro/bindings.json \
|
||||||
|
${builtins.toFile "micro-expected-keybinds.json" ''
|
||||||
|
{
|
||||||
|
"Ctrl-y": "Undo",
|
||||||
|
"Ctrl-z": "Redo"
|
||||||
|
}
|
||||||
|
''}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user