diff --git a/lua/ht/plugins/ui/alpha-nvim.lua b/lua/ht/plugins/ui/alpha-nvim.lua index 4fd974d9..c8dec14e 100644 --- a/lua/ht/plugins/ui/alpha-nvim.lua +++ b/lua/ht/plugins/ui/alpha-nvim.lua @@ -156,21 +156,23 @@ local function build_buttons(arr) builtin.find_files { cwd = "$HOME/.dotvim" } end) - buttons[#buttons + 1] = button( - "f", - "󰺮 " .. arr .. " Search Obsidian", - function() - vim.cmd("ObsidianSearchByAlias") - end - ) + if require("ht.core.globals").has_obsidian_vault then + buttons[#buttons + 1] = button( + "f", + "󰺮 " .. arr .. " Search Obsidian", + function() + vim.cmd("ObsidianSearchByAlias") + end + ) - buttons[#buttons + 1] = button( - "t", - "󰃶 " .. arr .. " Obsidian Today", - function() - vim.cmd("ObsidianToday") - end - ) + buttons[#buttons + 1] = button( + "t", + "󰃶 " .. arr .. " Obsidian Today", + function() + vim.cmd("ObsidianToday") + end + ) + end buttons[#buttons + 1] = button("u", "󰚰 " .. arr .. " Update Plugins", ":Lazy update") diff --git a/lua/ht/version.lua b/lua/ht/version.lua index 0805bc57..8d2ae96c 100644 --- a/lua/ht/version.lua +++ b/lua/ht/version.lua @@ -1,5 +1,5 @@ local M = {} -M.last_updated_time = '2023.11.28' +M.last_updated_time = '2023.11.29' return M