feat: optional italic for variables (fix #8)

This commit is contained in:
Folke Lemaitre
2021-04-21 23:56:40 +02:00
parent b5a42b7aee
commit fc9adf1cfe
3 changed files with 5 additions and 3 deletions

View File

@@ -94,6 +94,7 @@ The theme comes in two styles, `storm` and a darker variant `night`.
| tokyonight_italic_comments | `true` | Make comments italic |
| tokyonight_italic_keywords | `true` | Make keywords italic |
| tokyonight_italic_functions | `false` | Make functions italic |
| tokyonight_italic_variables | `false` | Make variables and identifiers italic |
| tokyonight_transparent | `false` | Enable this to disable setting the background color |
| tokyonight_hide_inactive_statusline | `false` | Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. |
| tokyonight_sidebars | `{}` | Set a darker background on sidebar-like windows. For example: `["quickfix", "__vista__", "terminal"]` |

View File

@@ -17,6 +17,7 @@ config = {
commentStyle = opt("italic_comments", true) and "italic" or "NONE",
keywordStyle = opt("italic_keywords", true) and "italic" or "NONE",
functionStyle = opt("italic_functions", false) and "italic" or "NONE",
variableStyle = opt("italic_variables", false) and "italic" or "NONE",
hideInactiveStatusline = opt("hide_inactive_statusline", false),
terminalColors = opt("terminal_colors", true),
sidebars = opt("sidebars", {}),

View File

@@ -89,7 +89,7 @@ function M.setup(config)
-- Boolean = { }, -- a boolean constant: TRUE, false
-- Float = { }, -- a floating point constant: 2.3e10
Identifier = { fg = c.magenta }, -- (preferred) any variable name
Identifier = { fg = c.magenta, style = config.variableStyle }, -- (preferred) any variable name
Function = { fg = c.blue, style = config.functionStyle }, -- function name (also: methods for classes)
Statement = { fg = c.magenta }, -- (preferred) any statement
@@ -218,7 +218,7 @@ function M.setup(config)
-- TSSymbol = { }; -- For identifiers referring to symbols or atoms.
-- TSType = { }; -- For types.
-- TSTypeBuiltin = { }; -- For builtin types.
-- TSVariable = { }; -- Any variable name that does not have another highlight.
TSVariable = { style = config.variableStyle }, -- Any variable name that does not have another highlight.
TSVariableBuiltin = { fg = c.red }, -- Variable names that are defined by the languages, like `this` or `self`.
-- TSTag = { }; -- Tags like html tag names.
@@ -314,7 +314,7 @@ function M.setup(config)
-- Sneak
Sneak = { fg = c.bg_highlight, bg = c.magenta },
SneakScope = { bg = c.bg_visual }
SneakScope = { bg = c.bg_visual },
}
-- LuaLine