From a872762d8240d9f81402b69fa7f20d1c1bbda919 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Fri, 31 Jul 2020 20:27:06 +0200 Subject: Add TSUpdate command to update parsers --- lua/nvim-treesitter/info.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lua/nvim-treesitter/info.lua') diff --git a/lua/nvim-treesitter/info.lua b/lua/nvim-treesitter/info.lua index 98b75951..092c7c8c 100644 --- a/lua/nvim-treesitter/info.lua +++ b/lua/nvim-treesitter/info.lua @@ -76,6 +76,16 @@ local function module_info(mod) end end +function M.installed_parsers() + local installed = {} + for _, p in pairs(parsers.available_parsers()) do + if parsers.has_parser(p) then + table.insert(installed, p) + end + end + return installed +end + M.commands = { TSInstallInfo = { run = install_info, -- cgit v1.2.3