aboutsummaryrefslogtreecommitdiffstats
path: root/queries/c
Commit message (Collapse)AuthorAgeFilesLines
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-125-658/+0
|
* feat(c-family): inherit injectionsObserverOfTime2025-05-121-1/+1
|
* fix(c): highlight `"."` as `@punctuation.delimiter`Riley Bruins2025-03-181-1/+1
| | | | Aligns C with the other language highlights
* feat(c): use `@constant.macro` for macro identifiers (#7266)Omar Valdez2024-10-201-2/+11
|
* refactor(queries): Remove quotes from properties in set! directiveOmar Valdez2024-07-281-1/+1
|
* feat(predicates)!: rename `has-type` to `kind-eq` to align with HelixChristian Clason2024-06-021-3/+3
| | | | No point in having a different name for the same predicate.
* feat(c): inject printf in concatenated stringsOmar Valdez2024-05-051-8/+28
|
* feat: import statement folds for common languagesRiley Bruins2024-05-011-0/+1
|
* feat: more `@keyword.type` capturesRiley Bruins2024-05-011-4/+7
|
* fix(c): don't highlight preproc_argJaehwang Jung2024-03-271-3/+0
| | | | | | `preproc_arg` is used for the body of `#define` macro definition, which is not appropriate to highlight with `@function.macro`. In addition, this region has an injection to C, so it will get highlights anyway.
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-213-48/+40
|
* feat(highlights)!: `@keyword.storage` → `@keyword.modifier`Jaehwang Jung2024-03-161-2/+2
|
* 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(c): local label highlightsRiley Bruins2024-02-261-0/+5
|
* chore: format queriesPhạm Huy Hoàng2024-01-212-4/+4
|
* Fixup format (#5934)Phạm Huy Hoàng2024-01-201-0/+1
| | | | | | | * fix(format): newline between top-level field defs * fixup: newline between node and comment * fixup: optimize pattern
* chore: query formattingPham Huy Hoang2024-01-195-120/+207
|
* refactor: manual pre-cleanupPham Huy Hoang2024-01-192-44/+52
| | | | | Moving comments, adding `format-ignore` to lines that will be better with it
* feat!: align standard captures with upstreamChristian Clason2024-01-191-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(injections): add printf format stringsObserverOfTime2024-01-191-0/+67
|
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-19/+19
|
* refactor: Remove all `(ERROR) @error` capturesPham Huy Hoang2023-10-251-2/+0
| | | | | | | | | | | | As discussed in PR#5421, capturing `@error` is inconsistent, requiring deep nesting (or priority) in order to correctly have red backgrounds to it. Some queries has this capture, some don't. For consistency purposes, removing all of them is more preferable. For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)` to your custom queries.
* fix(c): add missing foldsAmaan Qureshi2023-10-041-0/+2
|
* feat: add DoxygenAmaan Qureshi2023-08-261-1/+5
|
* feat: add re2cAmaan Qureshi2023-08-241-0/+4
|
* chore(c-family): inject all preproc args againAmaan Qureshi2023-08-131-11/+1
|
* feat(c): mention how to highlight K&R functionsAmaan Qureshi2023-08-131-0/+23
|
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-7/+18
| | | | | | | | | 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
* feat(c): update highlightsAmaan Qureshi2023-08-111-3/+40
|
* chore: update C, improve preproc_arg highlightsAmaan Qureshi2023-07-271-0/+8
|
* fix(c): only inject in preproc function calls/definitionsAmaan Qureshi2023-07-271-1/+2
|
* fix(c)!: update C, CPP parsers and queriesAmaan Qureshi2023-07-274-82/+58
| | | also update derived parsers (arduino, cuda, glsl, hlsl, ispc, objc)
* lint(locals): use `#set!` to keep query linter happyChristian Clason2023-06-221-2/+2
|
* fix(highlights): lower priority for codeblocks with injections (#4905)Christian Clason2023-06-051-4/+2
|
* fix(c): types are optional in sized_type_specifierAmaan Qureshi2023-04-211-1/+1
|
* feat(c): highlight parenthesized function pointer decl identifiers as ↵Amaan Qureshi2023-04-211-1/+6
| | | | `@function`
* fix(c_indents): fix expression leaking indentsPham Huy Hoang2023-04-081-1/+7
|
* use indent.X syntax for captures and properties of set directivesGeorge Harker2023-03-241-30/+31
| | | | | | | | update CONTRIBUTING.md adjust indents for bass fix doc capture comment
* split delimiter into open_delimiter and close_delimiterGeorge Harker2023-03-241-2/+4
|
* feat: add `@comment.documentation` where applicableAmaan Qureshi2023-03-051-0/+3
|
* highlights(c): extern in linkage specificationObserverOfTime2023-01-261-0/+3
|
* indents(c): update if casesPham Huy Hoang2023-01-141-50/+55
|
* indents(c): Refactor indent queriesPham Huy Hoang2023-01-141-11/+75
|
* indents(c): treat `"#ifndef"`, `"#elif"` like `"#ifdef"`Stephan Seitz2022-12-311-0/+2
|
* highlights: create subscoping for ternary operatorStephan Seitz2022-12-021-1/+1
| | | | | | | | | | After https://github.com/nvim-treesitter/nvim-treesitter/issues/470, we decided to use `@conditional` for ternary operator instead of operator despite `@conditional` is documented for keywords only. A sub-scoping can make it easier for people to highlight this operator group differently. Also unify the usage of `@conditional...` across languages.
* highlights(c): primitive type as builtinAaron Rancsik2022-12-011-1/+2
|
* highlights(c): use more specific groupsObserverOfTime2022-11-261-8/+9
| | | | Co-Authored-By: Stephan Seitz <stephan.seitz@fau.de>
* highlights: use @preproc where appropriateObserverOfTime2022-10-151-1/+1
|