aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-treesitter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-treesitter.lua')
-rw-r--r--lua/nvim-treesitter.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/nvim-treesitter.lua b/lua/nvim-treesitter.lua
index 8f2fa05ed..b053f39b0 100644
--- a/lua/nvim-treesitter.lua
+++ b/lua/nvim-treesitter.lua
@@ -3,6 +3,7 @@ local parsers = require'nvim-treesitter.parsers'
local configs = require 'nvim-treesitter.configs'
local install = require'nvim-treesitter.install'
local locals = require'nvim-treesitter.locals'
+local highlight = require'nvim-treesitter.highlight'
local M = {}
@@ -14,6 +15,8 @@ end
-- this is the main interface through the plugin
function M.setup(lang)
if parsers.has_parser(lang) then
+ local autocmd = "autocmd NvimTreesitter FileType %s lua require'nvim-treesitter.highlight'.setup()"
+ api.nvim_command(string.format(autocmd, lang))
end
end