diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-07-31 20:27:06 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-08-02 22:58:08 +0200 |
| commit | a872762d8240d9f81402b69fa7f20d1c1bbda919 (patch) | |
| tree | 4276823cdbc75cc7d80957e9013ba29b1737d114 /lua/nvim-treesitter/info.lua | |
| parent | a855538e0aad238b6f8df6750b81f0ef4880092f (diff) | |
Add TSUpdate command to update parsers
Diffstat (limited to 'lua/nvim-treesitter/info.lua')
| -rw-r--r-- | lua/nvim-treesitter/info.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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, |
