From 6859908ddee41f7b0121f3c2e3ef2262875291ba Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 29 Jul 2022 17:19:06 +0200 Subject: Refactor --- lua/no-clown-fiesta/treesitter.lua | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 lua/no-clown-fiesta/treesitter.lua (limited to 'lua/no-clown-fiesta/treesitter.lua') diff --git a/lua/no-clown-fiesta/treesitter.lua b/lua/no-clown-fiesta/treesitter.lua new file mode 100644 index 0000000..0f330df --- /dev/null +++ b/lua/no-clown-fiesta/treesitter.lua @@ -0,0 +1,60 @@ +local M = {} + +function M.highlight(palette, opts) + return { + TSComment = { fg = palette.medium_gray, style = opts.italic_comments }, + TSAnnotation = { fg = palette.white }, + TSAttribute = { fg = palette.white }, + TSConstructor = { fg = palette.white }, + TSType = { fg = palette.white, style = opts.bold_type }, + TSTypeBuiltin = { fg = palette.white }, + TSConditional = { fg = palette.gray_blue }, + TSException = { fg = palette.red }, + TSInclude = { fg = palette.red }, + TSKeyword = { fg = palette.gray_blue, style = opts.italic_keywords }, + TSKeywordFunction = { fg = palette.gray_blue, style = opts.italic_keywords }, + TSLabel = { fg = palette.white }, + TSNamespace = { fg = palette.white }, + TSRepeat = { fg = palette.gray_blue }, + TSConstant = { fg = palette.white }, + TSConstBuiltin = { fg = palette.red }, + TSFloat = { fg = palette.red }, + TSNumber = { fg = palette.red }, + TSBoolean = { fg = palette.red }, + TSCharacter = { fg = palette.light_green }, + TSError = { fg = palette.error_red }, + TSFunction = { fg = palette.cyan, style = opts.italic_functions }, + TSFuncBuiltin = { fg = palette.cyan }, + TSMethod = { fg = palette.cyan }, + TSConstMacro = { fg = palette.cyan }, + TSFuncMacro = { fg = palette.cyan }, + TSVariable = { fg = palette.white, style = opts.italic_variables }, + TSVariableBuiltin = { fg = palette.white }, + TSProperty = { fg = palette.white }, + TSOperator = { fg = palette.white }, + TSField = { fg = palette.white }, + TSParameter = { fg = palette.white }, + TSParameterReference = { fg = palette.white }, + TSSymbol = { fg = palette.medium_gray }, + TSText = { fg = palette.fg }, + TSPunctDelimiter = { fg = palette.white }, + TSTagDelimiter = { fg = palette.white }, + TSPunctBracket = { fg = palette.white }, + TSPunctSpecial = { fg = palette.medium_gray }, + TSString = { fg = palette.medium_gray_blue }, + TSStringRegex = { fg = palette.medium_gray_blue }, + TSStringEscape = { fg = palette.medium_gray_blue }, + TSTag = { fg = palette.pale_purple }, + TSEmphasis = { style = "italic" }, + TSUnderline = { style = "underline" }, + TSTitle = { fg = palette.medium_gray }, + TSLiteral = { fg = palette.medium_gray }, + TSURI = { fg = palette.cyan, style = "underline" }, + TSKeywordOperator = { fg = palette.gray_blue }, + TSStructure = { fg = palette.purple_test }, + TSStrong = { fg = palette.medium_gray }, + TSQueryLinterError = { fg = palette.warning_orange }, + } +end + +return M -- cgit v1.2.3-70-g09d2