Skip to content

Commit a43f8a4

Browse files
committed
fix(diagnostic): show diagnostics for the matching version
1 parent e079230 commit a43f8a4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lua/crates/diagnostic.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ function M.process_crate_versions(crate, versions)
206206
if semver.matches_requirements(newest.parsed, crate:vers_reqs()) then
207207

208208
info.virt_text = { { string.format(core.cfg.text.version, newest.num), core.cfg.highlight.version } }
209+
info.version = newest
209210
else
210211

211212
local match, match_pre, match_yanked = util.get_newest(versions, avoid_pre, crate:vers_reqs())

teal/crates/diagnostic.tl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ function M.process_crate_versions(crate: Crate, versions: {Version}): CrateInfo
206206
if semver.matches_requirements(newest.parsed, crate:vers_reqs()) then
207207
-- version matches, no upgrade available
208208
info.virt_text = { { string.format(core.cfg.text.version, newest.num), core.cfg.highlight.version } }
209+
info.version = newest
209210
else
210211
-- version does not match, upgrade available
211212
local match, match_pre, match_yanked = util.get_newest(versions, avoid_pre, crate:vers_reqs())

0 commit comments

Comments
 (0)