Skip to content

Commit

Permalink
fix: don't allow tempus to load unless the Neovim ver is at least 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed May 15, 2023
1 parent b420f69 commit c4429fa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/neorg/modules/core/tempus/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ local timezone_list = {
"YEKT",
}

module.setup = function()
if not neorg.utils.is_minimum_version(0, 10, 0) then
log.error("`core.tempus` requires at least Neovim version 0.10.0 to run!")
return {
success = false
}
end

return {}
end

---@alias Date {weekday: {name: string, number: number}?, day: number?, month: {name: string, number: number}?, year: number?, timezone: string?, time: {hour: number, minute: number, second: number?}?}

module.public = {
Expand Down

0 comments on commit c4429fa

Please sign in to comment.