Compare commits
No commits in common. "59db46498709e2c7e7cc36fc6a3d734b00eecb7b" and "dfc8d68495eb73cddd3ec791a173756fa0cb3369" have entirely different histories.
59db464987
...
dfc8d68495
|
@ -14,10 +14,9 @@
|
||||||
else
|
else
|
||||||
(
|
(
|
||||||
cd "${r.path}"
|
cd "${r.path}"
|
||||||
${pkgs.git}/bin/git --no-optional-locks diff --quiet || echo "Repository is dirty!"
|
${pkgs.git}/bin/git diff --quiet || echo "Repository is dirty!"
|
||||||
${pkgs.git}/bin/git pull || true
|
${pkgs.git}/bin/git pull || true
|
||||||
# Only push if there's something to push. Also prevents from trying to push on repos where we don't have rights.
|
${pkgs.git}/bin/git push || true
|
||||||
(${pkgs.git}/bin/git --no-optional-locks status --porcelain -b --ignore-submodules | grep ' \[ahead [0-9]\+\]' && ${pkgs.git}/bin/git push) || true
|
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
programs = {
|
programs.nixvim = {
|
||||||
# https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
|
|
||||||
alacritty.settings.key_bindings = [
|
|
||||||
{ key = "H"; mods = "Control|Shift"; chars = "\\x1b[72;5u"; }
|
|
||||||
{ key = "L"; mods = "Control|Shift"; chars = "\\x1b[76;5u"; }
|
|
||||||
] ++ (map
|
|
||||||
(n: { key = "Key${builtins.toString n}"; mods = "Control"; chars = "\\x1b[${builtins.toString (48+n)};5u"; })
|
|
||||||
(lib.lists.range 0 9));
|
|
||||||
# Ctrl+<number> doesn't get interpreted, but Ctrl+Shift+<number> does, so let's use that
|
|
||||||
nixvim = {
|
|
||||||
autoCmd = [
|
autoCmd = [
|
||||||
# Turn off relativenumber only for insert mode
|
# Turn off relativenumber only for insert mode
|
||||||
{ event = "InsertEnter"; pattern = "*"; command = "set norelativenumber"; }
|
{ event = "InsertEnter"; pattern = "*"; command = "set norelativenumber"; }
|
||||||
|
@ -19,21 +10,27 @@
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
nvim-scrollview # Scroll bar
|
nvim-scrollview # Scroll bar
|
||||||
];
|
];
|
||||||
keymaps =
|
keymaps = [
|
||||||
let
|
|
||||||
options = { silent = true; };
|
|
||||||
in
|
|
||||||
[
|
|
||||||
# barbar
|
# barbar
|
||||||
{ key = "gb"; action = "<Cmd>BufferPick<CR>"; inherit options; }
|
{ key = "<C-H>"; action = "<Cmd>BufferPrevious<CR>"; options = { silent = true; }; }
|
||||||
{ key = "<C-H>"; action = "<Cmd>BufferPrevious<CR>"; inherit options; }
|
{ key = "<C-L>"; action = "<Cmd>BufferNext<CR>"; options = { silent = true; }; }
|
||||||
{ key = "<C-L>"; action = "<Cmd>BufferNext<CR>"; inherit options; }
|
# TODO https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
|
||||||
{ key = "<C-S-H>"; action = "<Cmd>BufferMovePrevious<CR>"; inherit options; }
|
{ key = "<Space><C-H>"; action = "<Cmd>BufferMovePrevious<CR>"; options = { silent = true; }; }
|
||||||
{ key = "<C-S-L>"; action = "<Cmd>BufferMoveNext<CR>"; inherit options; }
|
{ key = "<Space><C-L>"; action = "<Cmd>BufferMoveNext<CR>"; options = { silent = true; }; }
|
||||||
{ key = "<C-0>"; action = "<Cmd>BufferLast<CR>"; inherit options; }
|
# TODO gotos don't work
|
||||||
] ++ (map
|
{ key = "<C-1>"; action = "<Cmd>BufferGoto 1<CR>"; options = { silent = true; }; }
|
||||||
(n: { key = "<C-${builtins.toString n}>"; action = "<Cmd>BufferGoto ${builtins.toString n}<CR>"; inherit options; })
|
{ key = "<C-2>"; action = "<Cmd>BufferGoto 2<CR>"; options = { silent = true; }; }
|
||||||
(lib.lists.range 1 9));
|
{ key = "<C-3>"; action = "<Cmd>BufferGoto 3<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-4>"; action = "<Cmd>BufferGoto 4<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-5>"; action = "<Cmd>BufferGoto 5<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-6>"; action = "<Cmd>BufferGoto 6<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-7>"; action = "<Cmd>BufferGoto 7<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-8>"; action = "<Cmd>BufferGoto 8<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-9>"; action = "<Cmd>BufferGoto 9<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "<C-0>"; action = "<Cmd>BufferLast<CR>"; options = { silent = true; }; }
|
||||||
|
{ key = "gb"; action = "<Cmd>BufferPick<CR>"; options = { silent = true; }; }
|
||||||
|
# TODO Other useful options?
|
||||||
|
];
|
||||||
options = {
|
options = {
|
||||||
showmode = false;
|
showmode = false;
|
||||||
number = true;
|
number = true;
|
||||||
|
@ -43,6 +40,7 @@
|
||||||
plugins = {
|
plugins = {
|
||||||
# Tabline
|
# Tabline
|
||||||
barbar.enable = true;
|
barbar.enable = true;
|
||||||
|
# TODO Investigate bufferline?
|
||||||
# Status line
|
# Status line
|
||||||
lualine = with config.lib.stylix.colors.withHashtag; let
|
lualine = with config.lib.stylix.colors.withHashtag; let
|
||||||
normal = { fg = base05; bg = base01; };
|
normal = { fg = base05; bg = base01; };
|
||||||
|
@ -155,5 +153,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue