aboutsummaryrefslogtreecommitdiffstats
path: root/queries/zig/highlights.scm
Commit message (Collapse)AuthorAgeFilesLines
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-121-283/+0
|
* feat!: switch upstream Zig parserAmaan Qureshi2024-08-301-118/+162
| | | | | The new parser is faster, does not lag while editing, correctly parses the entire Zig code base, and is much easier to write queries for.
* fix(zig): add some missing highlightsRiley Bruins2024-07-231-6/+10
|
* feat(zig): misc improvementsRiley Bruins2024-05-141-15/+21
|
* feat: standardize and document export keywordsRiley Bruins2024-05-131-2/+4
| | | | | | Many export keywords are captured as `@keyword.import`. This commit makes it so they are all captured like that, and mentions it in the documentation.
* feat: more `@keyword.type` capturesRiley Bruins2024-05-011-3/+6
|
* feat(highlights)!: `@keyword.storage` → `@keyword.modifier`Jaehwang Jung2024-03-161-1/+1
|
* feat(highlights)!: keyword `@type.qualifier` → `@keyword.modifier`Jaehwang Jung2024-03-161-1/+1
|
* Fixup format (#5934)Phạm Huy Hoàng2024-01-201-0/+5
| | | | | | | * fix(format): newline between top-level field defs * fixup: newline between node and comment * fixup: optimize pattern
* chore: query formattingPham Huy Hoang2024-01-191-57/+47
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* refactor: Remove all `(ERROR) @error` capturesPham Huy Hoang2023-10-251-3/+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(zig): capture function calls as `@function.call`Chinmay Dalal2023-06-221-4/+2
|
* perf: remove match where possibleAmaan Qureshi2023-04-211-3/+3
|
* feat: add `@comment.documentation` where applicableAmaan Qureshi2023-03-051-2/+3
|
* refactor(zig): `@type.definition` items belong in `@keyword`, differentiate ↵Amaan Qureshi2023-03-031-10/+10
| | | | `@boolean` from `@constant.builtin`
* feat!: add `@keyword.coroutine` captureAmaan Qureshi2023-03-031-5/+8
|
* Split out `@keyword.return`Eleanor Bartle2023-02-171-2/+2
| | | | Moves `break` and `continue` to `@repeat`. Leave coroutine keywords in `@keyword.return`. I'd really like a `@keyword.coroutine`.
* Add spelling checks to strings and commentsEleanor Bartle2023-02-171-2/+2
| | | I didn't touch these bits so they aren't in status quo, but sure, I'll fix them.
* Update Zig highlightsEleanor Bartle2023-02-171-81/+76
| | | Recently I rearranged the keywords. This PR brings the highlights query file up to date with that.
* highlights(zig): fix capturesObserverOfTime2022-11-261-27/+25
|
* feat(spell): support more languagesLewis Russell2022-09-261-2/+2
|
* Split func/method definition from calls in several programming language querieslfenzo2022-08-031-1/+1
|
* zig: work around for hang neovimmaxxnino2021-11-281-10/+8
|
* zig: highlight zig format, type and functionmaxxnino2021-11-231-2/+6
|
* Highlight zig add missing AssignOpmaxxnino2021-10-211-1/+1
|
* Zig queries: highlight, fold and indentmaxxnino2021-09-201-4/+10
| | | | | | | | * fold for if/while/for * highlight "_" for ignore variable * highlight "c" for PtrTypeStart * highlight "?" for optional type * remove duplicate query node in indent
* highlight(zig) highlight all caps is a constantmaxxnino2021-08-241-1/+10
| | | | | * in some context, like translate c macro * which is use all CAPS for define constant
* highlight(zig): rework querymaxxnino2021-08-231-99/+42
| | | | | | * improve query performance 120ms -> 6ms * correct highlight for field, type and function * add highlight for escape/format sequence in string
* highlights(zig): label, switch item, operator, punctuation, field property ↵maxxnino2021-08-121-8/+26
| | | | | (#1685) Co-authored-by: maxxnino <idonthaveemail@dontknow.com>
* Update new query and parser for zigmaxxnino2021-08-111-164/+201
|
* highlights(zig): function return type, var decl typemaxxnino2021-08-041-1/+14
|
* highlights(zig): highlight enum,union,error and custom number typemaxxnino2021-08-041-2/+9
| | | | | | | | * highlight enum field as a constant * highlight cImport and constructor * highlight else_switch enum constant
* highlights(zig): highlight true,falseStephan Seitz2021-07-081-2/+5
|
* highlights(zig): highlight `unreachable`Stephan Seitz2021-07-051-0/+1
|
* feat(keywords) merge return and yield into keyword.return groupantonk522021-07-041-3/+1
|
* feat(keywords) add keyword.return & keyword.yieldantonk522021-07-041-1/+4
|
* highlights(zig): use `@string.escape` for escape sequencesStephan Seitz2021-07-041-1/+1
|
* Update zig highlightsGregory Anders2021-06-101-1/+7
| | | | | | Highlight the built-in `@import` function with the TSInclude highlight group. Also highlight character literals using TSCharacter instead of TSNumber.
* improved zig grammar and queriesHimujjal2021-04-021-1/+1
|
* fixed some errorsHimujjal2021-04-021-11/+10
|
* Import highlights.scm from tree-sitter-zigStephan Seitz2021-03-301-10/+19
|
* Added Zig grammarHimujjal2021-03-231-0/+183