mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 20:46:28 +00:00
Fix nil values in commit and tag tables
This commit is contained in:
parent
0ccfe90fac
commit
617bbf780f
@ -208,7 +208,7 @@ use("folke/trouble.nvim")
|
||||
use({
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
commit = utils.map_version_rule({
|
||||
[">=0.6.0"] = nil,
|
||||
[">=0.6.0"] = utils.nil_val,
|
||||
[">=0.5.1"] = "739a98c12bedaa2430c4a3c08d1d22ad6c16513e",
|
||||
[">=0.5.0"] = "3e7390735501d0507bf2c2b5c2e7a16f58deeb81",
|
||||
}),
|
||||
@ -297,7 +297,7 @@ use({
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
},
|
||||
tag = utils.map_version_rule({
|
||||
[">=0.6.0"] = nil,
|
||||
[">=0.6.0"] = utils.nil_val,
|
||||
["<0.6.0"] = "nvim-0.5.1",
|
||||
["==0.5.0"] = "nvim-0.5.0",
|
||||
}),
|
||||
|
@ -153,6 +153,8 @@ function M.materialize_list(list, iterator)
|
||||
return list
|
||||
end
|
||||
|
||||
M.nil_val = {}
|
||||
|
||||
-- Maps a set of version rules to a value eg. [">0.5.0"] = "has 0.5.0"
|
||||
-- If more than one rule matches, the one with the greatest version number is used
|
||||
function M.map_version_rule(rules)
|
||||
@ -197,6 +199,10 @@ function M.map_version_rule(rules)
|
||||
end
|
||||
|
||||
-- Return highest versioned matched value
|
||||
if latest_value == M.nil_val then
|
||||
return nil
|
||||
end
|
||||
|
||||
return latest_value
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user