diff options
| author | Akin Sowemimo <22454918+akinsho@users.noreply.github.com> | 2022-09-09 15:22:04 +0100 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-09-09 16:29:14 +0200 |
| commit | 557123a6168936983d7b980df195057ca6b370ed (patch) | |
| tree | a25161a90dee41fe0a3078b4bb4a7d1532c9292d /lua | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.tar nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.tar.gz nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.tar.bz2 nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.tar.lz nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.tar.xz nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.tar.zst nvim-treesitter-557123a6168936983d7b980df195057ca6b370ed.zip | |
fix(highlight): ensure link captures function exists
before attempting to call it
fixes #3465
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/highlight.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/highlight.lua b/lua/nvim-treesitter/highlight.lua index d3c1566f4..af18b68e0 100644 --- a/lua/nvim-treesitter/highlight.lua +++ b/lua/nvim-treesitter/highlight.lua @@ -131,8 +131,10 @@ elseif not vim.g.skip_ts_default_groups then end local function link_all_captures() - for capture, hlgroup in pairs(default_map) do - link_captures(capture, hlgroup) + if link_captures then + for capture, hlgroup in pairs(default_map) do + link_captures(capture, hlgroup) + end end end |
