Compilation error during install
stevearc opened this issue · 2 comments
stevearc commented
I have the following in my vim config
parser_configs.norg = {
install_info = {
url = "https://github.com/vhyrro/tree-sitter-norg",
files = { "src/parser.c", "src/scanner.cc" },
branch = "main",
},
}
When I run :TSUpdate
, I get this error:
nvim-treesitter[norg]: Error during compilation
src/scanner.cc:352:208: error: wrong number of arguments specified for ‘nodiscard’ attribute
352 | TokenType check_detached(TSLexer* lexer, const std::vector<TokenType>& results, const std::array<unsigned char, Size>& expected, std::pair<char, std::vector<TokenType>> terminate_at = { 0, NONE | NONE })
| ^
From :checkhealth nvim_treesitter
## Installation
- WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK: `node` found v16.4.2 (only needed for :TSInstallFromGrammar)
- OK: `git` executable found.
- OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl" }
- OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.
And cc --version
cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
vhyrro commented
Hey! I think I may have fixed this now. Could you try again and tell me if any extra errors occur? Thx :)
stevearc commented
Works now, thanks!