From 13bd3b37045b02795461aa794c3127a6df7fd55b Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 12 Jan 2025 19:36:57 +0000 Subject: [PATCH] Add support for loading ~/.config/wezterm/local.lua config --- wezterm.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wezterm.lua b/wezterm.lua index e478482..2101e43 100644 --- a/wezterm.lua +++ b/wezterm.lua @@ -82,4 +82,13 @@ for _, map in pairs({ }) end +-- Attempt require(module) load a module, don't fail if its missing. +-- Additionally, call the returned function passing in the wezterm and config +-- objects defined in this file. +local try_require = function(module) + pcall(function() require(module)(wezterm, config) end) +end; + +try_require('local') + return config