fix: errors in nixvim config

This commit is contained in:
Patrick Großmann 2023-11-28 12:37:58 +01:00
parent 44c3bd7594
commit c9bd4c00a0
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
7 changed files with 40 additions and 11 deletions

View file

@ -26,6 +26,22 @@
enable = true; enable = true;
pkcs11.enable = true; pkcs11.enable = true;
}; };
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
config = {
common.default = [
"gtk"
];
sway.default = [
"wlr"
];
};
};
# Just before switching, remove the agenix directory if it exists. # Just before switching, remove the agenix directory if it exists.
# This can happen when a secret is used in the initrd because it will # This can happen when a secret is used in the initrd because it will
# then be copied to the initramfs under the same path. This materializes # then be copied to the initramfs under the same path. This materializes

View file

@ -12,7 +12,6 @@ lib.optionalAttrs (!minimal) {
with pkgs; [ with pkgs; [
# vampir überlebende braucht diese pkgs # vampir überlebende braucht diese pkgs
libgdiplus libgdiplus
xdg-desktop-portal
cups cups
]; ];
}; };

View file

@ -6,11 +6,6 @@
}: }:
lib.optionalAttrs (!minimal) { lib.optionalAttrs (!minimal) {
services.dbus.enable = true; services.dbus.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-wlr];
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xdg-utils xdg-utils
wdisplays wdisplays

View file

@ -29,6 +29,8 @@
''; '';
}; };
home.sessionVariables.EDITOR = "nvim"; home.sessionVariables.EDITOR = "nvim";
home.sessionVariables.vim = "nvim";
home.sessionVariables.vi = "nvim";
home.shellAliases.vimdiff = "nvim -d"; home.shellAliases.vimdiff = "nvim -d";
home.persistence."/state".directories = [ home.persistence."/state".directories = [
".local/share/nvim" ".local/share/nvim"

View file

@ -9,42 +9,50 @@ in {
key = "<M-down>"; key = "<M-down>";
action = "<C-w><down>"; action = "<C-w><down>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-up>"; key = "<M-up>";
action = "<C-w><up>"; action = "<C-w><up>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-left>"; key = "<M-left>";
action = "<C-w><left>"; action = "<C-w><left>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-right>"; key = "<M-right>";
action = "<C-w><right>"; action = "<C-w><right>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-r>"; key = "<M-r>";
action = "<C-w><down>"; action = "<C-w><down>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-l>"; key = "<M-l>";
action = "<C-w><up>"; action = "<C-w><up>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-n>"; key = "<M-n>";
action = "<C-w><left>"; action = "<C-w><left>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<M-s>"; key = "<M-s>";
action = "<C-w><right>"; action = "<C-w><right>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
# scroll with cursor lock # scroll with cursor lock
@ -52,21 +60,23 @@ in {
key = "<S-down>"; key = "<S-down>";
action = "<C-e>"; action = "<C-e>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<S-up>"; key = "<S-up>";
action = "<C-y>"; action = "<C-y>";
inherit options; inherit options;
mode = ["n" "v" "s"];
} }
{ {
key = "<S-down>"; key = "<S-down>";
action = "<C-[><C-e>a"; action = "<C-esc><C-e>a";
inherit options; inherit options;
mode = "i"; mode = "i";
} }
{ {
key = "<S-up>"; key = "<S-up>";
action = "<C-[><C-y>a"; action = "<C-esc><C-y>a";
inherit options; inherit options;
mode = "i"; mode = "i";
} }
@ -74,6 +84,13 @@ in {
key = "<leader>u"; key = "<leader>u";
action = "<cmd>UndotreeToggle<cr>"; action = "<cmd>UndotreeToggle<cr>";
inherit options; inherit options;
mode = ["n" "v" "s"];
}
{
key = "<leader>t";
action = "<cmd>Neotree toggle<cr>";
inherit options;
mode = ["n" "v" "s"];
} }
]; ];
} }

View file

@ -4,7 +4,6 @@
undolevels = 1000000; undolevels = 1000000;
# Persistent Undo # Persistent Undo
undofile = true; undofile = true;
undodir = "~/.cache/nvim/undo";
# swap file save interval # swap file save interval
updatetime = 300; updatetime = 300;

View file

@ -35,8 +35,9 @@
# Fzf picker for arbitrary stuff # Fzf picker for arbitrary stuff
telescope = { telescope = {
enable = true; enable = true;
enabledExtensions = ["fzf" "notify" "ui-select"]; extensions = {
extensions.fzf-native.enable = true; fzf-native.enable = true;
};
}; };
# Undo tree # Undo tree