mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
fix(install): don't print operation summary by default
Problem: People complain about noisy `install()`. Solution: Gate operation summary behind `summary` install option (default false, set to true for interactive `:TS*` commands).
This commit is contained in:
committed by
Christian Clason
parent
ce903fde5d
commit
ff770d718b
@@ -27,7 +27,7 @@ end
|
||||
|
||||
-- create user commands
|
||||
api.nvim_create_user_command('TSInstall', function(args)
|
||||
require('nvim-treesitter.install').install(args.fargs, { force = args.bang })
|
||||
require('nvim-treesitter.install').install(args.fargs, { force = args.bang, summary = true })
|
||||
end, {
|
||||
nargs = '+',
|
||||
bang = true,
|
||||
@@ -39,6 +39,7 @@ end, {
|
||||
api.nvim_create_user_command('TSInstallFromGrammar', function(args)
|
||||
require('nvim-treesitter.install').install(args.fargs, {
|
||||
generate = true,
|
||||
summary = true,
|
||||
force = args.bang,
|
||||
})
|
||||
end, {
|
||||
@@ -50,7 +51,7 @@ end, {
|
||||
})
|
||||
|
||||
api.nvim_create_user_command('TSUpdate', function(args)
|
||||
require('nvim-treesitter.install').update(args.fargs)
|
||||
require('nvim-treesitter.install').update(args.fargs, { summary = true })
|
||||
end, {
|
||||
nargs = '*',
|
||||
bar = true,
|
||||
@@ -59,7 +60,7 @@ end, {
|
||||
})
|
||||
|
||||
api.nvim_create_user_command('TSUninstall', function(args)
|
||||
require('nvim-treesitter.install').uninstall(args.fargs)
|
||||
require('nvim-treesitter.install').uninstall(args.fargs, { summary = true })
|
||||
end, {
|
||||
nargs = '+',
|
||||
bar = true,
|
||||
|
||||
Reference in New Issue
Block a user