diff --git a/flake.lock b/flake.lock index 46666eb..f932316 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "alpha-nvim": { + "flake": false, + "locked": { + "lastModified": 1669699262, + "narHash": "sha256-uKJRMbNyQtiFhkrsniK7SqxM+XS2l3qffeCqmYznPuk=", + "owner": "goolord", + "repo": "alpha-nvim", + "rev": "21a0f2520ad3a7c32c0822f943368dc063a569fb", + "type": "github" + }, + "original": { + "owner": "goolord", + "repo": "alpha-nvim", + "type": "github" + } + }, "bufdelete-nvim": { "flake": false, "locked": { @@ -128,6 +144,22 @@ "type": "github" } }, + "dashboard-nvim": { + "flake": false, + "locked": { + "lastModified": 1675318414, + "narHash": "sha256-cwD9Oh7VuF6rECQp1YwEu0ghuYzO8txwnxtWU8ewAgI=", + "owner": "glepnir", + "repo": "dashboard-nvim", + "rev": "f4eedba90f0a55111351fd45444db5a82081727f", + "type": "github" + }, + "original": { + "owner": "glepnir", + "repo": "dashboard-nvim", + "type": "github" + } + }, "dirt-samples-src": { "flake": false, "locked": { @@ -577,15 +609,15 @@ "nvim-tree-lua": { "flake": false, "locked": { - "lastModified": 1662860472, - "narHash": "sha256-3aB1xDU0cylHfZ5yzxMQKf07qrJ1pwHEl+QV42k0CpQ=", - "owner": "kyazdani42", + "lastModified": 1675128430, + "narHash": "sha256-gs50ubONKCxxXfR6wu6238s71R5Gmaot3unxpMFZOwM=", + "owner": "nvim-tree", "repo": "nvim-tree.lua", - "rev": "fb8735e96cecf004fbefb086ce85371d003c5129", + "rev": "215b29bfad74518442621b9d0483a621483b066b", "type": "github" }, "original": { - "owner": "kyazdani42", + "owner": "nvim-tree", "repo": "nvim-tree.lua", "type": "github" } @@ -708,6 +740,7 @@ }, "root": { "inputs": { + "alpha-nvim": "alpha-nvim", "bufdelete-nvim": "bufdelete-nvim", "catppuccin": "catppuccin", "cmp-buffer": "cmp-buffer", @@ -716,6 +749,7 @@ "cmp-treesitter": "cmp-treesitter", "cmp-vsnip": "cmp-vsnip", "crates-nvim": "crates-nvim", + "dashboard-nvim": "dashboard-nvim", "flake-utils": "flake-utils", "gitsigns-nvim": "gitsigns-nvim", "glow-nvim": "glow-nvim", diff --git a/flake.nix b/flake.nix index 15517ae..08d6fd4 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,9 @@ vim.minimap = { minimap-vim.enable = true; }; + vim.dashboard = { + dashboard-nvim.enable = false; + }; }; }; @@ -278,7 +281,7 @@ # Filetrees nvim-tree-lua = { - url = "github:kyazdani42/nvim-tree.lua"; + url = "github:nvim-tree/nvim-tree.lua"; flake = false; }; @@ -356,6 +359,17 @@ flake = false; }; + # Dashboard Utilities + dashboard-nvim = { + url = "github:glepnir/dashboard-nvim"; + flake = false; + }; + + alpha-nvim = { + url = "github:goolord/alpha-nvim"; + flake = false; + }; + # Themes tokyonight = { url = "github:folke/tokyonight.nvim"; diff --git a/modules/dashboard/dashboard-nvim.nix b/modules/dashboard/dashboard-nvim.nix new file mode 100644 index 0000000..ef1b753 --- /dev/null +++ b/modules/dashboard/dashboard-nvim.nix @@ -0,0 +1,56 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.dashboard.dashboard-nvim; +in { + options.vim.dashboard.dashboard-nvim = { + enable = mkEnableOption "dashboard-nvim"; + }; + + config = mkIf cfg.enable { + vim.startPlugins = [ + "dashboard-nvim" + ]; + + vim.nnoremap = { + "bn" = ":BufferLineCycleNext"; + "bp" = ":BufferLineCyclePrev"; + "bc" = ":BufferLinePick"; + "bse" = ":BufferLineSortByExtension"; + "bsd" = ":BufferLineSortByDirectory"; + "bsi" = ":lua require'bufferline'.sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end)"; + "bmn" = ":BufferLineMoveNext"; + "bmp" = ":BufferLineMovePrev"; + "b1" = "BufferLineGoToBuffer 1"; + "b2" = "BufferLineGoToBuffer 2"; + "b3" = "BufferLineGoToBuffer 3"; + "b4" = "BufferLineGoToBuffer 4"; + "b5" = "BufferLineGoToBuffer 5"; + "b6" = "BufferLineGoToBuffer 6"; + "b7" = "BufferLineGoToBuffer 7"; + "b8" = "BufferLineGoToBuffer 8"; + "b9" = "BufferLineGoToBuffer 9"; + }; + + vim.luaConfigRC.dashboard-nvim = nvim.dag.entryAnywhere '' + require("dashboard-nvim").setup{ + hide = { + statusline -- hide statusline default is true + tabline -- hide the tabline + winbar -- hide winbar + }, + preview = { + command -- preview command + file_path -- preview file path + file_height -- preview file height + file_width -- preview file width + }, + } + ''; + }; +} diff --git a/modules/dashboard/default.nix b/modules/dashboard/default.nix new file mode 100644 index 0000000..a1e3289 --- /dev/null +++ b/modules/dashboard/default.nix @@ -0,0 +1,12 @@ +{ + pkgs, + config, + lib, + ... +}: { + imports = [ + ./config.nix + #./alpha-nvim.nix + ./dashboard-nvim.nix + ]; +}