{ pkgs, config, ... }: { imports = [ ./auto-pairs.nix ./autosave.nix ./bufferline.nix ./cmp.nix ./git.nix ./ionide.nix ./lualine.nix ./lsp.nix ./none-ls.nix ./nvim-tree.nix ./options.nix ./telescope.nix ./toggleterm.nix ./transparent.nix ./treesitter.nix ./trouble.nix ./which_key.nix ./wilder.nix ]; enable = true; defaultEditor = true; globals.mapleader = " "; colorschemes.gruvbox = {enable = true;}; keymaps = [ # Global # Default mode is "" which means normal-visual-op { mode = "n"; key = "bg"; action = "TransparentToggle"; options.desc = "Toggle background transparency"; } { key = ""; action = "NvimTreeToggle"; options.desc = "Toggle NvimTree"; } # File { mode = "n"; key = "f"; action = "+find/file"; } { # Format file key = "fm"; action = "lua vim.lsp.buf.format()"; options.desc = "Format the current buffer"; } # Git { mode = "n"; key = "g"; action = "+git"; } { mode = "n"; key = "gt"; action = "+toggles"; } { key = "gtb"; action = "Gitsigns toggle_current_line_blame"; options.desc = "Gitsigns current line blame"; } { key = "gtd"; action = "Gitsigns toggle_deleted"; options.desc = "Gitsigns deleted"; } { key = "gd"; action = "Gitsigns diffthis"; options.desc = "Gitsigns diff this buffer"; } # Tabs { mode = "n"; key = "t"; action = "+tab"; } { mode = "n"; key = "tn"; action = "tabnew"; options.desc = "Create new tab"; } { mode = "n"; key = "td"; action = "tabclose"; options.desc = "Close tab"; } { mode = "n"; key = "ts"; action = "tabnext"; options.desc = "Go to the sub-sequent tab"; } { mode = "n"; key = "tp"; action = "tabprevious"; options.desc = "Go to the previous tab"; } # Terminal { # Escape terminal mode using ESC mode = "t"; key = ""; action = ""; options.desc = "Escape terminal mode"; } # Trouble { mode = "n"; key = "d"; action = "+diagnostics/debug"; } { key = "dt"; action = "TroubleToggle"; options.desc = "Toggle trouble"; } # Rust { mode = "n"; key = "r"; action = "+rust"; } { # Start standalone rust-analyzer (fixes issues when opening files from nvim tree) mode = "n"; key = "rs"; action = "RustStartStandaloneServerForBuffer"; options.desc = "Start standalone rust-analyzer"; } ]; }