feat: improved syntax with everyones\' suggestions

experiments
Pocco81 3 years ago
parent 5c729699a1
commit 9597a647f1

@ -7,54 +7,58 @@ function M.get(cp)
-- By default, most of these groups link to an appropriate Vim group, -- By default, most of these groups link to an appropriate Vim group,
-- 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.catppuccin10 }, -- For fields.
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.
TSOperator = { fg = cp.catppuccin0 }, -- For any operator: `+`, but also `->` and `*` in cp.
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.
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.
-- builtin
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.
TSTypeBuiltin = { fg = cp.catppuccin8, style = cnf.styles.keywords }, -- For builtin types.
TSVariableBuiltin = { fg = cp.catppuccin8, style = cnf.styles.keywords }, -- 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).
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.
-- 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
TSBoolean = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For booleans.
-- TSCharacter = { }; -- For characters. -- TSCharacter = { }; -- For characters.
-- TScatppuccin11 = { }; -- For catppuccin11 blocks. -- TScatppuccin11 = { }; -- For catppuccin11 blocks.
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 },
TSConstructor = { fg = cp.catppuccin8 }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors.
TSConditional = { fg = cp.catppuccin5, style = cnf.styles.keywords }, -- For keywords related to conditionnals.
TSConstant = { fg = cp.catppuccin6 }, -- For constants TSConstant = { fg = cp.catppuccin6 }, -- For constants
TSConstBuiltin = { fg = cp.catppuccin6, style = cnf.styles.keywords }, -- For constant that are built in the language: `nil` in Lua.
-- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in cp. -- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in cp.
-- TSError = { }; -- For syntax/parser errors. -- TSError = { }; -- For syntax/parser errors.
TSException = { fg = cp.catppuccin3, style = cnf.styles.keywords }, -- For exception related keywords. TSException = { fg = cp.catppuccin3, style = cnf.styles.keywords }, -- For exception related keywords.
TSField = { fg = cp.catppuccin0 }, -- For fields.
-- rustTSField = { fg = cp.catppuccin12 }, -- For fields. -- rustTSField = { fg = cp.catppuccin12 }, -- For fields.
-- TSFloat = { }; -- For floats. -- TSFloat = { }; -- For floats.
TSFunction = { fg = cp.catppuccin9, style = cnf.styles.functions }, -- For function (calls and definitions).
TSFuncBuiltin = { fg = cp.catppuccin6 }, -- For builtin functions: `table.insert` in Lua.
TSFuncMacro = { fg = cp.catppuccin5 }, -- For macro defined functions (calls and definitions): each `macro_rules` in Ruscp.
TSInclude = { fg = cp.catppuccin0, style = cnf.styles.keywords }, -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
TSKeyword = { fg = cp.catppuccin4, style = cnf.styles.keywords }, -- For keywords that don't fall in previous categories.
TSKeywordFunction = { fg = cp.catppuccin3, style = cnf.styles.keywords }, -- For keywords used to define a fuction.
TSKeywordOperator = { fg = cp.catppuccin4, style = cnf.styles.keywords }, -- For `new` keyword operator
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 = { }; -- For method calls and definitions. -- TSMethod = { }; -- For method calls and definitions.
TSNamespace = { fg = cp.catppuccin3, style = "italic" }, -- For identifiers referring to modules and namespaces. TSNamespace = { fg = cp.catppuccin3, style = "italic" }, -- For identifiers referring to modules and namespaces.
-- TSNone = { }; -- TODO: docs -- TSNone = { }; -- TODO: docs
-- TSNumber = { }; -- For all numbers -- TSNumber = { }; -- For all numbers
TSOperator = { fg = cp.catppuccin4 }, -- For any operator: `+`, but also `->` and `*` in cp.
TSParameter = { fg = cp.catppuccin2, style = "italic" }, -- For parameters of a function.
-- TSParameterReference= { }; -- For references to parameters of a function. -- TSParameterReference= { }; -- For references to parameters of a function.
TSProperty = { fg = cp.catppuccin0, style = "italic" }, -- Same as `TSField`.
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.
TSPunctSpecial = { fg = cp.catppuccin0 }, -- For special punctutation that does not fall in the catagories before.
TSRepeat = { fg = cp.catppuccin5, style = cnf.styles.keywords }, -- For keywords related to loops.
-- TSString = { }; -- For strings. -- TSString = { }; -- For strings.
TSStringRegex = { fg = cp.catppuccin9, style = cnf.styles.strings }, -- For regexes. TSStringRegex = { fg = cp.catppuccin9, style = cnf.styles.strings }, -- For regexes.
TSStringEscape = { fg = cp.catppuccin4, style = cnf.styles.strings }, -- For escape characters within a string. TSStringEscape = { fg = cp.catppuccin4, style = cnf.styles.strings }, -- For escape characters within a string.
-- TSSymbol = { }; -- For identifiers referring to symbols or atoms. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms.
-- TSType = { }; -- For types. -- TSType = { }; -- For types.
TSTypeBuiltin = { fg = cp.catppuccin8, style = cnf.styles.keywords }, -- For builtin types.
TSVariable = { style = cnf.styles.variables }, -- Any variable name that does not have another highlighcp. TSVariable = { style = cnf.styles.variables }, -- Any variable name that does not have another highlighcp.
TSVariableBuiltin = { fg = cp.catppuccin5, style = cnf.styles.keywords }, -- Variable names that are defined by the languages, like `this` or `self`.
-- TSTag = { }; -- Tags like html tag names. -- TSTag = { }; -- Tags like html tag names.
-- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/` -- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/`
-- TSText = { }; -- For strings considecatppuccin5 text in a markup language. -- TSText = { }; -- For strings considecatppuccin5 text in a markup language.

Loading…
Cancel
Save