diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2021-08-07 11:44:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-07 11:44:41 +0200 |
commit | faa30079275acdf7e1a798498e531c7194a52a17 (patch) | |
tree | b04f17e1a86490b17fc59e4d356beb937277d9de | |
parent | a1cc146405cb0d97241d7bbaaa8c731ac664c035 (diff) | |
parent | 912152d6358e8043adf9bb064479c7dfa3ce885e (diff) | |
download | rneovim-faa30079275acdf7e1a798498e531c7194a52a17.tar.gz rneovim-faa30079275acdf7e1a798498e531c7194a52a17.tar.bz2 rneovim-faa30079275acdf7e1a798498e531c7194a52a17.zip |
Merge pull request #14767 from theHamsta/no-treesitter-mapping-to-non-existent
fix(treesitter): do not map hl_group when no mapping is set
-rw-r--r-- | runtime/lua/vim/treesitter/highlighter.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua index cf3cdf4505..e003cf577a 100644 --- a/runtime/lua/vim/treesitter/highlighter.lua +++ b/runtime/lua/vim/treesitter/highlighter.lua @@ -22,8 +22,6 @@ local _link_default_highlight_once = function(from, to) return from end --- These are conventions defined by nvim-treesitter, though it --- needs to be user extensible also. TSHighlighter.hl_map = { ["error"] = "Error", @@ -116,7 +114,7 @@ function TSHighlighterQuery:_get_hl_from_capture(capture) -- From "Normal.left" only keep "Normal" return vim.split(name, '.', true)[1], true else - return TSHighlighter.hl_map[name] or name, false + return TSHighlighter.hl_map[name] or 0, false end end |