mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(install)!: remove support for C++ scanners
This commit is contained in:
parent
429e6f446b
commit
a8f5641ab3
3 changed files with 4 additions and 18 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue