lazy.nvim icon indicating copy to clipboard operation
lazy.nvim copied to clipboard

fix(util): use vim.ui.open to open uri

Open 80avin opened this issue 9 months ago • 3 comments

fixes #1947

Description

In WSL, pressing K over a commit id or URL in the :Lazy window gives error

E5108: Error executing lua: Vim:E475: Invalid value from argument cmd: 'open' is not executable

Implementing the Util.open using vim.ui.open fixes this issue, however I've only tested it on windows. Let me know if there is any concern that I could be missing.

Related Issue(s)

Fixes #1947

Screenshots

NA

80avin avatar Mar 13 '25 20:03 80avin

vim.ui.open require neovim 0.10.0+ while I find this in README

Neovim >= 0.8.0 (needs to be built with LuaJIT)

nenahp avatar Mar 14 '25 03:03 nenahp

I'll change. Btw, I noticed that calling explorer.exe with the url opens the URL in default browser. Therefore, on 0.10.0+, we can use vim.ui.open and on older, we can use explorer.exe instead of wslview as wslview is not present by default and isn't listed in healthcheck also.

80avin avatar Mar 14 '25 05:03 80avin

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Apr 14 '25 02:04 github-actions[bot]