Skip to content

Conversation

@DrKJeff16
Copy link
Contributor

@DrKJeff16 DrKJeff16 commented Oct 5, 2025

✅ Checklist

📝 Description

I use Neovim >0.11. When checking the output of :checkhealth vim.deprecated I got the following:

2025-10-05-014814_hyprshot

As :h vim.validate() suggests, the usage of vim.validate({ ... }) is deprecated since Neovim v0.11.
Therefore I took the liberty to modify utils.lua to account for the new versions without dropping support for older versions:

Now I get no deprecation warnings when using this plugin:

screenkey_health.mp4

@NStefan002
Copy link
Owner

Hi, thanks for doing this! Do you mind doing it without version-specific code (since I don't want to maintain that kind of stuff), and I'll merge it when the 0.12 becomes stable (I plan to drop support for 0.10.x), which is fairly soon, judging by this milestone.

@DrKJeff16
Copy link
Contributor Author

Hi, thanks for doing this! Do you mind doing it without version-specific code (since I don't want to maintain that kind of stuff), and I'll merge it when the 0.12 becomes stable (I plan to drop support for 0.10.x), which is fairly soon, judging by this milestone.

Excellent! 1 minute and it's done!

@DrKJeff16 DrKJeff16 changed the title fix(utils): deprecation warning safeguards docs(utils): small annotation improvements Oct 12, 2025
@DrKJeff16
Copy link
Contributor Author

1 sec.

@DrKJeff16
Copy link
Contributor Author

Done. If there are any suggestions I'll be here.

@DrKJeff16
Copy link
Contributor Author

That being said, I'm not exactly sure how to deal with that luacheck warning regarding unpack...

@NStefan002
Copy link
Owner

Thanks for the lightning-fast response!!

That being said, I'm not exactly sure how to deal with that luacheck warning regarding unpack...

The only (possibly) better solution I can think of is to make unpack a local variable, like this:

local unpack = unpack or table.unpack

It doesn't change functionality, it makes more sense, and it removes warnings.

Also, since your update is focused on removing deprecation warnings, you should put your old title for PR back.

Other than that, this looks pretty good!

@DrKJeff16 DrKJeff16 changed the title docs(utils): small annotation improvements fix(utils): deprecation warning safeguards Oct 12, 2025
@DrKJeff16 DrKJeff16 changed the title fix(utils): deprecation warning safeguards fix(utils): vim.validate upgrade Oct 12, 2025
@DrKJeff16
Copy link
Contributor Author

DrKJeff16 commented Oct 12, 2025

@NStefan002 All set! Also reverted my .luacheckrc modifications.

@NStefan002
Copy link
Owner

Thanks for doing this! Will merge as soon as the 0.12 version becomes stable.

Signed-off-by: Guennadi Maximov C <[email protected]>
@DrKJeff16
Copy link
Contributor Author

DrKJeff16 commented Oct 13, 2025

Thanks for doing this! Will merge as soon as the 0.12 version becomes stable.

@NStefan002 As a bleeding edge user, nothing wrong so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants