config/users/pbsds/home/profiles/micro.nix

44 lines
1.5 KiB
Nix

{ pkgs, ... }:
{
# TODO: upstream this
imports = [ ./modules/micro.nix ];
disabledModules = [ "programs/micro.nix" ];
home.shellAliases.ed = "$EDITOR"; # ed is the standard editor
home.shellAliases.de = "$EDITOR";
home.sessionVariables.EDITOR = "micro";
home.packages = with pkgs; [ micro ];
programs.micro.enable = true;
programs.micro.trueColor = true;
programs.micro.settings.colorscheme = "railscast";
programs.micro.settings.rmtrailingws = true;
programs.micro.settings.tabstospaces = true;
#xdg.configFile."micro/bindings.json".source = (pkgs.formats.json {}).generate "micro-bindings" {
programs.micro.bindings = {
"Alt-/" = "lua:comment.comment";
"Alt-d" = "SpawnMultiCursor";
"Alt-j" = "lua:joinLines.joinLines";
"Alt-l" = "command:lower";
"Alt-u" = "command:upper";
"AltLeft" = "PreviousTab";
"AltRight" = "NextTab";
"Ctrl-j" = "EndOfLine,CursorRight,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,OutdentLine,Backspace";
"CtrlDown" = "None";
"CtrlUnderscore" = "lua:comment.comment";
"CtrlUp" = "None";
"Escape" = "RemoveAllMultiCursors";
"Shift-PageDown" = "SelectPageDown";
"Shift-PageUp" = "SelectPageUp";
};
programs.micro.ensurePlugins = [
"aspell"
"detectindent"
"editorconfig"
"joinLines"
"manipulator"
"quoter"
];
}