diff options
| -rw-r--r-- | CONTRIBUTING.md | 4 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 16 |
3 files changed, 4 insertions, 18 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 55c0bc284..c989b585c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ To add a new parser, edit the following files: zimbu = { install_info = { url = 'https://github.com/zimbulang/tree-sitter-zimbu', -- local path or git repo - files = { 'src/parser.c' }, -- note that some parsers also require src/scanner.c or src/scanner.cc + files = { 'src/parser.c' }, -- note that some parsers also require src/scanner.c -- optional entries: branch = 'develop', -- only needed if different from default branch location = 'parser', -- only needed if the parser is in subdirectory of a "monorepo" @@ -51,7 +51,7 @@ zimbu = { zimbu = { 'zu' }, ``` -**Note: We only support external scanners written in C (preferably) and C++03 for portability reasons.** +**Note: We only support external scanners written in C for portability reasons.** ## Queries @@ -135,7 +135,7 @@ local parser_config = require('nvim-treesitter.parsers').configs parser_config.zimbu = { install_info = { url = '~/projects/tree-sitter-zimbu', -- local path or git repo - files = { 'src/parser.c' }, -- note that some parsers also require src/scanner.c or src/scanner.cc + files = { 'src/parser.c' }, -- note that some parsers also require src/scanner.c -- optional entries: branch = 'develop', -- only needed if different from default branch location= 'parser', -- only needed if the parser is in subdirectory of a "monorepo" diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index b6e3c3de3..d9d2a16a2 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -347,7 +347,7 @@ local function select_compiler_args(repo, compiler) if compiler:find('zig$') or compiler:find('zig.exe$') then return { - 'c++', + 'cc', '-o', 'parser.so', repo.files, @@ -374,20 +374,6 @@ local function select_compiler_args(repo, compiler) end end - if - #vim.iter.filter( - --- @param file string - --- @return boolean - function(file) - local ext = fn.fnamemodify(file, ':e') - return ext == 'cc' or ext == 'cpp' or ext == 'cxx' - end, - repo.files - ) > 0 - then - add_cc_arg('-lstdc++') - end - if not iswin then add_cc_arg('-Wall') add_cc_arg('-Wextra') |
