From bb33aea03cd65e62e0b5cdd0b1077c09b88dce1b Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Thu, 9 Sep 2021 22:48:57 +0200 Subject: Set CXX standard per parser and fix Norg --- lua/nvim-treesitter/shell_command_selectors.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua/nvim-treesitter/shell_command_selectors.lua') diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index fb322e01..5a16b58f 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -94,7 +94,7 @@ 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 then + if string.match(cc, "cl$") or string.match(cc, "cl.exe$") or not repo.use_makefile or fn.has "win32" == 1 then return { cmd = cc, info = "Compiling...", @@ -110,7 +110,11 @@ function M.select_compile_command(repo, cc, compile_location) info = "Compiling...", err = "Error during compilation", opts = { - args = { "--makefile=" .. utils.join_path(utils.get_package_path(), "scripts", "compile_parsers.makefile"), "CC=" .. cc }, + args = { + "--makefile=" .. utils.join_path(utils.get_package_path(), "scripts", "compile_parsers.makefile"), + "CC=" .. cc, + "CXX_STANDARD=" .. repo.cxx_standard, + }, cwd = compile_location, }, } -- cgit v1.2.3