{ config, inputs, pkgs, lib, ... }: let cfg = config.modules.nixvim; in { options.modules.nixvim = { enable = lib.mkEnableOption "Nixvim"; }; imports = [ inputs.nixvim.homeModules.nixvim ./plugins ]; config.home.packages = with pkgs; [ # formatters nixfmt # misc ripgrep ]; config.programs.nixvim = lib.mkIf cfg.enable { enable = true; defaultEditor = true; colorschemes.tokyonight.enable = true; plugins = { notify.enable = true; mini-cursorword.enable = true; mini-statusline.enable = true; web-devicons.enable = true; vim-dadbod-completion.enable = true; telescope.enable = true; lazygit.enable = true; persisted.enable = true; wakatime.enable = true; treesitter = { enable = true; grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ bash json lua make markdown nix regex toml vim vimdoc xml yaml ]; settings = { highlight.enable = true; }; }; }; extraPlugins = with pkgs; [ vimPlugins.mini-completion vimPlugins.mini-comment vimPlugins.melange-nvim vimPlugins.telescope-file-browser-nvim ] ++ [ (pkgs.vimUtils.buildVimPlugin { name = "telescope-tabs"; doCheck = false; # i didnt figure out how to do deps so lmfao src = pkgs.fetchFromGitHub { owner = "LukasPietzschmann"; repo = "telescope-tabs"; rev = "777b1f630f3d6a12a2e71635a82581c988d6da2e"; hash = "sha256-5NpH9+0ECrcKi8quPLpCHLSPTuzGETWtq4E+2jqUKio="; }; }) ]; opts = { number = true; bg = "dark"; tabstop = 2; shiftwidth = 2; termguicolors = true; }; globals = { mapleader = " "; }; keymaps = [ { action = "Telescope persisted"; key = "fs"; options = { silent = true; }; } { action = "Telescope find_files"; key = "ff"; options = { silent = true; }; } { action = "Telescope file_browser"; key = "fv"; options = { silent = true; }; } { action = "Telescope telescope-tabs list_tabs"; key = "ft"; options = { silent = true; }; } { action = "tabnew"; key = "tt"; options = { silent = true; }; } { action = "LazyGit"; key = "lg"; options = { silent = true; }; } { action = "Telescope buffers"; key = "fb"; options = { silent = true; }; } { action = "Telescope live_grep"; key = "fg"; options = { silent = true; }; } ]; }; }