/ wezterm / config / general.lua
general.lua
 1  return {
 2    -- behaviours
 3    automatically_reload_config = true,
 4    exit_behavior = 'CloseOnCleanExit', -- if the shell program exited with a successful status
 5    exit_behavior_messaging = 'Verbose',
 6    status_update_interval = 1000,
 7  
 8    -- This should be set to at least the sum of the number of lines in the panes in a tab.
 9    -- eg: if you have an 80x24 terminal split left/right then you should set this to at least 2x24 = 48
10    -- Setting it smaller than that will harm performance
11    line_quad_cache_size = 1024,
12  
13    -- Should also be set >= number of lines as above.
14    -- Values are relatively small, may not need adjustment.
15    line_state_cache_size = 1024,
16  
17    -- Should also be set >= number of lines as above.
18    -- Values are relatively small, may not need adjustment.
19    line_to_ele_shape_cache_size = 1024,
20  
21    -- should be >= the number of different attributed runs on the screen.
22    -- hard to suggest a min size: try reducing until you notice performance getting bad.
23    shape_cache_size = 1024,
24  
25    hyperlink_rules = {
26      -- Matches: a URL in parenthesis: (URL)
27      {
28        regex = '\\((\\w+://\\S+)\\)',
29        format = '$1',
30        highlight = 1,
31      },
32      -- Matches: a URL in brackets: [URL]
33      {
34        regex = '\\[(\\w+://\\S+)\\]',
35        format = '$1',
36        highlight = 1,
37      },
38      -- Matches: a URL in curly braces: {URL}
39      {
40        regex = '\\{(\\w+://\\S+)\\}',
41        format = '$1',
42        highlight = 1,
43      },
44      -- Matches: a URL in angle brackets: <URL>
45      {
46        regex = '<(\\w+://\\S+)>',
47        format = '$1',
48        highlight = 1,
49      },
50      -- Then handle URLs not wrapped in brackets
51      {
52        regex = '\\b\\w+://\\S+[)/a-zA-Z0-9-]+',
53        format = '$0',
54      },
55      -- implicit mail-to link
56      {
57        regex = '\\b\\w+@[\\w-]+(\\.[\\w-]+)+\\b',
58        format = 'mailto:$0',
59      },
60    },
61  }