Skip to content

Instantly share code, notes, and snippets.

@zew13
Created July 30, 2023 03:04
Show Gist options
  • Save zew13/2008b63e2c1e0ea4a481620de2b380b2 to your computer and use it in GitHub Desktop.
Save zew13/2008b63e2c1e0ea4a481620de2b380b2 to your computer and use it in GitHub Desktop.
local wezterm = require 'wezterm'
return {
font = wezterm.font_with_fallback {
{
family='FiraCode Nerd Font Mono',
weight="Bold"
},
{
family='Noto Sans CJK SC',
weight="Bold"
}
},
window_close_confirmation="NeverPrompt",
font_size = 16,
selection_word_boundary = '{}[]()"\'=`,;: ❯│',
hide_tab_bar_if_only_one_tab = true,
hyperlink_rules = {
-- Linkify things that look like URLs and the host has a TLD name.
-- Compiled-in default. Used if you don't specify any hyperlink_rules.
{
regex = [[\b\w+://[&a-zA-Z!\$\d_\.\?\-/%\[\]:=+#]*]],
format = '$0',
},
-- linkify email addresses
-- Compiled-in default. Used if you don't specify any hyperlink_rules.
{
regex = [[\b\w+@[\w-]+(\.[\w-]+)+\b]],
format = 'mailto:$0',
},
-- file:// URI
-- Compiled-in default. Used if you don't specify any hyperlink_rules.
{
regex = [[\bfile://\S*\b]],
format = '$0',
},
-- Linkify things that look like URLs with numeric addresses as hosts.
-- E.g. http://127.0.0.1:8000 for a local development server,
-- or http://192.168.1.1 for the web interface of many routers.
{
regex = [[\b\w+://(?:[\d]{1,3}\.){3}[\d]{1,3}\S*\b]],
format = '$0',
},
-- Make task numbers clickable
-- The first matched regex group is captured in $1.
{
regex = [[\b[tT](\d+)\b]],
format = 'https://example.com/tasks/?t=$1',
},
-- Make username/project paths clickable. This implies paths like the following are for GitHub.
-- ( "nvim-treesitter/nvim-treesitter" | wbthomason/packer.nvim | wez/wezterm | "wez/wezterm.git" )
-- As long as a full URL hyperlink regex exists above this it should not match a full URL to
-- GitHub or GitLab / BitBucket (i.e. https://gitlab.com/user/project.git is still a whole clickable URL)
-- {
-- regex = [[["]?([\w\d]{1}[-\w\d]+)(/){1}([-\w\d\.]+)["]?]],
-- format = 'https://www.github.com/$1/$3',
-- },
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment