feat: yazi plugins [glow, projects, custom_scripts-set_wallpaper]
This commit is contained in:
41
.config/wezterm/modules/hyperlinks.lua
Normal file
41
.config/wezterm/modules/hyperlinks.lua
Normal file
@ -0,0 +1,41 @@
|
||||
return {
|
||||
-- Matches: a URL in parens: (URL)
|
||||
{
|
||||
regex = "\\((\\w+://\\S+)\\)",
|
||||
format = "$1",
|
||||
highlight = 1,
|
||||
},
|
||||
-- Matches: a URL in brackets: [URL]
|
||||
{
|
||||
regex = "\\[(\\w+://\\S+)\\]",
|
||||
format = "$1",
|
||||
highlight = 1,
|
||||
},
|
||||
-- Matches: a URL in curly braces: {URL}
|
||||
{
|
||||
regex = "\\{(\\w+://\\S+)\\}",
|
||||
format = "$1",
|
||||
highlight = 1,
|
||||
},
|
||||
-- Matches: a URL in angle brackets: <URL>
|
||||
{
|
||||
regex = "<(\\w+://\\S+)>",
|
||||
format = "$1",
|
||||
highlight = 1,
|
||||
},
|
||||
-- Then handle URLs not wrapped in brackets
|
||||
{
|
||||
-- Before
|
||||
--regex = '\\b\\w+://\\S+[)/a-zA-Z0-9-]+',
|
||||
--format = '$0',
|
||||
-- After
|
||||
regex = "[^(]\\b(\\w+://\\S+[)/a-zA-Z0-9-]+)",
|
||||
format = "$1",
|
||||
highlight = 1,
|
||||
},
|
||||
-- implicit mailto link
|
||||
{
|
||||
regex = "\\b\\w+@[\\w-]+(\\.[\\w-]+)+\\b",
|
||||
format = "mailto:$0",
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user