Skip to content

Commit

Permalink
feat: remove obsidian related buttons when obsidian folder is not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Nov 29, 2023
1 parent 61e0360 commit 6219f74
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions lua/ht/plugins/ui/alpha-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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<CR>")
Expand Down
2 changes: 1 addition & 1 deletion lua/ht/version.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local M = {}

M.last_updated_time = '2023.11.28'
M.last_updated_time = '2023.11.29'

return M

0 comments on commit 6219f74

Please sign in to comment.