From cde679e435ade757733772236abf299fc06da231 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 22 May 2023 14:35:25 +0100 Subject: refactor: rewrite installation using jobs and async Replace sync variants with callback support --- plugin/nvim-treesitter.lua | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'plugin/nvim-treesitter.lua') diff --git a/plugin/nvim-treesitter.lua b/plugin/nvim-treesitter.lua index 3ab264d41..fcf44d537 100644 --- a/plugin/nvim-treesitter.lua +++ b/plugin/nvim-treesitter.lua @@ -45,19 +45,6 @@ end, { desc = 'Install treesitter parsers from grammar', }) -api.nvim_create_user_command('TSInstallSync', function(args) - require('nvim-treesitter.install').install(args.fargs, { - with_sync = true, - force = args.bang, - }) -end, { - nargs = '+', - bang = true, - bar = true, - complete = complete_available_parsers, - desc = 'Install treesitter parsers synchronously', -}) - api.nvim_create_user_command('TSUpdate', function(args) require('nvim-treesitter.install').update(args.fargs) end, { @@ -67,15 +54,6 @@ end, { desc = 'Update installed treesitter parsers', }) -api.nvim_create_user_command('TSUpdateSync', function(args) - require('nvim-treesitter.install').update(args.fargs, { with_sync = true }) -end, { - nargs = '*', - bar = true, - complete = complete_installed_parsers, - desc = 'Update installed treesitter parsers synchronously', -}) - api.nvim_create_user_command('TSUninstall', function(args) require('nvim-treesitter.install').uninstall(args.fargs) end, { @@ -84,3 +62,9 @@ end, { complete = complete_installed_parsers, desc = 'Uninstall treesitter parsers', }) + +api.nvim_create_user_command('TSLog', function() + require('nvim-treesitter.log').show() +end, { + desc = 'View log messages', +}) -- cgit v1.2.3-70-g09d2