aboutsummaryrefslogtreecommitdiffstats
path: root/queries/xml
Commit message (Collapse)AuthorAgeFilesLines
* fix(xml): properly indent closing tagsShaun Attfield (shaun@xomen)2024-12-301-1/+1
| | | | | | | | | | | | | Confusing as it is, https://github.com/heurist/nvim-treesitter/blob/master/CONTRIBUTING.md?plain=1#L394 says: ```query @indent.dedent ; dedent children when matching this node @indent.branch ; dedent itself when matching this node ``` @indent.branch is therefore the approriate choice for de-indenting.
* fix(xml,dtd): adapt to parser changesObserverOfTime2024-10-221-53/+39
|
* fix(xml): remove unused rulesAmaan Qureshi2024-10-161-1/+148
|
* refactor(queries): Remove quotes from properties in set! directiveOmar Valdez2024-07-281-1/+1
|
* feat(highlights)!: enforce documented captures (#6232)Christian Clason2024-03-031-2/+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
|
* 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-193-65/+89
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10/+10
|
* feat(xml,dtd): add locals queriesObserverOfTime2023-11-181-0/+25
|
* feat: add xml & dtd parsersObserverOfTime2023-08-134-0/+103