aboutsummaryrefslogtreecommitdiffstats
path: root/queries/cpp/highlights.scm
Commit message (Collapse)AuthorAgeFilesLines
* bot(lockfile): update arduino, awk, bash, c, cpp, css, cuda, go, groovy, ↵nvim-treesitter-bot[bot]2024-09-051-1/+1
| | | | haskell, hlsl, html, http, javascript, jsdoc, json, julia, liquid, norg, ocaml, ocaml_interface, php, php_only, phpdoc, python, ql, regex, ruby, rust, scala, slang, tcl, templ, tsx, typescript, v, wing
* fix(cpp): update parser and queries (#6687)Amaan Qureshi2024-05-261-1/+1
|
* feat: more `@keyword.type` capturesRiley Bruins2024-05-011-5/+8
|
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-211-12/+8
|
* feat(highlights)!: keyword `@type.qualifier` → `@keyword.modifier`Jaehwang Jung2024-03-161-1/+1
|
* feat(highlights)!: enforce documented captures (#6232)Christian Clason2024-03-031-3/+2
| | | | | | | | | | | | | | | Problem: Allowing undocumented "secret" (sub)captures makes it harder to write comprehensive colorschemes and catch inconsistent captures. Solution: Only allow captures listed in CONTRIBUTING.md. Add useful (cross-language) subcaptures and drop language-specific or too niche ones. Follow-up: Adding further `*.builtin` captures and changing queries to use them. Language-specific subcaptures should instead be added in user config or a custom language plugin.
* feat(format): extra newline after modelinePhạm Huy Hoàng2024-02-291-0/+1
|
* chore: format queriesPhạm Huy Hoàng2024-01-211-2/+2
|
* chore: query formattingPham Huy Hoang2024-01-191-69/+97
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sharing highlight queries with upstream tree-sitter and Helix is difficult. Solution: Where reasonable, use capture names in tree-sitter's standard list or Helix's Atom-style hierarchy. Specifically: * tree-sitter "standard capture names" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72): - `@parameter` -> `@variable.parameter` - `@field` -> `@variable.member` - `@namespace` -> `@module` - `@float` -> `@number.float` - `@symbol` -> `@string.special.symbol` - `@string.regex` -> `@string.regexp` - `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below) - `@text.title` -> `@markup.heading` - `@text.literal` -> `@markup.raw` - `@text.reference` -> `@markup.link` - `@text.uri` -> `@markup.link.url` (in markup links) - `@string.special` -> `@markup.link.label` (non-url links) - `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`) * Helix captures (https://docs.helix-editor.com/master/themes.html#syntax-highlighting): - `@method` -> `@function.method` - `@method.call` -> `@function.method.call` - `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}` - `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}` - `@text.uri` -> `@string.special.url` (outside markup) - `@preproc` -> `@keyword.directive` - `@define` -> `@keyword.directive`(`.define`?) - `@storageclass` -> `@keyword.storage` - `@conditional` -> `@keyword.conditional` - `@debug` -> `@keyword.debug` - `@exception` -> `@keyword.exception` - `@include` -> `@keyword.import` - `@repeat` -> `@keyword.repeat` * cleanup - remove some redundant `@conceal` (but still allow it for conceal-only patterns) - remove obsolete `@error` (syntax linting is out of scope for this repo) - sort, cleanup capture list in `CONTRIBUTING.md`
* fix(cpp): remove `@field` for identifiers with `_` prefix (#5731)HumblePresent2023-11-271-1/+1
|
* fix(cpp): highlight constexprAmaan Qureshi2023-11-101-0/+1
|
* fix(c)!: update C, CPP parsers and queriesAmaan Qureshi2023-07-271-1/+1
| | | also update derived parsers (arduino, cuda, glsl, hlsl, ispc, objc)
* fear(cpp): highlight brackets in template_parameter_listfab41002023-05-201-0/+3
|
* perf: remove match where possibleAmaan Qureshi2023-04-211-7/+7
|
* feat(cpp): improve function.call to support any level of nesting for ↵John Drouhard2023-04-151-33/+68
| | | | qualified identifiers
* feat(cpp): more distinction between function/method declaration and callJaehwang Jung2023-04-081-7/+21
|
* feat(cpp): simplify namespace query rules now that parser is a bit more ↵John Drouhard2023-03-271-4/+1
| | | | consistent
* fix(cpp): nullptr should be `@constant.builtin`Amaan Qureshi2023-03-191-1/+1
|
* feat!: add `@keyword.coroutine` captureAmaan Qureshi2023-03-031-6/+9
|
* highlights(cpp): auto as @type.builtinAaron Rancsik2022-12-011-1/+3
|
* highlights(cpp): use more specific groupsObserverOfTime2022-11-261-10/+18
|
* highlights(cpp): add alternative operator namesmliszcz2022-10-111-14/+11
| | | | | These keywords are now supported by the parser. See: https://github.com/tree-sitter/tree-sitter-cpp/pull/179
* Split func/method definition from calls in C++ highlighting querieslfenzo2022-08-031-4/+4
|
* highlights(c/cpp): move attributes to C (again)Stephan Seitz2022-07-281-2/+0
| | | | | Let's hope that this time the C tests pass, also for the built-in C parser.
* highlights(cpp): make "::" `@punctuation.delimiter`Stephan Seitz2022-05-071-4/+3
| | | | Fixes #2902
* highlights(cpp): Add operator cast highlightFabian Viöl2022-03-021-1/+2
| | | | | See https://en.cppreference.com/w/cpp/language/cast_operator for reference.
* highlights(cpp): Highlight method with nested qualified_identifierFabian Viöl2022-02-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | so that methods like these are correctly highlighted ```cpp class A { class B { void foo(); }; }; void A::B::foo() { // ^^^ } ``` This only increases the nesting level by one. AFAIK abritrary nesting is difficult to do with current queries. But this nesting is a pretty common case
* highlights(c/cpp): highlight case labels as constantsStephan Seitz2022-01-291-0/+2
|
* highlights(cpp): fix function highlighting of Foo::bar::baz()Stephan Seitz2022-01-291-0/+10
| | | | Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2396
* highlights(cpp): add support for "<=>", "constinit", "consteval"Stephan Seitz2022-01-171-1/+6
|
* highlights(cpp): add support for conceptsStephan Seitz2022-01-161-0/+4
| | | | Requires https://github.com/tree-sitter/tree-sitter-cpp/pull/138
* Prefer lua-match over matchLewis Russell2021-11-231-7/+7
| | | | as string.find is much quicker than vim.regex:match*
* highlights(cpp): highlight literal_suffix as `@operator`Stephan Seitz2021-10-201-0/+2
|
* cpp: highlight template method identifier as a methodJohn Drouhard2021-09-271-0/+3
|
* cpp: update lockfile.json and fix for breaking changesJohn Drouhard2021-09-261-10/+6
|
* testStephan Seitz2021-09-171-0/+2
|
* highlights(c/cpp): react to upstream changes to attributesStephan Seitz2021-09-171-8/+5
|
* highlights(cpp): add support for coroutinesStephan Seitz2021-09-171-0/+3
|
* highlights(cpp): add static_assertStephan Seitz2021-07-061-0/+1
|
* c++ highlights: don't capture all identifiers with uppercase initials as typesAlex Chen2021-06-101-4/+0
|
* highlights(c/c++): "..." also exists in C (variadic macros)Stephan Seitz2021-05-181-1/+0
|
* highlights(cpp): highlight namespaces in using declartionsStephan Seitz2021-04-261-0/+2
|
* highlights(cpp): reduce number of regexesStephan Seitz2021-04-261-9/+3
|
* highlights(cpp): avoid overwriting C CONSTANTSStephan Seitz2021-04-261-2/+2
|
* highlights(cpp): fix constructor call highlightingStephan Seitz2021-01-291-0/+3
| | | | Address #883
* C++ highlights: Fix destructor highlightingStephan Seitz2021-01-081-1/+1
| | | | Field is not "name"
* c/cpp highlights: Fix field declarations and initializersJohn Drouhard2020-11-201-0/+6
| | | | | | | After a recent fix for #446, declarations in class/struct definitions stopped being marked as properties or methods. This fix will add property highlights to field declarations, and method highlight to field function declarations.
* Do not highlight Uppercase function as typeStephan Seitz2020-11-181-3/+5
|
* fix(predicates): Fix #446: highlight property only if not a methodStephan Seitz2020-11-181-2/+3
|