BREAKING CHANGE: different color for keywords, numbers and more

experiments
Pocco81 3 years ago
parent 2cad6be547
commit ff28039437

@ -1,6 +1,7 @@
local M = {} local M = {}
function M.get(cp) function M.get(cp)
local keywords = cp.catppuccin3
return { return {
-- These groups are for the neovim tree-sitter highlights. -- These groups are for the neovim tree-sitter highlights.
-- As of writing, tree-sitter support is a WIP, group names may change. -- As of writing, tree-sitter support is a WIP, group names may change.
@ -9,16 +10,12 @@ function M.get(cp)
-- you explicitly want to support Treesitter's improved syntax awareness. -- you explicitly want to support Treesitter's improved syntax awareness.
TSField = { fg = cp.catppuccin10 }, -- For fields. TSField = { fg = cp.catppuccin10 }, -- For fields.
TSProperty = { fg = cp.catppuccin5, style = "italic" }, -- Same as `TSField`. TSProperty = { fg = cp.catppuccin5, style = "italic" }, -- Same as `TSField`.
TSParameter = { fg = cp.catppuccin2, style = "italic" }, -- For parameters of a function.
TSInclude = { fg = cp.catppuccin0, style = cnf.styles.keywords }, -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. TSInclude = { fg = cp.catppuccin0, style = cnf.styles.keywords }, -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
TSOperator = { fg = cp.catppuccin0 }, -- For any operator: `+`, but also `->` and `*` in cp. TSOperator = { fg = cp.catppuccin0 }, -- For any operator: `+`, but also `->` and `*` in cp.
TSKeywordOperator = { fg = cp.catppuccin0, style = cnf.styles.keywords }, -- For `new` keyword operator TSKeywordOperator = { fg = cp.catppuccin0, style = cnf.styles.keywords }, -- For `new` keyword operator
TSKeyword = { fg = cp.catppuccin4, style = cnf.styles.keywords }, -- For keywords that don't fall in previous categories.
TSBoolean = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For booleans. TSBoolean = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For booleans.
TSPunctSpecial = { fg = cp.catppuccin5 }, -- For special punctutation that does not fall in the catagories before. TSPunctSpecial = { fg = cp.catppuccin5 }, -- For special punctutation that does not fall in the catagories before.
TSRepeat = { fg = cp.catppuccin3, style = cnf.styles.keywords }, -- For keywords related to loops.
TSConditional = { fg = cp.catppuccin3, style = cnf.styles.keywords }, -- For keywords related to conditionnals.
TSConstructor = { fg = cp.catppuccin9 }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. TSConstructor = { fg = cp.catppuccin9 }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors.
-- builtin -- builtin
@ -29,7 +26,12 @@ function M.get(cp)
TSFunction = { fg = cp.catppuccin9, style = cnf.styles.functions }, -- For function (calls and definitions). TSFunction = { fg = cp.catppuccin9, style = cnf.styles.functions }, -- For function (calls and definitions).
TSFuncMacro = { fg = cp.catppuccin5 }, -- For macro defined functions (calls and definitions): each `macro_rules` in Ruscp. TSFuncMacro = { fg = cp.catppuccin5 }, -- For macro defined functions (calls and definitions): each `macro_rules` in Ruscp.
TSKeywordFunction = { fg = cp.catppuccin5, style = cnf.styles.keywords }, -- For keywords used to define a fuction.
TSParameter = { fg = cp.catppuccin2, style = "italic" }, -- For parameters of a function.
TSKeywordFunction = { fg = keywords, style = cnf.styles.keywords }, -- For keywords used to define a fuction.
TSKeyword = { fg = keywords, style = cnf.styles.keywords }, -- For keywords that don't fall in previous categories.
TSConditional = { fg = keywords, style = cnf.styles.keywords }, -- For keywords related to conditionnals.
TSRepeat = { fg = keywords, style = cnf.styles.keywords }, -- For keywords related to loops.
-- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
-- TSAttribute = { }; -- (unstable) TODO: docs -- TSAttribute = { }; -- (unstable) TODO: docs
@ -45,10 +47,10 @@ function M.get(cp)
-- rustTSField = { fg = cp.catppuccin12 }, -- For fields. -- rustTSField = { fg = cp.catppuccin12 }, -- For fields.
-- TSFloat = { }; -- For floats. -- TSFloat = { }; -- For floats.
TSLabel = { fg = cp.catppuccin9 }, -- For labels: `label:` in C and `:label:` in Lua. TSLabel = { fg = cp.catppuccin9 }, -- For labels: `label:` in C and `:label:` in Lua.
TSMethod = { fg = cp.catppuccin0, style = "italic" }; -- For method calls and definitions. TSMethod = { fg = cp.catppuccin9, style = "italic" }; -- For method calls and definitions.
TSNamespace = { fg = cp.catppuccin3, style = "italic" }, -- For identifiers referring to modules and namespaces. TSNamespace = { fg = cp.catppuccin2, style = "italic" }, -- For identifiers referring to modules and namespaces.
-- TSNone = { }; -- TODO: docs -- TSNone = { }; -- TODO: docs
TSNumber = { fg = cp.catppuccin8 }; -- For all numbers TSNumber = { fg = cp.catppuccin6 }; -- For all numbers
-- TSParameterReference= { }; -- For references to parameters of a function. -- TSParameterReference= { }; -- For references to parameters of a function.
tomlTSProperty = { fg = cp.catppuccin9 }, -- Differentiates between string and properties tomlTSProperty = { fg = cp.catppuccin9 }, -- Differentiates between string and properties
TSPunctDelimiter = { fg = cp.catppuccin11 }, -- For delimiters ie: `.` TSPunctDelimiter = { fg = cp.catppuccin11 }, -- For delimiters ie: `.`

Loading…
Cancel
Save