From 699aa9cd153dd14c00405fa26a7b9d93aed6dbe2 Mon Sep 17 00:00:00 2001
From: Marco Galli <marco.galli@protonmail.com>
Date: Tue, 14 Jun 2022 23:15:47 +0200
Subject: Fix WinSeparator hl and make it consistent with Telescope window
 borders, also make the configuration variables actually work (#3)

* Fix WinSeparator hl and make it consistent with Telescope border color

* Make config variables work
README configuration description

* Remove useless comment
---
 lua/no-clown-fiesta/Packer.lua     |  0
 lua/no-clown-fiesta/Treesitter.lua | 10 +++++-----
 lua/no-clown-fiesta/config.lua     | 10 +++++-----
 lua/no-clown-fiesta/highlights.lua | 13 +++++++------
 lua/no-clown-fiesta/init.lua       |  2 +-
 5 files changed, 18 insertions(+), 17 deletions(-)
 delete mode 100644 lua/no-clown-fiesta/Packer.lua

(limited to 'lua/no-clown-fiesta')

diff --git a/lua/no-clown-fiesta/Packer.lua b/lua/no-clown-fiesta/Packer.lua
deleted file mode 100644
index e69de29..0000000
diff --git a/lua/no-clown-fiesta/Treesitter.lua b/lua/no-clown-fiesta/Treesitter.lua
index bb79c38..4fe5d24 100644
--- a/lua/no-clown-fiesta/Treesitter.lua
+++ b/lua/no-clown-fiesta/Treesitter.lua
@@ -1,5 +1,5 @@
 local Treesitter = {
-  TSComment = { fg = C.medium_gray },
+  TSComment = { fg = C.medium_gray, style = Config.italic_comments },
   TSAnnotation = { fg = C.white },
   TSAttribute = { fg = C.white },
   TSConstructor = { fg = C.white },
@@ -8,8 +8,8 @@ local Treesitter = {
   TSConditional = { fg = C.gray_blue },
   TSException = { fg = C.red },
   TSInclude = { fg = C.red },
-  TSKeyword = { fg = C.gray_blue },
-  TSKeywordFunction = { fg = C.purple },
+  TSKeyword = { fg = C.gray_blue, style = Config.italic_keywords },
+  TSKeywordFunction = { fg = C.purple, style = Config.italic_keywords },
   TSLabel = { fg = C.white },
   TSNamespace = { fg = C.white },
   TSRepeat = { fg = C.gray_blue },
@@ -20,12 +20,12 @@ local Treesitter = {
   TSBoolean = { fg = C.blue },
   TSCharacter = { fg = C.light_green },
   TSError = { fg = C.error_red },
-  TSFunction = { fg = C.cyan },
+  TSFunction = { fg = C.cyan, style = Config.italic_functions },
   TSFuncBuiltin = { fg = C.cyan },
   TSMethod = { fg = C.cyan },
   TSConstMacro = { fg = C.cyan },
   TSFuncMacro = { fg = C.cyan },
-  TSVariable = { fg = C.white },
+  TSVariable = { fg = C.white, style = Config.italic_variables },
   TSVariableBuiltin = { fg = C.white },
   TSProperty = { fg = C.white },
   TSOperator = { fg = C.white },
diff --git a/lua/no-clown-fiesta/config.lua b/lua/no-clown-fiesta/config.lua
index ebac710..21d030f 100644
--- a/lua/no-clown-fiesta/config.lua
+++ b/lua/no-clown-fiesta/config.lua
@@ -13,11 +13,11 @@ local function opt(key, default)
 end
 
 config = {
-  transparent_background = opt("transparent_background", false),
-  italic_comments = opt("italic_keywords", true) and "italic" or "NONE",
-  italic_keywords = opt("italic_keywords", true) and "italic" or "NONE",
-  italic_functions = opt("italic_function", false) and "italic" or "NONE",
-  italic_variables = opt("italic_variables", true) and "italic" or "NONE",
+  transparent_background = opt("transparent_background", false) and "NONE" or C.bg,
+  italic_comments = opt("italic_comments", true) and "italic" or "NONE",
+  italic_keywords = opt("italic_keywords", false) and "italic" or "NONE",
+  italic_functions = opt("italic_functions", false) and "italic" or "NONE",
+  italic_variables = opt("italic_variables", false) and "italic" or "NONE",
 }
 
 return config
diff --git a/lua/no-clown-fiesta/highlights.lua b/lua/no-clown-fiesta/highlights.lua
index 98c766b..5b562c8 100644
--- a/lua/no-clown-fiesta/highlights.lua
+++ b/lua/no-clown-fiesta/highlights.lua
@@ -1,5 +1,5 @@
 local highlights = {
-  Normal = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg },
+  Normal = { fg = C.fg, bg = Config.transparent_background },
   SignColumn = { bg = C.bg },
   MsgArea = { fg = C.fg, bg = C.bg },
   ModeMsg = { fg = C.fg, bg = C.bg },
@@ -13,7 +13,7 @@ local highlights = {
   PmenuSel = { fg = C.blue, bg = C.alt_bg },
   WildMenu = { fg = C.blue, bg = C.alt_bg },
   CursorLineNr = { fg = C.light_gray, style = "bold" },
-  Comment = { fg = C.blue, style = "italic" },
+  Comment = { fg = C.blue, style = Config.italic_comments },
   Folded = { fg = C.light_gray, bg = C.alt_bg },
   FoldColumn = { fg = C.light_gray, bg = C.alt_bg },
   LineNr = { fg = C.gray },
@@ -54,7 +54,7 @@ local highlights = {
   Question = { fg = C.cyan },
   EndOfBuffer = { fg = C.bg },
   NonText = { fg = C.bg },
-  Variable = { fg = C.white },
+  Variable = { fg = C.white, style = Config.italic_variables },
   String = { fg = C.blue },
   Character = { fg = C.light_green },
   Constant = { fg = C.orange },
@@ -62,13 +62,13 @@ local highlights = {
   Boolean = { fg = C.red },
   Float = { fg = C.red },
   Identifier = { fg = C.white },
-  Function = { fg = C.purple },
+  Function = { fg = C.purple, style = Config.italic_functions },
   Operator = { fg = C.orange },
   Type = { fg = C.white },
   StorageClass = { fg = C.yellow },
   Structure = { fg = C.orange },
   Typedef = { fg = C.purple },
-  Keyword = { fg = C.orange },
+  Keyword = { fg = C.orange, style = Config.italic_keywords },
   Statement = { fg = C.orange },
   Conditional = { fg = C.orange },
   Repeat = { fg = C.orange },
@@ -84,7 +84,7 @@ local highlights = {
   Tag = { fg = C.pale_purple },
   Debug = { fg = C.red },
   Delimiter = { fg = C.gray },
-  SpecialComment = { fg = C.blue },
+  SpecialComment = { fg = C.blue, style = Config.italic_comments },
   Underlined = { style = "underline" },
   Bold = { style = "bold" },
   Italic = { style = "italic" },
@@ -94,6 +94,7 @@ local highlights = {
   TabLine = { fg = C.gray, bg = C.alt_bg },
   TabLineSel = { fg = C.white, bg = C.alt_bg },
   TabLineFill = { fg = C.white, bg = C.alt_bg },
+  WinSeparator = { fg = C.medium_gray, bg = C.bg },
 }
 
 return highlights
diff --git a/lua/no-clown-fiesta/init.lua b/lua/no-clown-fiesta/init.lua
index 0af7b70..8780f2f 100644
--- a/lua/no-clown-fiesta/init.lua
+++ b/lua/no-clown-fiesta/init.lua
@@ -7,8 +7,8 @@ vim.o.termguicolors = true
 vim.g.colors_name = "no-clown-fiesta"
 
 local util = require "no-clown-fiesta.util"
-Config = require "no-clown-fiesta.config"
 C = require "no-clown-fiesta.palette"
+Config = require "no-clown-fiesta.config"
 
 local Alpha = require "no-clown-fiesta.Alpha"
 local Git = require "no-clown-fiesta.Git"
-- 
cgit v1.2.3-70-g09d2