diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-03-26 09:54:22 +0100 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 9365cf8a970a00cbb2a16f45319093d2cafe551f (patch) | |
| tree | 964dc2dda1480e4aea3bc7c43e1634b6e9888398 /lua | |
| parent | fix(formatter): increase match limit (diff) | |
| download | nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.tar nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.tar.gz nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.tar.bz2 nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.tar.lz nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.tar.xz nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.tar.zst nvim-treesitter-9365cf8a970a00cbb2a16f45319093d2cafe551f.zip | |
fix(install): don't prompt on installed parsers (skip)
Use `:TSInstall!` or `force = true` to reinstall.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/config.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 12 |
2 files changed, 3 insertions, 11 deletions
diff --git a/lua/nvim-treesitter/config.lua b/lua/nvim-treesitter/config.lua index b1cb4f761..473a97ee9 100644 --- a/lua/nvim-treesitter/config.lua +++ b/lua/nvim-treesitter/config.lua @@ -20,7 +20,7 @@ function M.setup(user_data) if user_data then if user_data.install_dir then user_data.install_dir = vim.fs.normalize(user_data.install_dir) - --TODO(clason): insert after/before site, or leave to user? + --TODO(clason): leave to user! vim.opt.runtimepath:append(user_data.install_dir) end config = vim.tbl_deep_extend('force', config, user_data) diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 9ff245ab6..d49a7cbc9 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -365,12 +365,8 @@ local install_status = {} ---@type table<string,InstallStatus?> ---@return InstallStatus status local function install_lang(lang, cache_dir, install_dir, force, generate) if not force and vim.list_contains(config.installed_parsers(), lang) then - local yesno = fn.input(lang .. ' parser already available: would you like to reinstall ? y/n: ') - print('\n ') - if yesno:sub(1, 1) ~= 'y' then - install_status[lang] = 'installed' - return 'installed' - end + install_status[lang] = 'installed' + return 'installed' end if install_status[lang] then @@ -444,10 +440,6 @@ M.install = a.sync(function(languages, options, callback) languages = config.norm_languages(languages, options and options.skip) - if languages[1] == 'all' then - options.force = true - end - install(languages, options, callback) end, 3) |
