aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorkiyan42 <yazdani.kiyan@protonmail.com>2020-04-27 15:27:59 +0200
committerkiyan42 <yazdani.kiyan@protonmail.com>2020-04-27 15:27:59 +0200
commitf8029cfc6463c35e76e38ba428688eb259f9e62c (patch)
tree4cdf1a297bf20bd2c0464f0790fcab82ea99ebf9 /lua
parentMerge pull request #28 from vigoux/checkhealth-highlight (diff)
downloadnvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.tar
nvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.tar.gz
nvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.tar.bz2
nvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.tar.lz
nvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.tar.xz
nvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.tar.zst
nvim-treesitter-f8029cfc6463c35e76e38ba428688eb259f9e62c.zip
fix install by changing cc arguments position
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/install.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index be09a3bc1..ca84ac036 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -34,9 +34,9 @@ local function get_cache_dir()
end
local function iter_cmd(cmd_list, i, ft)
- if i == #cmd_list then return print('Treesitter parser for '..ft..' has been installed') end
+ if i == #cmd_list + 1 then return print('Treesitter parser for '..ft..' has been installed') end
- local attr = cmd_list[i + 1]
+ local attr = cmd_list[i]
if attr.info then print(attr.info) end
handle = luv.spawn(attr.cmd, attr.opts, vim.schedule_wrap(function(code)
@@ -76,12 +76,12 @@ local function run_install(cache_folder, package_path, ft, repo)
args = vim.tbl_flatten({
'-o',
'parser.so',
+ '-I./src',
+ repo.files,
'-shared',
+ '-Os',
'-lstdc++',
'-fPIC',
- '-Os',
- '-I./src',
- repo.files
}),
cwd = compile_location
}
@@ -100,7 +100,7 @@ local function run_install(cache_folder, package_path, ft, repo)
}
}
- iter_cmd(command_list, 0, ft)
+ iter_cmd(command_list, 1, ft)
end
-- TODO(kyazdani): this should work on windows too