mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
style
This commit is contained in:
parent
add6eaf181
commit
ef546ef7c8
1 changed files with 8 additions and 1 deletions
|
|
@ -120,12 +120,19 @@ function M.select_mv_cmd(from, to, cwd)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.select_download_commands(repo, project_name, cache_folder, revision)
|
function M.select_download_commands(repo, project_name, cache_folder, revision)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
local has_tar = vim.fn.executable('tar') == 1
|
||||||
|
local has_curl = vim.fn.executable('curl') == 1
|
||||||
local is_github = repo.url:find("github.com", 1, true)
|
local is_github = repo.url:find("github.com", 1, true)
|
||||||
local is_gitlab = repo.url:find("gitlab.com", 1, true)
|
local is_gitlab = repo.url:find("gitlab.com", 1, true)
|
||||||
local is_windows = fn.hs('win32')
|
local is_windows = fn.hs('win32')
|
||||||
|
|
||||||
if vim.fn.executable('tar') == 1 and vim.fn.executable('curl') == 1 and (is_github or is_gitlab) and not is_windows then
|
if has_tar andhas_curl and (is_github or is_gitlab) and not is_windows then
|
||||||
|
=======
|
||||||
|
local has_tar = vim.fn.executable('tar') == 1 and not fn.hs('win32')
|
||||||
|
if has_tar and vim.fn.executable('curl') == 1 and repo.url:find("github.com", 1, true) then
|
||||||
|
>>>>>>> 99a672f (style)
|
||||||
|
|
||||||
revision = revision or repo.branch or "master"
|
revision = revision or repo.branch or "master"
|
||||||
local path_sep = utils.get_path_sep()
|
local path_sep = utils.get_path_sep()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue