From b570b8a0750af6041d7311f0d851ab71fd266eed Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 25 Nov 2023 14:58:52 +0200 Subject: [PATCH] Nvim: fix dashboard projects not working after lazy loading telescope --- home/.config/nvim/lua/plugins/dashboard.lua | 23 ++++++++++++++------- home/.config/nvim/lua/plugins/telescope.lua | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/home/.config/nvim/lua/plugins/dashboard.lua b/home/.config/nvim/lua/plugins/dashboard.lua index 5aa8583b..63901a58 100644 --- a/home/.config/nvim/lua/plugins/dashboard.lua +++ b/home/.config/nvim/lua/plugins/dashboard.lua @@ -3,7 +3,7 @@ return { "glepnir/dashboard-nvim", event = "VimEnter", - dependencies = { { "kyazdani42/nvim-web-devicons" } }, + dependencies = { "kyazdani42/nvim-web-devicons" }, opts = { theme = "hyper", config = { @@ -11,16 +11,23 @@ return { enable = true, }, shortcut = { - { icon = "🧲 ", desc = "Update", group = "@property", action = "Lazy update", key = "u" }, { - icon = "🖹 ", - icon_hl = "@variable", - desc = "Files", - group = "Label", - action = "Telescope find_files", - key = "f", + icon = "🧲 ", + desc = "Update", + group = "@property", + action = "Lazy update", + key = "u", }, }, + project = { + enable = true, + limit = 8, + label = "Projects", + action = function(path) + -- "Telescope find_files cwd=" + require("telescope.builtin").find_files({ cwd = path }) + end, + }, }, }, } diff --git a/home/.config/nvim/lua/plugins/telescope.lua b/home/.config/nvim/lua/plugins/telescope.lua index bb55e171..42d9ad5a 100644 --- a/home/.config/nvim/lua/plugins/telescope.lua +++ b/home/.config/nvim/lua/plugins/telescope.lua @@ -1,6 +1,7 @@ --- @type LazyPluginSpec return { "nvim-telescope/telescope.nvim", + lazy = false, dependencies = { -- Internal dependency for telescope "nvim-lua/plenary.nvim",