Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

80avin
Copy link

@80avin 80avin commented Mar 13, 2025

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

@nenahp
Copy link

nenahp commented Mar 14, 2025

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

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

@80avin 80avin changed the title fix: use vim.ui.open to open uri fix(util): use vim.ui.open to open uri Mar 14, 2025
@80avin
Copy link
Author

80avin commented Mar 14, 2025

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.

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.

bug: lazyvim logs don't open hover action in WSL
2 participants