aboutsummaryrefslogtreecommitdiff
path: root/plugins/settings.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/settings.lua')
-rw-r--r--plugins/settings.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/settings.lua b/plugins/settings.lua
index bbbdb3c..a489430 100644
--- a/plugins/settings.lua
+++ b/plugins/settings.lua
@@ -5,7 +5,14 @@ local common = require "core.common"
local command = require "core.command"
local keymap = require "core.keymap"
local style = require "core.style"
-local Widget = require "widget"
+
+-- check if widget is installed before proceeding
+local widget_found, Widget = pcall(require, "widget")
+if not widget_found then
+ core.error("Widget library not found: https://github.com/lite-xl/lite-xl-widgets")
+ return
+end
+
local Label = require "widget.label"
local Line = require "widget.line"
local NoteBook = require "widget.notebook"