BREAKING CHANGE: updated palette and treesitter conf

experiments
Pocco81 3 years ago
parent 46f8fe8ddc
commit 13a53888ac

@ -1,13 +1,13 @@
local color_palette = { local color_palette = {
-- morning palette -- morning palette
catppuccin0 = "#9FDECD", catppuccin0 = "#AEE3B8",
catppuccin2 = "#F0C8CC", catppuccin2 = "#F2CECF",
catppuccin3 = "#D0A6EB", catppuccin4 = "#E5B4E2",
catppuccin4 = "#F1B4E3", catppuccin3 = "#CCA5E5",
catppuccin5 = "#E28A8D", catppuccin5 = "#E28A8D",
catppuccin6 = "#F7C185", catppuccin6 = "#F9C096",
catppuccin7 = "#B2E1A3", catppuccin7 = "#BEE4ED",
catppuccin8 = "#EADDA0", catppuccin8 = "#EBDDAD",
catppuccin9 = "#A4B9EF", catppuccin9 = "#A4B9EF",
-- night palette -- night palette
@ -19,7 +19,7 @@ local color_palette = {
catppuccin11 = "#6E6C7E", catppuccin11 = "#6E6C7E",
catppuccin17 = "#988BA2", catppuccin17 = "#988BA2",
catppuccin15 = "#C3BAC6", catppuccin15 = "#C3BAC6",
catppuccin10 = "#DDDDEB", catppuccin10 = "#D6D7E5",
} }
return color_palette return color_palette

@ -1,7 +1,8 @@
local M = {} local M = {}
function M.get(cp) function M.get(cp)
local keywords = cp.catppuccin3 local keywords = cp.catppuccin4
local operators = cp.catppuccin7
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,30 +10,30 @@ function M.get(cp)
-- TSError -> Error for example, so you do not have to define these unless -- TSError -> Error for example, so you do not have to define these unless
-- you explicitly want to support Treesitter's improved syntax awareness. -- you explicitly want to support Treesitter's improved syntax awareness.
TSField = { fg = cp.catppuccin2 }, -- For fields. TSField = { fg = cp.catppuccin2 }, -- For fields.
TSProperty = { fg = cp.catppuccin5, style = "italic" }, -- Same as `TSField`. TSProperty = { fg = cp.catppuccin8, style = "italic" }, -- Same as TSField.
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.catppuccin5, style = "italic" }, -- 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 = operators, style = "bold" }, -- For any operator: +, but also -> and * in cp.
TSKeywordOperator = { fg = cp.catppuccin0, style = cnf.styles.keywords }, -- For `new` keyword operator TSKeywordOperator = { fg = operators, style = "bold" }, -- For new keyword operator
TSBoolean = { fg = cp.catppuccin8, style = cnf.styles.keywords }, -- For booleans. TSBoolean = { fg = cp.catppuccin8, 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.
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.
TSConstant = { fg = cp.catppuccin2 }, -- For constants
TSConditional = { fg = keywords, style = cnf.styles.keywords }, -- For keywords related to conditionnals.
TSRepeat = { fg = keywords, style = cnf.styles.keywords }, -- For keywords related to loops.
TSException = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For exception related keywords.
-- builtin -- builtin
TSConstBuiltin = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For constant that are built in the language: `nil` in Lua. TSConstBuiltin = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For constant that are built in the language: nil in Lua.
TSFuncBuiltin = { fg = cp.catppuccin6 }, -- For builtin functions: `table.insert` in Lua. TSFuncBuiltin = { fg = cp.catppuccin6, style = "italic" }, -- For builtin functions: table.insert in Lua.
TSTypeBuiltin = { fg = cp.catppuccin8, style = cnf.styles.keywords }, -- For builtin types. TSTypeBuiltin = { fg = cp.catppuccin5, style = "italic" }, -- For builtin types.
TSVariableBuiltin = { fg = cp.catppuccin8, style = cnf.styles.keywords }, -- Variable names that are defined by the languages, like `this` or `self`. TSVariableBuiltin = { fg = cp.catppuccin5, style = "italic" }, -- Variable names that are defined by the languages, like this or self.
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.
TSParameter = { fg = cp.catppuccin2, style = "italic" }, -- For parameters of a function. 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. TSKeywordFunction = { fg = cp.catppuccin4, 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. 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
-- TSCharacter = { }; -- For characters. -- TSCharacter = { }; -- For characters.
@ -40,30 +41,28 @@ function M.get(cp)
TSNote = { fg = cp.catppuccin1, bg = cp.catppuccin9 }, TSNote = { fg = cp.catppuccin1, bg = cp.catppuccin9 },
TSWarning = { fg = cp.catppuccin1, bg = cp.catppuccin8 }, TSWarning = { fg = cp.catppuccin1, bg = cp.catppuccin8 },
TSDanger = { fg = cp.catppuccin1, bg = cp.catppuccin5 }, TSDanger = { fg = cp.catppuccin1, bg = cp.catppuccin5 },
TSConstant = { fg = cp.catppuccin2 }, -- For constants -- TSConstMacro = { }; -- For constants that are defined by macros: NULL in cp.
-- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in cp. TSError = { fg = cp.catppuccin5 }, -- For syntax/parser errors.
-- TSError = { }; -- For syntax/parser errors.
TSException = { fg = cp.catppuccin3, style = cnf.styles.keywords }, -- For exception related keywords.
-- 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.catppuccin9, style = "italic" }; -- For method calls and definitions. TSMethod = { fg = cp.catppuccin9, style = "italic" }, -- For method calls and definitions.
TSNamespace = { fg = cp.catppuccin2, 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.catppuccin6 }; -- For all numbers TSNumber = { fg = cp.catppuccin8 }, -- 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: .
TSPunctBracket = { fg = cp.catppuccin11 }, -- For brackets and parenthesis. TSPunctBracket = { fg = cp.catppuccin11 }, -- For brackets and parenthesis.
TSString = { fg = cp.catppuccin7 }; -- For strings. TSString = { fg = cp.catppuccin0 }, -- For strings.
TSStringRegex = { fg = cp.catppuccin9, style = cnf.styles.strings }, -- For regexes. TSStringRegex = { fg = cp.catppuccin6, style = cnf.styles.strings }, -- For regexes.
-- TSSymbol = { }; -- For identifiers referring to symbols or atoms. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms.
-- TSType = { }; -- For types. TSType = { fg = cp.catppuccin8 }; -- For types.
TSVariable = { fg = cp.catppuccin10, style = cnf.styles.variables }, -- Any variable name that does not have another highlighcp. TSVariable = { fg = cp.catppuccin10, style = cnf.styles.variables }, -- Any variable name that does not have another highlighcp.
TSTagAttribute = { fg = cp.catppuccin3, style = "italic" }; -- Tags like html tag names. TSTagAttribute = { fg = cp.catppuccin3, style = "italic" }, -- Tags like html tag names.
-- TSTag = { }; -- Tags like html tag names. -- TSTag = { }; -- Tags like html tag names.
-- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/` -- TSTagDelimiter = { }; -- Tag delimiter like < > /
TSText = { fg = cp.catppuccin10 }; -- For strings considerated text in a markup language. TSText = { fg = cp.catppuccin10 }, -- For strings considerated text in a markup language.
-- TSEmphasis = { }; -- For text to be represented with emphasis. -- TSEmphasis = { }; -- For text to be represented with emphasis.
-- TSUnderline = { }; -- For text to be represented with an underline. -- TSUnderline = { }; -- For text to be represented with an underline.
-- TSStrike = { }; -- For strikethrough texcp. -- TSStrike = { }; -- For strikethrough texcp.

@ -84,7 +84,7 @@ local function get_base()
-- code itself -- code itself
Constant = { fg = cp.catppuccin6 }, -- (prefercatppuccin5) any constant Constant = { fg = cp.catppuccin6 }, -- (prefercatppuccin5) any constant
String = { fg = cp.catppuccin7, style = cnf.styles.strings }, -- a string constant: "this is a string" String = { fg = cp.catppuccin0, style = cnf.styles.strings }, -- a string constant: "this is a string"
Character = { fg = cp.catppuccin7 }, -- a character constant: 'c', '\n' Character = { fg = cp.catppuccin7 }, -- a character constant: 'c', '\n'
Number = { fg = cp.catppuccin6 }, -- a number constant: 234, 0xff Number = { fg = cp.catppuccin6 }, -- a number constant: 234, 0xff
Float = { fg = cp.catppuccin6 }, -- a floating point constant: 2.3e10 Float = { fg = cp.catppuccin6 }, -- a floating point constant: 2.3e10
@ -105,11 +105,11 @@ local function get_base()
-- Macro = { }, -- same as Define -- Macro = { }, -- same as Define
-- PreCondit = { }, -- preprocessor #if, #else, #endif, etcp. -- PreCondit = { }, -- preprocessor #if, #else, #endif, etcp.
Type = { fg = cp.catppuccin8 }, -- (prefercatppuccin5) int, long, char, etcp.
StorageClass = { fg = cp.catppuccin8 }, -- static, register, volatile, etcp. StorageClass = { fg = cp.catppuccin8 }, -- static, register, volatile, etcp.
Structure = { fg = cp.catppuccin8 }, -- struct, union, enum, etcp. Structure = { fg = cp.catppuccin8 }, -- struct, union, enum, etcp.
Typedef = { fg = cp.catppuccin8 }, -- A typedef Typedef = { fg = cp.catppuccin8 }, -- A typedef
Special = { fg = cp.catppuccin9 }, -- (prefercatppuccin5) any special symbol Special = { fg = cp.catppuccin4 }, -- (prefercatppuccin5) any special symbol
Type = { fg = cp.catppuccin9 }, -- (prefercatppuccin5) int, long, char, etcp.
-- SpecialChar = { }, -- special character in a constant -- SpecialChar = { }, -- special character in a constant
-- Tag = { }, -- you can use CTRL-] on this -- Tag = { }, -- you can use CTRL-] on this
-- Delimiter = { }, -- character that needs attention -- Delimiter = { }, -- character that needs attention

Loading…
Cancel
Save