A fork of the C++ grammar for tree-sitter, with some additional syntax node used in Google projects, e.g. status macros.
The fork is intended to be kept up-to-date with the main C++ grammar. If you notice that it is out of sync, file an issue.
Install as a lua plugin with your favorite package manager.
use {"smartpde/tree-sitter-cpp-google"}
Before settig up treesitter, call setup()
on this plugin:
-- First, initialize this plugin.
require("tree-sitter-cpp-google").setup()
-- Then, set up the treesitter as usual.
require("nvim-treesitter.configs").setup({
-- Your setup here.
})
Run :TSInstall cpp
to [re]install the C++ parser from the new location.