feat: add nvf config
This commit is contained in:
parent
9e46058abb
commit
898d56ebd6
24 changed files with 3367 additions and 95 deletions
2306
flake.lock
generated
2306
flake.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -36,12 +36,18 @@
|
||||||
url = "github:KZDKM/Hyprspace";
|
url = "github:KZDKM/Hyprspace";
|
||||||
inputs.hyprland.follows = "hyprland";
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nvf = {
|
||||||
|
url = "github:notashelf/nvf";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nix-index-database,
|
nix-index-database,
|
||||||
|
nvf,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
|
|
@ -61,6 +67,7 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
dn-pre7780 = nixpkgs.lib.nixosSystem {
|
dn-pre7780 = nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
|
nvf.nixosModules.default
|
||||||
nix-index-database.nixosModules.nix-index
|
nix-index-database.nixosModules.nix-index
|
||||||
./system/dev/dn-pre7780
|
./system/dev/dn-pre7780
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{ nix-version, username, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./user ];
|
nix-version,
|
||||||
home.username = username;
|
username,
|
||||||
home.homeDirectory = "/home/${username}";
|
...
|
||||||
|
}: {
|
||||||
home.stateVersion = nix-version;
|
imports = [./user];
|
||||||
|
home = {
|
||||||
|
inherit username;
|
||||||
|
homeDirectory = "/home/${username}";
|
||||||
|
stateVersion = nix-version;
|
||||||
|
};
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{ ... }:
|
|
||||||
let
|
let
|
||||||
configDir = ../config;
|
configDir = ../config;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/wallpapers".source = "${configDir}/wallpapers";
|
".config/wallpapers".source = "${configDir}/wallpapers";
|
||||||
".config/kitty".source = "${configDir}/kitty";
|
".config/kitty".source = "${configDir}/kitty";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./git.nix
|
./git.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
|
|
@ -11,15 +10,15 @@
|
||||||
./virtualization.nix
|
./virtualization.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
./neovim.nix
|
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
|
./neovim.nix
|
||||||
inputs.hyprland.homeManagerModules.default
|
inputs.hyprland.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowUnfreePredicate = (_: true);
|
allowUnfreePredicate = _: true;
|
||||||
|
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
"electron-25.9.0" # Obsidian
|
"electron-25.9.0" # Obsidian
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
{ pkgs, xcursor-size, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
xcursor-size,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cursorName = "catppuccin-macchiato-lavender-cursors";
|
cursorName = "catppuccin-macchiato-lavender-cursors";
|
||||||
themeName = "catppuccin-macchiato-lavender-compact";
|
themeName = "catppuccin-macchiato-lavender-compact";
|
||||||
cursorSize = pkgs.lib.strings.toInt xcursor-size;
|
cursorSize = pkgs.lib.strings.toInt xcursor-size;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -17,7 +19,7 @@ in
|
||||||
theme = {
|
theme = {
|
||||||
name = themeName;
|
name = themeName;
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.catppuccin-gtk.override {
|
||||||
accents = [ "lavender" ];
|
accents = ["lavender"];
|
||||||
size = "compact";
|
size = "compact";
|
||||||
variant = "macchiato";
|
variant = "macchiato";
|
||||||
};
|
};
|
||||||
|
|
@ -59,9 +61,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig".source =
|
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.kvconfig";
|
||||||
"${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.kvconfig";
|
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.svg".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.svg";
|
||||||
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.svg".source =
|
|
||||||
"${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.svg";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
# Steam
|
# Steam
|
||||||
"workspace: 5 silent, class: ^(steam)$"
|
"workspace: 5 silent, class: ^(steam)$"
|
||||||
|
"workspace: unset, class: ^(steam)$, floating: 1"
|
||||||
|
|
||||||
# Line
|
# Line
|
||||||
"workspace: 2, initialTitle: ^(LINE)$"
|
"workspace: 2, initialTitle: ^(LINE)$"
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@
|
||||||
xcursor-size,
|
xcursor-size,
|
||||||
nvidia-offload-enabled,
|
nvidia-offload-enabled,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
terminal = "ghostty";
|
terminal = "ghostty";
|
||||||
startScript = import ./hypr/exec.nix {
|
startScript = import ./hypr/exec.nix {
|
||||||
inherit
|
inherit
|
||||||
|
|
@ -32,8 +30,7 @@ let
|
||||||
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
||||||
echo "$song_info"
|
echo "$song_info"
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
hyprpaper
|
hyprpaper
|
||||||
hyprcursor
|
hyprcursor
|
||||||
|
|
@ -55,14 +52,14 @@ in
|
||||||
hyprexpo
|
hyprexpo
|
||||||
hyprwinwrap
|
hyprwinwrap
|
||||||
])
|
])
|
||||||
++ ([
|
++ [
|
||||||
inputs.hyprgrass.packages.${system}.default
|
inputs.hyprgrass.packages.${system}.default
|
||||||
]);
|
];
|
||||||
|
|
||||||
settings =
|
settings =
|
||||||
{
|
{
|
||||||
bind = import ./hypr/bind.nix { inherit mainMod nvidia-offload-enabled; };
|
bind = import ./hypr/bind.nix {inherit mainMod nvidia-offload-enabled;};
|
||||||
bindm = import ./hypr/bindm.nix { inherit mainMod; };
|
bindm = import ./hypr/bindm.nix {inherit mainMod;};
|
||||||
monitor = import ./hypr/monitor.nix;
|
monitor = import ./hypr/monitor.nix;
|
||||||
plugin = plugins;
|
plugin = plugins;
|
||||||
exec-once = ''${startScript}'';
|
exec-once = ''${startScript}'';
|
||||||
|
|
@ -83,8 +80,8 @@ in
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
preload = [ "~/.config/wallpapers/wall.png" ];
|
preload = ["~/.config/wallpapers/wall.png"];
|
||||||
wallpaper = [ ", ~/.config/wallpapers/wall.png" ];
|
wallpaper = [", ~/.config/wallpapers/wall.png"];
|
||||||
splash = false;
|
splash = false;
|
||||||
ipc = "on";
|
ipc = "on";
|
||||||
};
|
};
|
||||||
|
|
@ -105,7 +102,7 @@ in
|
||||||
# CURRENT SONG
|
# CURRENT SONG
|
||||||
label {
|
label {
|
||||||
monitor =
|
monitor =
|
||||||
text = cmd[update:1000] echo "$(${getCurrentSong}/bin/getSong)"
|
text = cmd[update:1000] echo "$(${getCurrentSong}/bin/getSong)"
|
||||||
color = rgba(235, 219, 178, .75)
|
color = rgba(235, 219, 178, .75)
|
||||||
font_size = 16
|
font_size = 16
|
||||||
font_family = $font, $font2
|
font_family = $font, $font2
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{ pkgs, lib, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
vesktop = pkgs.vesktop.overrideAttrs (oldAttrs: {
|
vesktop = pkgs.vesktop.overrideAttrs (oldAttrs: {
|
||||||
desktopItems = lib.optional pkgs.stdenv.hostPlatform.isLinux (
|
desktopItems = lib.optional pkgs.stdenv.hostPlatform.isLinux (
|
||||||
(lib.head oldAttrs.desktopItems).override {
|
(lib.head oldAttrs.desktopItems).override {
|
||||||
|
|
@ -8,40 +11,41 @@ let
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
in
|
in {
|
||||||
{
|
home.packages =
|
||||||
home.packages = (with pkgs; [
|
(with pkgs; [
|
||||||
# Dev stuff
|
# Dev stuff
|
||||||
gcc
|
gcc
|
||||||
go
|
go
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
||||||
(python3.withPackages
|
(python3.withPackages
|
||||||
(python-pkgs: [ python-pkgs.pip python-pkgs.requests ]))
|
(python-pkgs: [python-pkgs.pip python-pkgs.requests]))
|
||||||
rustup
|
rustup
|
||||||
pkgsCross.mingwW64.stdenv.cc
|
pkgsCross.mingwW64.stdenv.cc
|
||||||
pkgsCross.mingwW64.windows.pthreads
|
pkgsCross.mingwW64.windows.pthreads
|
||||||
postman
|
postman
|
||||||
cz-cli
|
cz-cli
|
||||||
|
|
||||||
# Work stuff
|
# Work stuff
|
||||||
libreoffice-qt
|
libreoffice-qt
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
blueberry
|
blueberry
|
||||||
|
|
||||||
# Gaming
|
# Gaming
|
||||||
steam-run
|
steam-run
|
||||||
|
|
||||||
# Downloads
|
# Downloads
|
||||||
qbittorrent
|
qbittorrent
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
viewnior
|
viewnior
|
||||||
catppuccin-cursors.macchiatoLavender
|
catppuccin-cursors.macchiatoLavender
|
||||||
catppuccin-gtk
|
catppuccin-gtk
|
||||||
cava
|
cava
|
||||||
papirus-folders
|
papirus-folders
|
||||||
]) ++ ([
|
])
|
||||||
vesktop # discord
|
++ [
|
||||||
]);
|
vesktop # discord
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@
|
||||||
y = "yazi";
|
y = "yazi";
|
||||||
g = "git";
|
g = "git";
|
||||||
t = "tmux";
|
t = "tmux";
|
||||||
vim = "nvim";
|
|
||||||
vi = "nvim";
|
|
||||||
v = "nvim";
|
|
||||||
|
|
||||||
# Nixos
|
# Nixos
|
||||||
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos";
|
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
# config from https://github.com/shub39/dotfiles
|
# config from https://github.com/shub39/dotfiles
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.swaync = {
|
services.swaync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -181,7 +179,7 @@
|
||||||
.widget-mpris-player {
|
.widget-mpris-player {
|
||||||
padding: 5px 5px;
|
padding: 5px 5px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ in
|
||||||
../../modules
|
../../modules
|
||||||
../../modules/wireguard.nix
|
../../modules/wireguard.nix
|
||||||
../../modules/dn-ca.nix
|
../../modules/dn-ca.nix
|
||||||
|
../../modules/gaming.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Overrides
|
# Overrides
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@
|
||||||
username,
|
username,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
hyprcursor-size = "32";
|
hyprcursor-size = "32";
|
||||||
xcursor-size = "24";
|
xcursor-size = "24";
|
||||||
nvidia-mode = "offload";
|
nvidia-mode = "offload";
|
||||||
|
|
@ -17,8 +15,7 @@ let
|
||||||
intel-bus-id = "PCI:0:2:0";
|
intel-bus-id = "PCI:0:2:0";
|
||||||
nvidia-bus-id = "PCI:1:0:0";
|
nvidia-bus-id = "PCI:1:0:0";
|
||||||
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -61,7 +58,9 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
users."${username}" = {
|
users."${username}" = {
|
||||||
imports = [ ../../../home ];
|
imports = [
|
||||||
|
../../../home
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./plymouth.nix # Boot splash
|
./plymouth.nix # Boot splash
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
substituters = [ "https://nix-gaming.cachix.org" ];
|
substituters = [ "https://nix-gaming.cachix.org" ];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
|
|
@ -26,7 +32,8 @@
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
|
pkg:
|
||||||
builtins.elem (lib.getName pkg) [
|
builtins.elem (lib.getName pkg) [
|
||||||
"steam"
|
"steam"
|
||||||
"steam-original"
|
"steam-original"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
|
|
@ -50,12 +52,11 @@
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
substituters = [ "https://hyprland.cachix.org" ];
|
substituters = ["https://hyprland.cachix.org"];
|
||||||
|
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
system/modules/nvf/binds/default.nix
Normal file
6
system/modules/nvf/binds/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
let
|
||||||
|
general = import ./general.nix;
|
||||||
|
telescope = import ./telescope.nix;
|
||||||
|
neoTree = import ./neo-tree.nix;
|
||||||
|
in
|
||||||
|
general ++ telescope ++ neoTree
|
||||||
508
system/modules/nvf/binds/general.nix
Normal file
508
system/modules/nvf/binds/general.nix
Normal file
|
|
@ -0,0 +1,508 @@
|
||||||
|
let
|
||||||
|
directions = ["h" "j" "k" "l"];
|
||||||
|
generateMappings = direction: {
|
||||||
|
key = "<C-${direction}>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<C-w>${direction}";
|
||||||
|
};
|
||||||
|
naviMappings = map generateMappings directions;
|
||||||
|
resizeStep = "2";
|
||||||
|
resizeMappings = [
|
||||||
|
{
|
||||||
|
key = "<C-Left>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>vertical resize -${resizeStep}<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-Right>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>vertical resize +${resizeStep}<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-Up>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>resize +${resizeStep}<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-Down>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>resize -${resizeStep}<CR>";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
moveLineMappings = [
|
||||||
|
{
|
||||||
|
key = "<A-j>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>m .+1<CR>==";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<A-k>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>m .-2<CR>==";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
saveMappings = [
|
||||||
|
# Save File
|
||||||
|
{
|
||||||
|
key = "<C-s>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>w<CR><ESC>";
|
||||||
|
noremap = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-s>";
|
||||||
|
mode = ["i"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>w<CR><ESC>";
|
||||||
|
noremap = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-s>";
|
||||||
|
mode = ["x"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>w<CR><ESC>";
|
||||||
|
noremap = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-s>";
|
||||||
|
mode = ["s"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>w<CR><ESC>";
|
||||||
|
noremap = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
generalMappings = [
|
||||||
|
{
|
||||||
|
key = "<S-h>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bprevious<CR>";
|
||||||
|
} # Prev Buffer
|
||||||
|
{
|
||||||
|
key = "<S-l>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bnext<CR>";
|
||||||
|
} # Next Buffer
|
||||||
|
{
|
||||||
|
key = "[b";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bprevious<CR>";
|
||||||
|
} # Prev Buffer
|
||||||
|
{
|
||||||
|
key = "]b";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bnext<CR>";
|
||||||
|
} # Next Buffer
|
||||||
|
{
|
||||||
|
key = "<leader>bb";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>buffer #<CR>";
|
||||||
|
} # Switch to Other Buffer
|
||||||
|
{
|
||||||
|
key = "<leader>`";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>buffer #<CR>";
|
||||||
|
} # Switch to Other Buffer
|
||||||
|
{
|
||||||
|
key = "<leader>bd";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bd<CR>";
|
||||||
|
} # Delete Buffer
|
||||||
|
{
|
||||||
|
key = "<leader>bo";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bufdo bd<CR>";
|
||||||
|
} # Delete Other Buffers
|
||||||
|
{
|
||||||
|
key = "<leader>bD";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>bd | :q<CR>";
|
||||||
|
} # Delete Buffer and Window
|
||||||
|
{
|
||||||
|
key = "<esc>";
|
||||||
|
mode = ["i" "n" "s"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>noh<CR>";
|
||||||
|
} # Escape and Clear hlsearch
|
||||||
|
{
|
||||||
|
key = "<leader>ur";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>";
|
||||||
|
desc = "Redraw / Clear hlsearch / Diff Update";
|
||||||
|
} # Redraw / Clear hlsearch / Diff Update
|
||||||
|
{
|
||||||
|
key = "n";
|
||||||
|
mode = ["n" "x" "o"];
|
||||||
|
silent = true;
|
||||||
|
action = "n";
|
||||||
|
} # Next Search Result
|
||||||
|
{
|
||||||
|
key = "N";
|
||||||
|
mode = ["n" "x" "o"];
|
||||||
|
silent = true;
|
||||||
|
action = "N";
|
||||||
|
} # Prev Search Result
|
||||||
|
{
|
||||||
|
key = "<C-s>";
|
||||||
|
mode = ["i" "x" "n" "s"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>w<CR>";
|
||||||
|
} # Save File
|
||||||
|
{
|
||||||
|
key = "<leader>K";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>norm! K<cr>";
|
||||||
|
} # Keywordprg
|
||||||
|
{
|
||||||
|
key = "gco";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>";
|
||||||
|
} # Add Comment Below
|
||||||
|
{
|
||||||
|
key = "gcO";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>";
|
||||||
|
} # Add Comment Above
|
||||||
|
{
|
||||||
|
key = "<leader>fn";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>enew<CR>";
|
||||||
|
} # New File
|
||||||
|
{
|
||||||
|
key = "<leader>xl";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lopen<CR>";
|
||||||
|
} # Location List
|
||||||
|
{
|
||||||
|
key = "<leader>xq";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>copen<CR>";
|
||||||
|
} # Quickfix List
|
||||||
|
{
|
||||||
|
key = "[q";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
lua = true;
|
||||||
|
action = "vim.cmd.cprev";
|
||||||
|
} # Previous Quickfix
|
||||||
|
{
|
||||||
|
key = "]q";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
lua = true;
|
||||||
|
action = "vim.cmd.cnext";
|
||||||
|
} # Next Quickfix
|
||||||
|
{
|
||||||
|
key = "<leader>cf";
|
||||||
|
mode = ["n" "v"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>normal! gq<CR>";
|
||||||
|
} # Format
|
||||||
|
{
|
||||||
|
key = "<leader>cd";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>LspDiagnostics<CR>";
|
||||||
|
} # Line Diagnostics
|
||||||
|
{
|
||||||
|
key = "]d";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lnext<CR>";
|
||||||
|
} # Next Diagnostic
|
||||||
|
{
|
||||||
|
key = "[d";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lprevious<CR>";
|
||||||
|
} # Prev Diagnostic
|
||||||
|
{
|
||||||
|
key = "]e";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lnext<CR>";
|
||||||
|
} # Next Error
|
||||||
|
{
|
||||||
|
key = "[e";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lprevious<CR>";
|
||||||
|
} # Prev Error
|
||||||
|
{
|
||||||
|
key = "]w";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lnext<CR>";
|
||||||
|
} # Next Warning
|
||||||
|
{
|
||||||
|
key = "[w";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>lprevious<CR>";
|
||||||
|
} # Prev Warning
|
||||||
|
{
|
||||||
|
key = "<leader>uf";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleAutoFormat<CR>";
|
||||||
|
} # Toggle Auto Format (Global)
|
||||||
|
{
|
||||||
|
key = "<leader>uF";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleAutoFormatBuffer<CR>";
|
||||||
|
} # Toggle Auto Format (Buffer)
|
||||||
|
{
|
||||||
|
key = "<leader>us";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>setlocal spell!<CR>";
|
||||||
|
} # Toggle Spelling
|
||||||
|
{
|
||||||
|
key = "<leader>uw";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>set wrap!<CR>";
|
||||||
|
} # Toggle Wrap
|
||||||
|
{
|
||||||
|
key = "<leader>uL";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>set relativenumber!<CR>";
|
||||||
|
} # Toggle Relative Number
|
||||||
|
{
|
||||||
|
key = "<leader>ud";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>LspDiagnosticsToggle<CR>";
|
||||||
|
} # Toggle Diagnostics
|
||||||
|
{
|
||||||
|
key = "<leader>ul";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>set number!<CR>";
|
||||||
|
} # Toggle Line Numbers
|
||||||
|
{
|
||||||
|
key = "<leader>uc";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>set conceallevel=3<CR>";
|
||||||
|
} # Toggle Conceal Level
|
||||||
|
{
|
||||||
|
key = "<leader>uA";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>set showtabline=2<CR>";
|
||||||
|
} # Toggle Tabline
|
||||||
|
{
|
||||||
|
key = "<leader>uT";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>TSToggleHighlight<CR>";
|
||||||
|
} # Toggle Treesitter Highlight
|
||||||
|
{
|
||||||
|
key = "<leader>ub";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>set background=dark<CR>";
|
||||||
|
} # Toggle Dark Background
|
||||||
|
{
|
||||||
|
key = "<leader>uD";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleDimming<CR>";
|
||||||
|
} # Toggle Dimming
|
||||||
|
{
|
||||||
|
key = "<leader>ua";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleAnimations<CR>";
|
||||||
|
} # Toggle Animations
|
||||||
|
{
|
||||||
|
key = "<leader>ug";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>IndentGuidesToggle<CR>";
|
||||||
|
} # Toggle Indent Guides
|
||||||
|
{
|
||||||
|
key = "<leader>uS";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>SmoothScrollToggle<CR>";
|
||||||
|
} # Toggle Smooth Scroll
|
||||||
|
{
|
||||||
|
key = "<leader>dpp";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleProfiler<CR>";
|
||||||
|
} # Toggle Profiler
|
||||||
|
{
|
||||||
|
key = "<leader>dph";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleProfilerHighlights<CR>";
|
||||||
|
} # Toggle Profiler Highlights
|
||||||
|
{
|
||||||
|
key = "<leader>uh";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ToggleInlayHints<CR>";
|
||||||
|
} # Toggle Inlay Hints
|
||||||
|
{
|
||||||
|
key = "<leader>gb";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>GitBlame<CR>";
|
||||||
|
} # Git Blame Line
|
||||||
|
{
|
||||||
|
key = "<leader>gB";
|
||||||
|
mode = ["n" "x"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>GitBrowseOpen<CR>";
|
||||||
|
} # Git Browse (open)
|
||||||
|
{
|
||||||
|
key = "<leader>gY";
|
||||||
|
mode = ["n" "x"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>GitBrowseCopy<CR>";
|
||||||
|
} # Git Browse (copy)
|
||||||
|
{
|
||||||
|
key = "<leader>qq";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>qa!<CR>";
|
||||||
|
} # Quit All
|
||||||
|
{
|
||||||
|
key = "<leader>ui";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>InspectPos<CR>";
|
||||||
|
} # Inspect Pos
|
||||||
|
{
|
||||||
|
key = "<leader>uI";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>InspectTree<CR>";
|
||||||
|
} # Inspect Tree
|
||||||
|
{
|
||||||
|
key = "<leader>L";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>LazyVimChangelog<CR>";
|
||||||
|
} # LazyVim Changelog
|
||||||
|
{
|
||||||
|
key = "<c-_>";
|
||||||
|
mode = ["n" "t"];
|
||||||
|
silent = true;
|
||||||
|
action = "<nop>";
|
||||||
|
} # which_key_ignore
|
||||||
|
{
|
||||||
|
key = "<leader>w";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>windows<CR>";
|
||||||
|
} # Windows
|
||||||
|
{
|
||||||
|
key = "<leader>-";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>split<CR>";
|
||||||
|
} # Split Window Below
|
||||||
|
{
|
||||||
|
key = "<leader>|";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>vsplit<CR>";
|
||||||
|
} # Split Window Right
|
||||||
|
{
|
||||||
|
key = "<leader>wd";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>close<CR>";
|
||||||
|
} # Delete Window
|
||||||
|
{
|
||||||
|
key = "<leader>wm";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ZoomModeToggle<CR>";
|
||||||
|
} # Toggle Zoom Mode
|
||||||
|
{
|
||||||
|
key = "<leader>uZ";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ZoomModeToggle<CR>";
|
||||||
|
} # Toggle Zoom Mode
|
||||||
|
{
|
||||||
|
key = "<leader>uz";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>ZenModeToggle<CR>";
|
||||||
|
} # Toggle Zen Mode
|
||||||
|
{
|
||||||
|
key = "<leader><tab>l";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabprevious<CR>";
|
||||||
|
} # Last Tab
|
||||||
|
{
|
||||||
|
key = "<leader><tab>o";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabnew<CR>";
|
||||||
|
} # Close Other Tabs
|
||||||
|
{
|
||||||
|
key = "<leader><tab>f";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabfirst<CR>";
|
||||||
|
} # First Tab
|
||||||
|
{
|
||||||
|
key = "<leader><tab><tab>";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabnew<CR>";
|
||||||
|
} # New Tab
|
||||||
|
{
|
||||||
|
key = "<leader><tab>]";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabnext<CR>";
|
||||||
|
} # Next Tab
|
||||||
|
{
|
||||||
|
key = "<leader><tab>d";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabclose<CR>";
|
||||||
|
} # Close Tab
|
||||||
|
{
|
||||||
|
key = "<leader><tab>[";
|
||||||
|
mode = ["n"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>tabprevious<CR>";
|
||||||
|
} # Previous Tab
|
||||||
|
];
|
||||||
|
in
|
||||||
|
naviMappings ++ resizeMappings ++ moveLineMappings ++ saveMappings ++ generalMappings
|
||||||
9
system/modules/nvf/binds/neo-tree.nix
Normal file
9
system/modules/nvf/binds/neo-tree.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
key = "<leader>e";
|
||||||
|
mode = ["n" "t"];
|
||||||
|
silent = true;
|
||||||
|
action = "<CMD>Neotree toggle<CR>";
|
||||||
|
desc = "Toggle NeoTree";
|
||||||
|
}
|
||||||
|
]
|
||||||
121
system/modules/nvf/binds/snacks.nix
Normal file
121
system/modules/nvf/binds/snacks.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
key = "<leader>z";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Toggle Zen Mode";
|
||||||
|
action = "function() Snacks.zen() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>Z";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Toggle Zoom";
|
||||||
|
action = "function() Snacks.zen.zoom() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>.";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Toggle Scratch Buffer";
|
||||||
|
action = "function() Snacks.scratch() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>S";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Select Scratch Buffer";
|
||||||
|
action = "function() Snacks.scratch.select() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>n";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Notification History";
|
||||||
|
action = "function() Snacks.notifier.show_history() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>bd";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Delete Buffer";
|
||||||
|
action = "function() Snacks.bufdelete() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>cR";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Rename File";
|
||||||
|
action = "function() Snacks.rename.rename_file() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gB";
|
||||||
|
mode = ["n" "v"];
|
||||||
|
desc = "Git Browse";
|
||||||
|
action = "function() Snacks.gitbrowse() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gb";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Git Blame Line";
|
||||||
|
action = "function() Snacks.git.blame_line() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gf";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Lazygit Current File History";
|
||||||
|
action = "function() Snacks.lazygit.log_file() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gg";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Lazygit";
|
||||||
|
action = "function() Snacks.lazygit() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gl";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Lazygit Log (cwd)";
|
||||||
|
action = "function() Snacks.lazygit.log() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>un";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Dismiss All Notifications";
|
||||||
|
action = "function() Snacks.notifier.hide() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<c-/>";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "Toggle Terminal";
|
||||||
|
action = "function() Snacks.terminal() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<c-_>";
|
||||||
|
mode = ["n"];
|
||||||
|
desc = "which_key_ignore";
|
||||||
|
action = "function() Snacks.terminal() end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "]]";
|
||||||
|
mode = ["n" "t"];
|
||||||
|
desc = "Next Reference";
|
||||||
|
action = "function() Snacks.words.jump(vim.v.count1) end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "[[";
|
||||||
|
mode = ["n" "t"];
|
||||||
|
desc = "Prev Reference";
|
||||||
|
action = "function() Snacks.words.jump(-vim.v.count1) end";
|
||||||
|
lua = true;
|
||||||
|
}
|
||||||
|
]
|
||||||
9
system/modules/nvf/binds/telescope.nix
Normal file
9
system/modules/nvf/binds/telescope.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
key = "<leader> ";
|
||||||
|
mode = ["n" "t"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>Telescope find_files<CR>";
|
||||||
|
desc = "Find Files";
|
||||||
|
}
|
||||||
|
]
|
||||||
214
system/modules/nvf/default.nix
Normal file
214
system/modules/nvf/default.nix
Normal file
|
|
@ -0,0 +1,214 @@
|
||||||
|
{pkgs, ...}: let
|
||||||
|
keybinds = import ./binds;
|
||||||
|
plugins = import ./plugins {inherit pkgs;};
|
||||||
|
in {
|
||||||
|
programs.nvf = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
vim = {
|
||||||
|
package = pkgs.neovim-unwrapped;
|
||||||
|
lazy.plugins = plugins;
|
||||||
|
|
||||||
|
viAlias = false;
|
||||||
|
vimAlias = true;
|
||||||
|
useSystemClipboard = true;
|
||||||
|
|
||||||
|
keymaps = keybinds;
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
formatOnSave = true;
|
||||||
|
lspkind.enable = false;
|
||||||
|
lightbulb.enable = true;
|
||||||
|
lspsaga.enable = false;
|
||||||
|
trouble.enable = true;
|
||||||
|
lspSignature.enable = true;
|
||||||
|
otter-nvim.enable = true;
|
||||||
|
lsplines.enable = true;
|
||||||
|
nvim-docs-view.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
debugger = {
|
||||||
|
nvim-dap = {
|
||||||
|
enable = true;
|
||||||
|
ui.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = {
|
||||||
|
enable = true;
|
||||||
|
name = "tokyonight";
|
||||||
|
style = "night";
|
||||||
|
};
|
||||||
|
|
||||||
|
snippets = {
|
||||||
|
luasnip.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
binds = {
|
||||||
|
whichKey.enable = true;
|
||||||
|
cheatsheet.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
gitsigns.enable = true;
|
||||||
|
gitsigns.codeActions.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
minimap = {
|
||||||
|
codewindow.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
projects = {
|
||||||
|
project-nvim.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
notes = {
|
||||||
|
todo-comments.enable = true;
|
||||||
|
mind-nvim.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
tabline = {
|
||||||
|
nvimBufferline.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
utility = {
|
||||||
|
icon-picker.enable = true;
|
||||||
|
surround.enable = true;
|
||||||
|
diffview-nvim.enable = true;
|
||||||
|
motion = {
|
||||||
|
hop.enable = true;
|
||||||
|
leap.enable = true;
|
||||||
|
precognition.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
images = {
|
||||||
|
image-nvim = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts = {
|
||||||
|
backend = "kitty";
|
||||||
|
processor = "magick_cli";
|
||||||
|
integrations = {
|
||||||
|
markdown = {
|
||||||
|
enable = true;
|
||||||
|
downloadRemoteImages = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
filetree.neo-tree = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts = {
|
||||||
|
filesystem = {
|
||||||
|
bind_to_cwd = false;
|
||||||
|
follow_current_file.enabled = true;
|
||||||
|
use_libuv_file_watcher = true;
|
||||||
|
};
|
||||||
|
window.mappings = {
|
||||||
|
"<space>" = "none";
|
||||||
|
"l" = "open";
|
||||||
|
"h" = "close_node";
|
||||||
|
};
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
with_expanders = true;
|
||||||
|
expander_collapsed = "";
|
||||||
|
expander_expanded = "";
|
||||||
|
expander_highlight = "NeoTreeExpander";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
unstaged = "";
|
||||||
|
staged = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
borders.enable = true;
|
||||||
|
colorizer.enable = true;
|
||||||
|
illuminate.enable = true;
|
||||||
|
noice.enable = true;
|
||||||
|
breadcrumbs = {
|
||||||
|
enable = true;
|
||||||
|
navbuddy.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
smartcolumn = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts.custom_colorcolumn = {
|
||||||
|
nix = "110";
|
||||||
|
ruby = "120";
|
||||||
|
java = "130";
|
||||||
|
go = ["90" "130"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fastaction.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
statusline.lualine = {
|
||||||
|
enable = true;
|
||||||
|
theme = "tokyonight";
|
||||||
|
};
|
||||||
|
|
||||||
|
telescope.enable = true;
|
||||||
|
autocomplete.nvim-cmp.enable = true;
|
||||||
|
autopairs.nvim-autopairs.enable = true;
|
||||||
|
treesitter.context.enable = true;
|
||||||
|
|
||||||
|
languages = {
|
||||||
|
enableLSP = true;
|
||||||
|
enableFormat = true;
|
||||||
|
enableTreesitter = true;
|
||||||
|
enableExtraDiagnostics = true;
|
||||||
|
|
||||||
|
nix.enable = true;
|
||||||
|
markdown.enable = true;
|
||||||
|
bash.enable = true;
|
||||||
|
clang.enable = true;
|
||||||
|
css.enable = true;
|
||||||
|
html.enable = true;
|
||||||
|
sql.enable = true;
|
||||||
|
java.enable = true;
|
||||||
|
kotlin.enable = true;
|
||||||
|
ts.enable = true;
|
||||||
|
go.enable = true;
|
||||||
|
lua.enable = true;
|
||||||
|
zig.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
typst.enable = true;
|
||||||
|
rust = {
|
||||||
|
enable = true;
|
||||||
|
crates.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
visuals = {
|
||||||
|
nvim-scrollbar.enable = true;
|
||||||
|
nvim-web-devicons.enable = true;
|
||||||
|
nvim-cursorline.enable = true;
|
||||||
|
cinnamon-nvim.enable = true;
|
||||||
|
fidget-nvim.enable = true;
|
||||||
|
highlight-undo.enable = true;
|
||||||
|
indent-blankline.enable = true;
|
||||||
|
|
||||||
|
# Fun
|
||||||
|
cellular-automaton.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
comments = {
|
||||||
|
comment-nvim.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
presence = {
|
||||||
|
neocord.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
93
system/modules/nvf/plugins/default.nix
Normal file
93
system/modules/nvf/plugins/default.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
{pkgs, ...}: let
|
||||||
|
snacksBinds = import ../binds/snacks.nix;
|
||||||
|
logo = ''
|
||||||
|
██████████ █████████ █████████ █████ █████ █████ █████ █████ █████
|
||||||
|
░░███░░░░███ ███░░░░░███ ███░░░░░███░░███ ░░███ ░░███ ░░███ ░░███ ░░███
|
||||||
|
░███ ░░███ ░███ ░███ ███ ░░░ ░███ ░███ ░░███ ███ ░░███ ███
|
||||||
|
░███ ░███ ░███████████ ░███ ░███████████ ░░█████ ░░█████
|
||||||
|
░███ ░███ ░███░░░░░███ ░███ ░███░░░░░███ ███░███ ░░███
|
||||||
|
░███ ███ ░███ ░███ ░░███ ███ ░███ ░███ ███ ░░███ ░███
|
||||||
|
██████████ █████ █████ ░░█████████ █████ █████ █████ █████ █████
|
||||||
|
░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
"${pkgs.vimPlugins.snacks-nvim.pname}" = {
|
||||||
|
enabled = true;
|
||||||
|
priority = 1000;
|
||||||
|
package = pkgs.vimPlugins.snacks-nvim;
|
||||||
|
setupModule = "snacks";
|
||||||
|
lazy = false;
|
||||||
|
setupOpts = {
|
||||||
|
animate.enabled = true;
|
||||||
|
dashboard = {
|
||||||
|
enabled = true;
|
||||||
|
header = logo;
|
||||||
|
keys = [
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "f";
|
||||||
|
desc = "Find File";
|
||||||
|
action = ":lua Snacks.dashboard.pick('files')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "n";
|
||||||
|
desc = "New File";
|
||||||
|
action = ":ene | startinsert";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "g";
|
||||||
|
desc = "Find Text";
|
||||||
|
action = ":lua Snacks.dashboard.pick('live_grep')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "r";
|
||||||
|
desc = "Recent Files";
|
||||||
|
action = ":lua Snacks.dashboard.pick('oldfiles')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "c";
|
||||||
|
desc = "Config";
|
||||||
|
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "s";
|
||||||
|
desc = "Restore Session";
|
||||||
|
section = "session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "x";
|
||||||
|
desc = "Lazy Extras";
|
||||||
|
action = ":LazyExtras";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "l";
|
||||||
|
desc = "Lazy";
|
||||||
|
action = ":Lazy";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "q";
|
||||||
|
desc = "Quit";
|
||||||
|
action = ":qa";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
indent.enabled = true;
|
||||||
|
input.enabled = true;
|
||||||
|
notifier.enabled = false;
|
||||||
|
quickfile.enabled = true;
|
||||||
|
scroll.enabled = true;
|
||||||
|
statuscolumn.enabled = false;
|
||||||
|
words.enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys = snacksBinds;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
{
|
{
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
(with pkgs; [
|
(with pkgs; [
|
||||||
|
neovim
|
||||||
|
|
||||||
# Binary cache platform
|
# Binary cache platform
|
||||||
cachix
|
cachix
|
||||||
|
|
||||||
|
|
@ -60,7 +62,7 @@
|
||||||
gcc
|
gcc
|
||||||
|
|
||||||
# Editor
|
# Editor
|
||||||
neovim
|
vim
|
||||||
stylua
|
stylua
|
||||||
lazygit
|
lazygit
|
||||||
luajitPackages.lua
|
luajitPackages.lua
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue