mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
Set CXX standard per parser and fix Norg
This commit is contained in:
parent
9419107d86
commit
bb33aea03c
4 changed files with 14 additions and 7 deletions
|
|
@ -893,12 +893,13 @@ list.hack = {
|
|||
|
||||
list.norg = {
|
||||
install_info = {
|
||||
url = "https://github.com/vhyrro/tree-sitter-norg",
|
||||
url = "https://github.com/nvim-neorg/tree-sitter-norg",
|
||||
branch = "main",
|
||||
files = { "src/parser.c", "src/scanner.cc" },
|
||||
use_makefile = true,
|
||||
cxx_standard = "c++14",
|
||||
},
|
||||
maintainers = { "@JoeyGrajciar", "@vhyrro" },
|
||||
maintainers = { "@JoeyGrajciar", "@vhyrro", "@mrossinek" },
|
||||
}
|
||||
|
||||
local M = {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue