diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-06-21 19:43:02 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-06-26 20:56:19 +0200 |
| commit | 282e18edd18fdd84e8436440789c0ecb2bc83f82 (patch) | |
| tree | d01ab6c1dde69ae8248236627e23ccf673b7ca80 /lua | |
| parent | Fix cpp-highlights: wrong capture name used in regex (diff) | |
| download | nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.tar nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.tar.gz nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.tar.bz2 nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.tar.lz nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.tar.xz nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.tar.zst nvim-treesitter-282e18edd18fdd84e8436440789c0ecb2bc83f82.zip | |
highlight: use custom highlight groups
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/highlight.lua | 64 |
1 files changed, 32 insertions, 32 deletions
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() |
