From 0fb0ca6dc0fa03e7d9392a88d4793388045b6861 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Wed, 25 Aug 2021 21:25:21 -0500 Subject: [PATCH] fix: formatting (luafmt), naming conventions and assertion --- lua/catppuccino/core/integrations/nvimtree.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lua/catppuccino/core/integrations/nvimtree.lua b/lua/catppuccino/core/integrations/nvimtree.lua index b808772..48e59f7 100644 --- a/lua/catppuccino/core/integrations/nvimtree.lua +++ b/lua/catppuccino/core/integrations/nvimtree.lua @@ -2,14 +2,11 @@ local M = {} function M.get(cpt) local config = require("catppuccino.config").options - local rootFolderColor = cpt.black - if - config.integrations - and config.integrations.nvimtree - and type(config.integrations.nvimtree) == "table" - and config.integrations.nvimtree.show_root - then - rootFolderColor = cpt.blue + + local root_dir_color = cpt.bg_sidebar + + if (config.integrations.nvimtree.show_root) then + root_dir_color = cpt.blue end return { @@ -20,7 +17,7 @@ function M.get(cpt) NvimTreeEmptyFolderName = {fg = cpt.blue_br}, NvimTreeIndentMarker = {fg = cpt.comment}, NvimTreeVertSplit = {fg = cpt.black, bg = cpt.black}, - NvimTreeRootFolder = {fg = rootFolderColor, style = "bold"}, + NvimTreeRootFolder = {fg = root_dir_color, style = "bold"}, NvimTreeSymlink = {fg = cpt.magenta}, NvimTreeStatuslineNc = {fg = cpt.black, bg = cpt.black}, NvimTreeGitDirty = {fg = cpt.git.change},