diff options
| author | Steven Sojka <steelsojka@users.noreply.github.com> | 2020-08-16 11:27:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-16 11:27:15 -0500 |
| commit | 4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6 (patch) | |
| tree | 4ef42a5f7c195784f46f1153547d8d0ec3075589 /queries/cpp/highlights.scm | |
| parent | Merge pull request #295 from steelsojka/feature/set-scopes-for-definitions (diff) | |
| parent | feat(highlights): add is predicate (diff) | |
| download | nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.tar nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.tar.gz nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.tar.bz2 nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.tar.lz nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.tar.xz nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.tar.zst nvim-treesitter-4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6.zip | |
Merge pull request #296 from steelsojka/feat-is-predicate
feat(highlights): add is predicate
Diffstat (limited to 'queries/cpp/highlights.scm')
| -rw-r--r-- | queries/cpp/highlights.scm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm index 0eb541269..fe7283136 100644 --- a/queries/cpp/highlights.scm +++ b/queries/cpp/highlights.scm @@ -8,7 +8,12 @@ (#match? @field "_$")) ; function(Foo ...foo) -(variadic_parameter_declaration) @parameter +(variadic_parameter_declaration + declarator: (variadic_declarator + (identifier) @parameter)) +; int foo = 0 +(optional_parameter_declaration + declarator: (identifier) @parameter) ;(field_expression) @parameter ;; How to highlight this? (template_function @@ -42,20 +47,20 @@ (#match? @constructor "^[A-Z]")) (call_expression - function: (scoped_identifier + function: (scoped_identifier name: (identifier) @function)) (call_expression - function: (field_expression + function: (field_expression field: (field_identifier) @function)) ((call_expression - function: (scoped_identifier + function: (scoped_identifier name: (identifier) @constructor)) (#match? @constructor "^[A-Z]")) ((call_expression - function: (field_expression + function: (field_expression field: (field_identifier) @constructor)) (#match? @constructor "^[A-Z]")) |
