axieax / urlview.nvim

🔎 Neovim plugin for viewing all the URLs in a buffer
MIT License
232 stars 5 forks source link

Warning "Missing default validation field for optional key `bufnr`" with UrlView command #60

Closed dnebauer closed 8 months ago

dnebauer commented 8 months ago

Upon invoking UrlView in a buffer showing a file, I get the warning message:

Missing default validation field for optional key `bufnr`

Adding a bufnr option to the plugin setup did not prevent the error.

I took a look at the plugin code. I presume the warning is being thrown by lua/urlview/search/validation.lua in local function verify_or_accept (l 47) as called by module function buffer (l 70). I tried unravelling the code further to determine how this function is called but soon gave up.

This is an annoying warning as it appears to indicate a coding problem rather than a configuration issue, but it does not break this otherwise excellent plugin.

windowsrefund commented 8 months ago

seeing the same behavior on a fresh install

axieax commented 8 months ago

Can reproduce, thanks for catching this bug! I've added a fix for this in #62, but intend on using vim.validate for validation in a future PR. Hopefully there won't be any similar issues in the future :D