Skip to content

Commit dd84883

Browse files
committed
fix(lspsaga): guard against nil colors_name in catppuccin check
vim.g.colors_name is nil until a colorscheme is applied (verified via nvim --clean), so calling :find() on it directly could error if this module loads before any :colorscheme. Coalesce to an empty string.
1 parent 11c975f commit dd84883

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/modules/configs/completion/lspsaga.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ return function()
33

44
-- Only align kind icons to catppuccin's set when catppuccin is the active
55
-- colorscheme; other themes fall back to Lspsaga's built-in icons untouched.
6-
local has_catppuccin = vim.g.colors_name:find("catppuccin") ~= nil
6+
local has_catppuccin = (vim.g.colors_name or ""):find("catppuccin") ~= nil
77

88
local icons = {
99
cmp = require("modules.utils.icons").get("cmp", true),

0 commit comments

Comments
 (0)