aboutsummaryrefslogtreecommitdiffstats
path: root/queries/cpp
Commit message (Collapse)AuthorAgeFilesLines
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-125-379/+0
|
* feat(c-family): inherit injectionsObserverOfTime2025-05-121-3/+1
|
* 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-212-27/+18
|
* feat(highlights)!: keyword `@type.qualifier` → `@keyword.modifier`Jaehwang Jung2024-03-161-1/+1
|
* fix(c): improve doxygen comment matching (#6278)Chad Condon2024-03-111-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-294-0/+4
|
* fix(cpp): add back comment injectionJaehwang Jung2024-02-131-0/+3
|
* chore: format queriesPhạm Huy Hoàng2024-01-211-2/+2
|
* chore: query formattingPham Huy Hoang2024-01-195-105/+134
|
* 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`
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-25/+25
|
* fix(cpp): incorrect indent of class with opening { on new line (#5811)Jędrzej Boczar2023-12-221-2/+0
|
* fix(cpp): remove `@field` for identifiers with `_` prefix (#5731)HumblePresent2023-11-271-1/+1
|
* fix(cpp): highlight constexprAmaan Qureshi2023-11-101-0/+1
|
* feat: add DoxygenAmaan Qureshi2023-08-261-0/+4
|
* chore(c-family): inject all preproc args againAmaan Qureshi2023-08-131-11/+1
|
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-7/+16
| | | | | | | | | Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc
* fix(c-family): inject into preproc args in preproc defs when it spans ↵Amaan Qureshi2023-08-111-0/+2
| | | | multiple lines only
* fix(cpp): update injections from CAmaan Qureshi2023-08-101-1/+2
|
* fix(c)!: update C, CPP parsers and queriesAmaan Qureshi2023-07-271-1/+1
| | | also update derived parsers (arduino, cuda, glsl, hlsl, ispc, objc)
* lint(locals): use `#set!` to keep query linter happyChristian Clason2023-06-221-3/+3
|
* 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-272-5/+6
| | | | consistent
* use indent.X syntax for captures and properties of set directivesGeorge Harker2023-03-241-4/+5
| | | | | | | | update CONTRIBUTING.md adjust indents for bass fix doc capture comment
* fix(cpp): nullptr should be `@constant.builtin`Amaan Qureshi2023-03-191-1/+1
|
* feat!: add `@keyword.coroutine` captureAmaan Qureshi2023-03-031-6/+9
|
* injections(cpp): add injections for raw string literalsJohn Drouhard2023-01-091-0/+4
| | | | | | | | | | | | | the delimiter describes the language to use for the injection content ```cpp auto python_code = R"python( import os if __name__ == '__main__': print(os.name) )python"; ```
* 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
* indents(cpp): indent at field_initializer_listStephan Seitz2022-02-051-0/+2
|
* 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
* feat: rewrite indent moduleMunif Tanjim2022-01-211-1/+2
|
* highlights(cpp): add support for "<=>", "constinit", "consteval"Stephan Seitz2022-01-171-1/+6
|
* locals(cpp): add support for conceptsStephan Seitz2022-01-161-0/+5
|
* 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*