aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorKushal-Chandar <83660514+Kushal-Chandar@users.noreply.github.com>2025-02-14 21:59:26 +0530
committerGitHub <noreply@github.com>2025-02-14 08:29:26 -0800
commit7af2c37192deae28d1305ae9e68544f7fb5408e1 (patch)
tree987b0c6473e3fda66c57f0647304dc0ee95f871e /lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.tar
nvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.tar.gz
nvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.tar.bz2
nvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.tar.lz
nvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.tar.xz
nvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.tar.zst
nvim-lspconfig-7af2c37192deae28d1305ae9e68544f7fb5408e1.zip
fix(eslint): openDoc breaks on some URLs #3615
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs/eslint.lua12
1 files changed, 2 insertions, 10 deletions
diff --git a/lua/lspconfig/configs/eslint.lua b/lua/lspconfig/configs/eslint.lua
index 70a21167..e701928d 100644
--- a/lua/lspconfig/configs/eslint.lua
+++ b/lua/lspconfig/configs/eslint.lua
@@ -131,16 +131,8 @@ return {
end,
handlers = {
['eslint/openDoc'] = function(_, result)
- if not result then
- return
- end
- local sysname = vim.loop.os_uname().sysname
- if sysname:match 'Windows' then
- os.execute(string.format('start %q', result.url))
- elseif sysname:match 'Linux' then
- os.execute(string.format('xdg-open %q', result.url))
- else
- os.execute(string.format('open %q', result.url))
+ if result then
+ vim.ui.open(result.url)
end
return {}
end,