Skip to content

Commit

Permalink
fix: use more robust way to detect version
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus committed Dec 10, 2024
1 parent 9e3300e commit d653694
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/frecency/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ end
---@return nil
Config.setup = function(ext_config)
local opts = vim.tbl_extend("force", Config.default_values, ext_config or {})
if vim.version().minor >= 11 then
if vim.fn.has "nvim-0.11" == 1 then
vim.validate("recency_values", opts.recency_values, "table")
vim.validate("auto_validate", opts.auto_validate, "boolean")
vim.validate("bootstrap", opts.bootstrap, "boolean")
Expand Down
2 changes: 1 addition & 1 deletion lua/telescope/_extensions/frecency.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ return require("telescope").register_extension {
},
setup = frecency.setup,
health = function()
if vim.version().minor >= 10 then
if vim.fn.has "nvim-0.10" == 1 then
vim.health.ok "Neovim version is 0.10 or higher."
else
vim.health.error "Neovim version must be 0.10 or higher."
Expand Down

0 comments on commit d653694

Please sign in to comment.