diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-12 16:38:59 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-12 16:38:59 +0900 |
| commit | 65ac6fd3ab9a9477b51474b0816ef7336077b80b (patch) | |
| tree | 5612de7a5440a235e643b787f163af5f623a9ce2 /ar/.config/TheSiahxyz/lua | |
| parent | 09f824625fc7617f87398cbeb54f726368987bce (diff) | |
modified plugins/urlview.lua, modified tmux/tmux.conf
Diffstat (limited to 'ar/.config/TheSiahxyz/lua')
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua | 19 |
1 files changed, 18 insertions, 1 deletions
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 = "+", |
