From 282e18edd18fdd84e8436440789c0ecb2bc83f82 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Sun, 21 Jun 2020 19:43:02 +0200 Subject: highlight: use custom highlight groups --- lua/nvim-treesitter/highlight.lua | 64 +++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/highlight.lua b/lua/nvim-treesitter/highlight.lua index 717601462..1b4722435 100644 --- a/lua/nvim-treesitter/highlight.lua +++ b/lua/nvim-treesitter/highlight.lua @@ -11,45 +11,45 @@ local M = { local hlmap = vim.treesitter.TSHighlighter.hl_map -- Misc -hlmap.error = "Error" -hlmap["punctuation.delimiter"] = "Delimiter" -hlmap["punctuation.bracket"] = "Delimiter" -hlmap["punctuation.special"] = "Delimiter" +hlmap.error = "TSError" +hlmap["punctuation.delimiter"] = "TSPunctDelimiter" +hlmap["punctuation.bracket"] = "TSPunctBracket" +hlmap["punctuation.special"] = "TSPunctSpecial" -- Constants -hlmap["constant"] = "Constant" -hlmap["constant.builtin"] = "Special" -hlmap["constant.macro"] = "Define" -hlmap["string"] = "String" -hlmap["string.regex"] = "String" -hlmap["string.escape"] = "SpecialChar" -hlmap["character"] = "Character" -hlmap["number"] = "Number" -hlmap["boolean"] = "Boolean" -hlmap["float"] = "Float" +hlmap["constant"] = "TSConstant" +hlmap["constant.builtin"] = "TSConstBuiltin" +hlmap["constant.macro"] = "TSConstMacro" +hlmap["string"] = "TSString" +hlmap["string.regex"] = "TSStringRegex" +hlmap["string.escape"] = "TSStringEscape" +hlmap["character"] = "TSCharacter" +hlmap["number"] = "TSNumber" +hlmap["boolean"] = "TSBoolean" +hlmap["float"] = "TSFloat" -- Functions -hlmap["function"] = "Function" -hlmap["function.builtin"] = "Special" -hlmap["function.macro"] = "Macro" -hlmap["parameter"] = "Identifier" -hlmap["method"] = "Function" -hlmap["field"] = "Identifier" -hlmap["property"] = "Identifier" -hlmap["constructor"] = "Special" +hlmap["function"] = "TSFunction" +hlmap["function.builtin"] = "TSFuncBuiltin" +hlmap["function.macro"] = "TSFuncMacro" +hlmap["parameter"] = "TSIdentifier" +hlmap["method"] = "TSMethod" +hlmap["field"] = "TSField" +hlmap["property"] = "TSProperty" +hlmap["constructor"] = "TSConstructor" -- Keywords -hlmap["conditional"] = "Conditional" -hlmap["repeat"] = "Repeat" -hlmap["label"] = "Label" -hlmap["operator"] = "Operator" -hlmap["keyword"] = "Keyword" -hlmap["exception"] = "Exception" +hlmap["conditional"] = "TSConditional" +hlmap["repeat"] = "TSRepeat" +hlmap["label"] = "TSLabel" +hlmap["operator"] = "TSOperator" +hlmap["keyword"] = "TSKeyword" +hlmap["exception"] = "TSException" -hlmap["type"] = "Type" -hlmap["type.builtin"] = "Type" -hlmap["structure"] = "Structure" -hlmap["include"] = "Include" +hlmap["type"] = "TSType" +hlmap["type.builtin"] = "TSTypeBuiltin" +hlmap["structure"] = "TSStructure" +hlmap["include"] = "TSInclude" function M.attach(bufnr, lang) local bufnr = bufnr or api.nvim_get_current_buf() -- cgit v1.2.3-70-g09d2