From 399e1f14edc9ba3ff98f444e06c7419bc49dcbc4 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:38:59 +0900 Subject: modified plugins/urlview.lua, modified tmux/tmux.conf --- .../TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'ar/.config/TheSiahxyz') diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua index 69e7762..eda7f03 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua @@ -90,7 +90,24 @@ return { -- Command or method to open links with -- Options: "netrw", "system" (default OS browser), "clipboard"; or "firefox", "chromium" etc. -- By default, this is "netrw", or "system" if netrw is disabled - default_action = "system", + -- Use custom function to open URLs asynchronously (prevents blocking) + default_action = function(url) + -- Use vim.ui.open if available (Neovim 0.10+) + if vim.ui.open then + vim.ui.open(url) + else + -- Fallback: detect OS and use appropriate command + local cmd + if vim.fn.has("mac") == 1 then + cmd = "open" + elseif vim.fn.has("win32") == 1 then + cmd = "start" + else + cmd = "xdg-open" + end + vim.fn.jobstart({ cmd, url }, { detach = true }) + end + end, -- Set the register to use when yanking -- Default: + (system clipboard) default_register = "+", -- cgit v1.2.3