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(eslint): update openDoc os call for windows #3615

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

Kushal-Chandar
Copy link
Contributor

Problem:
os.execute misinterprets quoted url as window title

Solution:
add an empty title argument

@Kushal-Chandar

This comment was marked as resolved.

@@ -136,7 +136,7 @@ return {
end
local sysname = vim.loop.os_uname().sysname
if sysname:match 'Windows' then
Copy link
Member

@justinmk justinmk Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this should be replaced with a single call to vim.ui.open(). That handles all OSes automatically.

Copy link
Contributor Author

@Kushal-Chandar Kushal-Chandar Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was added in 0.10. I can make the change.

Can i make the change? The README in this repo says 0.9+.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll update that soon. But anyway, if people want to use this command, they need Nvim 0.10

Copy link
Contributor Author

@Kushal-Chandar Kushal-Chandar Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NVIM v0.10.4
Build type: Release
LuaJIT 2.1.1713484068

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"

vim.ui.open when run from vim environment doesn't do anything.

and in my lsp, the second argument is simply not present.
image

i have lua 5.4.7 installed via msys2

Copy link
Contributor Author

@Kushal-Chandar Kushal-Chandar Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • it works for files doesn't work for urls

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim.ui.open() absolutely works for URLs. Try this:

:lua vim.ui.open('https://google.com')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you passing cmd=osurl ? don't do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, turns out it was an issue with qutebrowser. works with edge on windows

Problem:
os.execute misinterprets quoted url as window title

Solution:
replace it with vim.ui.open()
@justinmk justinmk merged commit 7af2c37 into neovim:master Feb 14, 2025
11 checks passed
@Kushal-Chandar Kushal-Chandar deleted the eslint-open-doc-fix branch February 14, 2025 16:42
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