Closed Shatur closed 3 years ago
Please open this bug at tree-sitter-cpp! I guess it is already reported.
As a side-note: for tree-sitter-cuda a similar problem arose with device annotation in front of functions when using tree-sitter-cpp. This was one of the reasons apart from the kernel call syntax <<<
why i created this parser extension. It might also be an opportunity for you to apply a work around locally in the grammar.js of tree-sitter-cpp
Please open this bug at tree-sitter-cpp! I guess it is already reported.
Did non know, thank you! The issue https://github.com/tree-sitter/tree-sitter-cpp/issues/85 looks similar, but it for a macro before class. Should I create a separate issue?
Describe the bug
The following code will have wrong colors:
Where
EXPORT_API
is a macro that is used to export class functions to DLLs on Windows on Windows and expands to nothing on Linux.Expected behavior
It would be awesome to handle this case and highlight
EXPORT_API
as a macro andMyClass
as a class in this case.Output of
:checkhealth nvim_treesitter
Paste the output here
Output of
nvim --version
NVIM v0.5.0-dev+1401-g12d8ff7cc Build type: RelWithDebInfo LuaJIT 2.0.5 Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/gena/.cache/paru/clone/neovim-git/src/build/config -I/home/gena/.cache/paru/clone/neovim-git/src/neovim-git/src -I/usr/include -I/home/gena/.cache/paru/clone/neovim-git/src/build/src/nvim/auto -I/home/gena/.cache/paru/clone/neovim-git/src/build/include Скомпилирован gena@AcerAspire5 Features: +acl +iconv +tui See ":help feature-compile" общесистемный файл vimrc: "$VIM/sysinit.vim" значение $VIM по умолчанию: "/usr/share/nvim" Run :checkhealth for more info