mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
refactor: rewrite installation using jobs and async
Replace sync variants with callback support
This commit is contained in:
parent
5aa2984a02
commit
cde679e435
15 changed files with 951 additions and 709 deletions
|
|
@ -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',
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue