{ pkgs, lib, osConfig, inputs, system, ... }: let inherit (lib.generators) mkLuaInline; suda-nvim = pkgs.vimUtils.buildVimPlugin { name = "vim-suda"; src = pkgs.fetchFromGitHub { owner = "lambdalisue"; repo = "vim-suda"; rev = "9adda7d195222d4e2854efb2a88005a120296c47"; hash = "sha256-46sy3rAdOCULVt1RkIoGdweoV3MqQaB33Et9MrxI6Lk="; }; }; marks-nvim = pkgs.vimUtils.buildVimPlugin { name = "marks-nvim"; src = inputs.marks-nvim; }; in { programs.nvf = { enable = true; settings = { vim = { enableLuaLoader = true; clipboard = { enable = true; providers = { wl-copy.enable = true; }; registers = "unnamedplus"; }; extraPlugins = with pkgs.vimPlugins; { transparent = { package = transparent-nvim; setup = # lua '' require("transparent").setup({ extra_groups = { "NormalFloat", "NvimTreeNormal", "TreesitterContext", "FloatBorder", "FoldColumn", "Folded", "BlinkCmpMenu", "BlinkCmpBorder", "BlinkCmpKind", "WarningMsg", "ErrorMsg", "BlinkCmpMenuBorder", "FzfLuaBackdrop", "VertSplit", "Pmenu", "PmenuSbar", "DiffText", "DiffViewNormal", "CursorColumn", "ColorColumn", "QuickFixLine", "Error", "NoiceScrollbar" }, }) require("transparent").clear_prefix("NeoTree") require("transparent").clear_prefix("GitGutter") ''; }; suda = { package = suda-nvim; }; marks = { package = marks-nvim; setup = '' require("marks").setup {} ''; }; }; keymaps = [ # === Files === # # Explorer { key = "e"; mode = [ "n" ]; action = ":Neotree toggle"; silent = true; desc = "Toggle file explorer"; } # === Fzf lua === # { key = ""; silent = true; mode = [ "n" ]; action = ":FzfLua files"; nowait = true; unique = true; desc = "Find file"; } { key = "/"; mode = [ "n" ]; action = ":FzfLua live_grep"; nowait = true; unique = true; desc = "Live grep"; } # Lsp symbol document { key = "ss"; silent = true; mode = [ "n" ]; action = ":FzfLua lsp_document_symbols"; nowait = true; unique = true; desc = "Find symbols (document)"; } # Lsp symbol workspace { key = "sS"; silent = true; mode = [ "n" ]; action = ":FzfLua lsp_workspace_symbols"; unique = true; nowait = true; desc = "Find symbols (workspace)"; } # Registers { key = ''""''; mode = [ "n" ]; action = ":FzfLua registers"; desc = "Registers"; } # Marks { key = "''"; mode = [ "n" ]; action = ":FzfLua marks"; desc = "Marks"; } # === Buffer === # { key = "bo"; mode = [ "n" ]; action = ":BufferLineCloseOther"; desc = "Close other buffer"; } { key = "bS"; mode = [ "n" ]; action = ":SudaWrite"; desc = "Save file as root"; } # === General Control === # # Save file { key = ""; mode = [ "n" "i" "v" ]; action = ":w"; desc = "Save file"; } { key = ""; mode = [ "i" ]; action = ""; desc = "Shift left"; } { key = "gd"; mode = [ "n" ]; action = ":FzfLua lsp_definitions"; nowait = true; desc = "Go to definition"; } { key = "gD"; mode = [ "n" ]; action = ":FzfLua lsp_declarations"; nowait = true; desc = "Go to declaration"; } { key = "gi"; mode = [ "n" ]; action = ":FzfLua lsp_implementations"; nowait = true; desc = "Go to implementation"; } { key = "gr"; mode = [ "n" ]; action = ":FzfLua lsp_references"; nowait = true; desc = "List references"; } { key = "n"; mode = [ "n" ]; action = ":NoiceAll"; nowait = true; desc = "Notifications"; } { key = ""; mode = [ "n" ]; action = ":noh"; desc = "Clear highlight"; } # === Tab === # { key = ">"; mode = [ "v" ]; action = ">gv"; silent = true; desc = "Shift right"; } { key = "<"; mode = [ "v" ]; action = "