Slight cleanup of stuff

This commit is contained in:
elkowar 2021-05-09 12:03:15 +02:00
parent 5a5de804e3
commit ea0c5d9b78
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
3 changed files with 2 additions and 3 deletions

View file

@ -61,7 +61,7 @@
block (. args (+ i 1))] block (. args (+ i 1))]
(a.assoc block 1 name) (a.assoc block 1 name)
(when (. block :mod) (when (. block :mod)
(a.assoc block :config `#(require ,(. block :mod)))) (a.assoc block :config `#((. (require "utils") :safe-require) ,(. block :mod))))
(a.assoc block :mod nil) (a.assoc block :mod nil)
(table.insert use-statements block))) (table.insert use-statements block)))

View file

@ -6,7 +6,6 @@
bufferline bufferline bufferline bufferline
colors colors}}) colors colors}})
; :h bufferline-lua-highlights ; :h bufferline-lua-highlights
(let [selected {:guibg colors.neutral_aqua :guifg colors.dark0 :gui ""} (let [selected {:guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
visible {:guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}] visible {:guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]

View file

@ -48,7 +48,7 @@
(table.insert result (values l r))) (table.insert result (values l r)))
result)) result))
(defn- safe-require-plugin-config [name] (defn safe-require [name]
(xpcall (xpcall
#(require name) #(require name)
#(a.println (.. "Error sourcing " name ":\n" (fennel.traceback $1))))) #(a.println (.. "Error sourcing " name ":\n" (fennel.traceback $1)))))