Skip to content

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

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

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

Verified

This commit was signed with the committer’s verified signature.
80avin Avinash Thakur
fixes folke#1947
@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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
80avin added 2 commits March 14, 2025 11:19

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

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

@github-actions github-actions bot added the stale label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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