From 3d6977257ecf72f711f9b3271e3b8249c05fff7c Mon Sep 17 00:00:00 2001 From: Nicolai Van der Storm Date: Tue, 24 Oct 2023 12:51:53 +0200 Subject: [PATCH] added dashboard and web dev icons to nvim --- nix/users/base/neovim/default.nix | 15 ++++ nix/users/base/neovim/plugins/dashboard.lua | 68 +++++++++++++++++++ .../base/neovim/plugins/nvim-web-devicons.lua | 23 +++++++ 3 files changed, 106 insertions(+) create mode 100644 nix/users/base/neovim/plugins/dashboard.lua create mode 100644 nix/users/base/neovim/plugins/nvim-web-devicons.lua diff --git a/nix/users/base/neovim/default.nix b/nix/users/base/neovim/default.nix index ef8b366..d50d0f8 100644 --- a/nix/users/base/neovim/default.nix +++ b/nix/users/base/neovim/default.nix @@ -150,6 +150,21 @@ config = toLuaFile ./plugins/telescope.lua; } + { + plugin = telescope-nvim; + config = toLuaFile ./plugins/telescope.lua; + } + + { + plugin = dashboard-nvim; + config = toLuaFile ./plugins/dashboard.lua; + } + + { + plugin = nvim-web-devicons; + config = toLuaFile ./plugins/nvim-web-devicons.lua; + } + ]; extraLuaConfig = '' diff --git a/nix/users/base/neovim/plugins/dashboard.lua b/nix/users/base/neovim/plugins/dashboard.lua new file mode 100644 index 0000000..85f395c --- /dev/null +++ b/nix/users/base/neovim/plugins/dashboard.lua @@ -0,0 +1,68 @@ +local status, plugin = pcall(require, 'dashboard') +if not status then + print('Error with plugin: ', plugin) + return +end + +plugin.setup({ + theme = 'doom', + config = { + header = randomsplash(), + center = { + { + icon = ' ', + icon_hl = '@variable', + desc = 'Find File', + desc_hl = 'String', + key = 'f', + keymap = 'SPC ff', + key_hl = 'Number', + action = 'Telescope find_files' + }, + { + icon = ' ', + icon_hl = '@variable', + desc = 'File Browser', + desc_hl = 'String', + key = 'd', + keymap = 'SPC dt', + key_hl = 'Number', + action = 'NvimTreeToggle' + }, + { + icon = '󰚰 ', + icon_hl = '@variable', + desc = 'Update', + desc_hl = 'String', + key = 'u', + keymap = ':Lazy update', + key_hl = 'Number', + action = 'Lazy update' + }, + { + icon = ' ', + icon_hl = '@variable', + desc = 'Transparency Toggle', + desc_hl = 'String', + key = 't', + keymap = 'SPC tt', + key_hl = 'Number', + action = 'TransparentToggle' + }, + { + icon = '󱓥 ', + icon_hl = '@variable', + desc = 'Edit Neovim', + desc_hl = 'String', + key = 'e', + keymap = 'SPC en', + key_hl = 'Number', + action = 'lua edit_nvim()' -- Declared in functions.lua + }, + + }, + footer = { + randomquote() + } + } +}) \ No newline at end of file diff --git a/nix/users/base/neovim/plugins/nvim-web-devicons.lua b/nix/users/base/neovim/plugins/nvim-web-devicons.lua new file mode 100644 index 0000000..cfc195f --- /dev/null +++ b/nix/users/base/neovim/plugins/nvim-web-devicons.lua @@ -0,0 +1,23 @@ +require('nvim-web-devicons').setup { + color_icons = true; + default = true; + strict = true; + + override_by_filename = { + [".gitignore"] = { + icon = "", + color = "#f1502f", + name = "Gitignore" + } + }; + + override_by_extension = { + ["log"] = { + icon = "", + color = "#81e043", + name = "Log" + } + }; + } + + require('nvim-web-devicons').get_icons() \ No newline at end of file