aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/shell_command_selectors.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua
index b08121981..e7de09552 100644
--- a/lua/nvim-treesitter/shell_command_selectors.lua
+++ b/lua/nvim-treesitter/shell_command_selectors.lua
@@ -94,7 +94,14 @@ function M.select_compiler_args(repo, compiler)
end
function M.select_compile_command(repo, cc, compile_location)
- if string.match(cc, "cl$") or string.match(cc, "cl.exe$") or not repo.use_makefile or fn.has "win32" == 1 then
+ local make = M.select_executable { "gmake", "make" }
+ if
+ string.match(cc, "cl$")
+ or string.match(cc, "cl.exe$")
+ or not repo.use_makefile
+ or fn.has "win32" == 1
+ or not make
+ then
return {
cmd = cc,
info = "Compiling...",
@@ -106,7 +113,7 @@ function M.select_compile_command(repo, cc, compile_location)
}
else
return {
- cmd = "make",
+ cmd = make,
info = "Compiling...",
err = "Error during compilation",
opts = {