aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-12-14 15:00:48 +0000
committerGitHub <noreply@github.com>2022-12-14 15:00:48 +0000
commitd127c684faa9a112575798a81c87babb1c83a7ea (patch)
tree6c0080bff13ac6fd803f6141df7ac0d49c9af49e /runtime/lua/vim/treesitter.lua
parent090048bec9f80c46a6ce6ff05a419b15bc4bf028 (diff)
downloadrneovim-d127c684faa9a112575798a81c87babb1c83a7ea.tar.gz
rneovim-d127c684faa9a112575798a81c87babb1c83a7ea.tar.bz2
rneovim-d127c684faa9a112575798a81c87babb1c83a7ea.zip
fix(treesitter): properly restore `'syntax'` (#21358)
Diffstat (limited to 'runtime/lua/vim/treesitter.lua')
-rw-r--r--runtime/lua/vim/treesitter.lua6
1 files changed, 0 insertions, 6 deletions
diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua
index 7813c2edb2..25f0e7dc5e 100644
--- a/runtime/lua/vim/treesitter.lua
+++ b/runtime/lua/vim/treesitter.lua
@@ -327,12 +327,8 @@ end
---@param lang (string|nil) Language of the parser (default: buffer filetype)
function M.start(bufnr, lang)
bufnr = bufnr or a.nvim_get_current_buf()
-
local parser = M.get_parser(bufnr, lang)
-
M.highlighter.new(parser)
-
- vim.b[bufnr].ts_highlight = true
end
--- Stops treesitter highlighting for a buffer
@@ -344,8 +340,6 @@ function M.stop(bufnr)
if M.highlighter.active[bufnr] then
M.highlighter.active[bufnr]:destroy()
end
-
- vim.bo[bufnr].syntax = 'on'
end
--- Open a window that displays a textual representation of the nodes in the language tree.