aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-05-15 15:44:10 -0700
committerGitHub <noreply@github.com>2024-05-15 15:44:10 -0700
commit7c13d1a4a836effd436f8bbcdf1d03113f4c48c6 (patch)
tree87d31c2bac12322cf5a54803110d66ff4be61f17 /runtime/lua/vim/treesitter
parent007adde1994da7f25eaa0e6a4f402587afbc508d (diff)
parent4399c4932d7b0565932a667e051f6861b8293157 (diff)
downloadrneovim-7c13d1a4a836effd436f8bbcdf1d03113f4c48c6.tar.gz
rneovim-7c13d1a4a836effd436f8bbcdf1d03113f4c48c6.tar.bz2
rneovim-7c13d1a4a836effd436f8bbcdf1d03113f4c48c6.zip
Merge #28747 from justinmk/doc
Diffstat (limited to 'runtime/lua/vim/treesitter')
-rw-r--r--runtime/lua/vim/treesitter/languagetree.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/lua/vim/treesitter/languagetree.lua b/runtime/lua/vim/treesitter/languagetree.lua
index e618f29f8f..270d869e43 100644
--- a/runtime/lua/vim/treesitter/languagetree.lua
+++ b/runtime/lua/vim/treesitter/languagetree.lua
@@ -225,7 +225,10 @@ function LanguageTree:_log(...)
self._logger('nvim', table.concat(msg, ' '))
end
---- Invalidates this parser and all its children
+--- Invalidates this parser and its children.
+---
+--- Should only be called when the tracked state of the LanguageTree is not valid against the parse
+--- tree in treesitter. Doesn't clear filesystem cache. Called often, so needs to be fast.
---@param reload boolean|nil
function LanguageTree:invalidate(reload)
self._valid = false