From e6b6534c8d4e134004423f23222d1f654266039e Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 25 Nov 2023 15:58:35 +0200 Subject: [PATCH] Switch from dashboard to alpha, add project.nvim telescope plugin --- home/.config/nvim/lua/plugins/alpha.lua | 10 ++++++ home/.config/nvim/lua/plugins/dashboard.lua | 32 ------------------- .../nvim/lua/plugins/indent-blankline.lua | 2 +- home/.config/nvim/lua/plugins/telescope.lua | 13 ++++++++ 4 files changed, 24 insertions(+), 33 deletions(-) create mode 100644 home/.config/nvim/lua/plugins/alpha.lua delete mode 100644 home/.config/nvim/lua/plugins/dashboard.lua diff --git a/home/.config/nvim/lua/plugins/alpha.lua b/home/.config/nvim/lua/plugins/alpha.lua new file mode 100644 index 0000000..d92563e --- /dev/null +++ b/home/.config/nvim/lua/plugins/alpha.lua @@ -0,0 +1,10 @@ +-- Startup dashboard +--- @type LazyPluginSpec +return { + "goolord/alpha-nvim", + config = function() + local alpha = require("alpha") + local theta = require("alpha.themes.theta") + alpha.setup(theta.config) + end, +} diff --git a/home/.config/nvim/lua/plugins/dashboard.lua b/home/.config/nvim/lua/plugins/dashboard.lua deleted file mode 100644 index 7a6b23a..0000000 --- a/home/.config/nvim/lua/plugins/dashboard.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Startup dashboard ---- @type LazyPluginSpec -return { - "glepnir/dashboard-nvim", - event = "VimEnter", - dependencies = { "kyazdani42/nvim-web-devicons" }, - opts = { - theme = "hyper", - config = { - week_header = { - enable = true, - }, - shortcut = { - { - icon = "🧲 ", - desc = "Update", - group = "@property", - action = "Lazy update", - key = "u", - }, - }, - project = { - enable = true, - limit = 8, - label = "Projects", - action = function(path) - require("telescope.builtin").find_files({ cwd = path }) - end, - }, - }, - }, -} diff --git a/home/.config/nvim/lua/plugins/indent-blankline.lua b/home/.config/nvim/lua/plugins/indent-blankline.lua index c9c0d2a..8ddab8c 100644 --- a/home/.config/nvim/lua/plugins/indent-blankline.lua +++ b/home/.config/nvim/lua/plugins/indent-blankline.lua @@ -8,7 +8,7 @@ return { filetypes = { "", "checkhealth", - "dashboard", + "alpha", "git", "gitcommit", "TelescopePrompt", diff --git a/home/.config/nvim/lua/plugins/telescope.lua b/home/.config/nvim/lua/plugins/telescope.lua index 42d9ad5..bc9ce9e 100644 --- a/home/.config/nvim/lua/plugins/telescope.lua +++ b/home/.config/nvim/lua/plugins/telescope.lua @@ -17,6 +17,13 @@ return { -- cd plugin for telescope "zane-/cder.nvim", + + -- Switch to a project + { + "ahmedkhalf/project.nvim", + main = "project_nvim", + config = true, + }, }, opts = { -- Set layout to vertical @@ -77,6 +84,11 @@ return { "", "Telescope live_grep", }, + { + desc = "Change to a project", + "", + "Telescope projects", + }, }, config = function(_, opts) local telescope = require("telescope") @@ -86,5 +98,6 @@ return { telescope.load_extension("fzf") telescope.load_extension("ui-select") telescope.load_extension("cder") + telescope.load_extension("projects") end, }