mirror of https://github.com/sgoudham/nvim.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
6.8 KiB
Lua
117 lines
6.8 KiB
Lua
3 years ago
|
local M = {}
|
||
|
|
||
2 years ago
|
function M.get()
|
||
3 years ago
|
-- local delimeters = cp.overlay2
|
||
3 years ago
|
local operators = cp.sky
|
||
3 years ago
|
local cl = cp.mauve -- conditionals, loops
|
||
3 years ago
|
local keywords = cp.mauve
|
||
3 years ago
|
|
||
3 years ago
|
local math_logic = cp.peach
|
||
3 years ago
|
return {
|
||
|
-- These groups are for the neovim tree-sitter highlights.
|
||
|
-- As of writing, tree-sitter support is a WIP, group names may change.
|
||
|
-- 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
|
||
|
-- you explicitly want to support Treesitter's improved syntax awareness.
|
||
3 years ago
|
TSField = { fg = cp.teal }, -- For fields.
|
||
2 years ago
|
TSProperty = { fg = cp.teal, style = cnf.styles.properties or {} }, -- Same as TSField.
|
||
3 years ago
|
|
||
2 years ago
|
TSInclude = { fg = cp.mauve, style = cnf.styles.keywords or {} }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua.
|
||
|
TSOperator = { fg = operators, style = cnf.styles.operators or {} }, -- For any operator: +, but also -> and * in cp.
|
||
|
TSKeywordOperator = { fg = cp.mauve, style = cnf.styles.operators or {} }, -- For new keyword operator
|
||
|
TSPunctSpecial = { fg = cp.sky, style = cnf.styles.operators or {} }, -- For special punctutation that does not fall in the catagories before.
|
||
3 years ago
|
|
||
2 years ago
|
TSFloat = { fg = math_logic, style = cnf.styles.numbers or {} }, -- For floats.
|
||
|
TSNumber = { fg = math_logic, style = cnf.styles.numbers or {} }, -- For all numbers
|
||
|
TSBoolean = { fg = math_logic, style = cnf.styles.booleans or {} }, -- For booleans.
|
||
3 years ago
|
|
||
3 years ago
|
TSConstructor = { fg = cp.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
|
||
3 years ago
|
TSConstant = { fg = cp.peach }, -- For constants
|
||
2 years ago
|
TSConditional = { fg = cl, style = cnf.styles.conditionals or {} }, -- For keywords related to conditionnals.
|
||
|
TSRepeat = { fg = cl, style = cnf.styles.loops or {} }, -- For keywords related to loops.
|
||
|
TSException = { fg = cp.mauve, style = cnf.styles.keywords or {} }, -- For exception related keywords.
|
||
3 years ago
|
|
||
|
-- builtin
|
||
2 years ago
|
TSConstBuiltin = { fg = cp.peach, style = cnf.styles.keywords or {} }, -- For constant that are built in the language: nil in Lua.
|
||
|
TSFuncBuiltin = { fg = cp.peach, style = cnf.styles.functions or {} }, -- For builtin functions: table.insert in Lua.
|
||
3 years ago
|
|
||
2 years ago
|
TSNamespace = { fg = cp.blue, style = { "italic" } }, -- For identifiers referring to modules and namespaces.
|
||
|
TSType = { fg = cp.yellow, style = cnf.styles.types or {} }, -- For types.
|
||
3 years ago
|
TSTypeBuiltin = { fg = cp.yellow, style = cnf.styles.properties or "italic" }, -- For builtin types.
|
||
3 years ago
|
TSVariableBuiltin = { fg = cp.red }, -- Variable names that are defined by the languages, like this or self.
|
||
3 years ago
|
|
||
2 years ago
|
TSFunction = { fg = cp.blue, style = cnf.styles.functions or {} }, -- For function (calls and definitions).
|
||
|
TSFuncMacro = { fg = cp.teal, style = cnf.styles.functions or {} }, -- For macro defined functions (calls and definitions): each macro_rules in Ruscp.
|
||
|
TSParameter = { fg = cp.maroon, style = { "italic" } }, -- For parameters of a function.
|
||
|
TSKeywordFunction = { fg = cp.mauve, style = cnf.styles.keywords or {} }, -- For keywords used to define a fuction.
|
||
|
TSKeyword = { fg = keywords, style = cnf.styles.keywords or {} }, -- For keywords that don't fall in previous categories.
|
||
|
TSKeywordReturn = { fg = cp.mauve, style = cnf.styles.keywords or {} },
|
||
3 years ago
|
-- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
|
||
|
-- TSAttribute = { }; -- (unstable) TODO: docs
|
||
|
-- TSCharacter = { }; -- For characters.
|
||
3 years ago
|
-- TSoverlay0 = { }; -- For overlay0 blocks.
|
||
3 years ago
|
TSNote = { fg = cp.base, bg = cp.blue },
|
||
|
TSWarning = { fg = cp.base, bg = cp.yellow },
|
||
|
TSDanger = { fg = cp.base, bg = cp.red },
|
||
3 years ago
|
TSConstMacro = { fg = cp.mauve }; -- For constants that are defined by macros: NULL in cp.
|
||
3 years ago
|
-- TSError = { fg = cp.red }, -- For syntax/parser errors.
|
||
3 years ago
|
-- rustTSField = { fg = cp.surface1 }, -- For fields.
|
||
3 years ago
|
TSLabel = { fg = cp.sapphire }, -- For labels: label: in C and :label: in Lua.
|
||
2 years ago
|
TSMethod = { fg = cp.blue, style = cnf.styles.functions or {} }, -- For method calls and definitions.
|
||
3 years ago
|
-- TSNone = { }; -- TODO: docs
|
||
|
-- TSParameterReference= { }; -- For references to parameters of a function.
|
||
3 years ago
|
tomlTSProperty = { fg = cp.blue }, -- Differentiates between string and properties
|
||
3 years ago
|
TSPunctDelimiter = { fg = cp.overlay2 }, -- For delimiters ie: .
|
||
3 years ago
|
-- TSPunctBracket = { fg = delimeters }, -- For brackets and parenthesis.
|
||
3 years ago
|
TSPunctBracket = { fg = cp.overlay2 }, -- For brackets and parenthesis.
|
||
2 years ago
|
TSString = { fg = cp.green, style = cnf.styles.strings or {} }, -- For strings.
|
||
|
TSStringRegex = { fg = cp.peach, style = cnf.styles.strings or {} }, -- For regexes.
|
||
3 years ago
|
-- TSSymbol = { }; -- For identifiers referring to symbols or atoms.
|
||
2 years ago
|
TSVariable = { fg = cp.text, style = cnf.styles.variables or {} }, -- Any variable name that does not have another highlighcp.
|
||
|
TSTagAttribute = { fg = cp.teal, style = { "italic" } }, -- Tags like html tag names.
|
||
3 years ago
|
TSTag = { fg = cp.mauve }, -- Tags like html tag names.
|
||
|
TSTagDelimiter = { fg = cp.sky }, -- Tag delimiter like < > /
|
||
3 years ago
|
TSText = { fg = cp.text }, -- For strings considerated text in a markup language.
|
||
3 years ago
|
-- TSEmphasis = { }; -- For text to be represented with emphasis.
|
||
|
-- TSUnderline = { }; -- For text to be represented with an underline.
|
||
3 years ago
|
-- TSStrike = { }; -- For strikethrough texcp.
|
||
3 years ago
|
-- TSTitle = { }; -- Text that is part of a title.
|
||
3 years ago
|
-- TSLiteral = { }; -- Literal texcp.
|
||
3 years ago
|
-- TSURI = { }; -- Any URI like a link or email.
|
||
|
--
|
||
3 years ago
|
-- Markdown tresitter parser support
|
||
2 years ago
|
TSURI = { fg = cp.rosewater, style = { "italic", "underline" } }, -- urls, links and emails
|
||
2 years ago
|
TSLiteral = { fg = cp.teal, style = { "italic" } }, -- used for inline code in markdown and for doc in python (""")
|
||
|
TSTextReference = { fg = cp.lavender, style = { "bold" } }, -- references
|
||
|
TSTitle = { fg = cp.blue, style = { "bold" } }, -- titles like: # Example
|
||
|
TSEmphasis = { fg = cp.maroon, style = { "italic" } }, -- bold
|
||
|
TSStrong = { fg = cp.maroon, style = { "bold" } }, -- italic
|
||
3 years ago
|
TSStringEscape = { fg = cp.pink, style = cnf.styles.strings }, -- For escape characters within a string.
|
||
3 years ago
|
|
||
|
-- bash
|
||
2 years ago
|
-- bashTSFuncBuiltin = { fg = cp.red, style = { "italic" } },
|
||
|
-- bashTSParameter = { fg = cp.yellow, style = { "italic" } },
|
||
3 years ago
|
|
||
3 years ago
|
-- json
|
||
3 years ago
|
jsonTSLabel = { fg = cp.blue }, -- For labels: label: in C and :label: in Lua.
|
||
3 years ago
|
|
||
3 years ago
|
-- lua
|
||
|
luaTSConstructor = { fg = cp.lavender }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
|
||
3 years ago
|
|
||
3 years ago
|
-- typescript
|
||
3 years ago
|
typescriptTSConstructor = { fg = cp.lavender },
|
||
|
|
||
3 years ago
|
-- TSX (Typescript React)
|
||
3 years ago
|
tsxTSConstructor = { fg = cp.lavender },
|
||
|
tsxTSTagAttribute = { fg = cp.mauve },
|
||
3 years ago
|
|
||
3 years ago
|
-- cpp
|
||
3 years ago
|
cppTSProperty = { fg = cp.rosewater },
|
||
3 years ago
|
|
||
|
-- yaml
|
||
|
yamlTSField = { fg = cp.blue }, -- For fields.
|
||
3 years ago
|
}
|
||
|
end
|
||
|
|
||
|
return M
|