We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
vim.version.parse
nil
1 parent 63f6fea commit 615dabeCopy full SHA for 615dabe
lua/rocks_treesitter/highlight.lua
@@ -92,15 +92,10 @@ local function prompt_auto_install(rocks)
92
function(latest_version, rock)
93
---@type boolean, vim.Version?
94
local ok, version = pcall(vim.version.parse, rock.version)
95
- if
96
- ok
97
- and latest_version
98
- and version --[[ @as vim.Version ]]
99
- > latest_version
100
- then
101
- return version
102
- elseif ok then
103
+ if latest_version then
+ return (ok and version and version > latest_version and version) or latest_version
+ else
+ return ok and version
104
end
105
106
)
0 commit comments