aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/python
Commit message (Collapse)AuthorAgeFilesLines
* fix(python): highlight all types of docstrings (#7788)Jakob Zahn2025-04-031-0/+121
|
* fix(python): prioritize builtin functionsdcho2025-03-211-0/+3
|
* fix(python): don't highlight parameter name as builtin (#7732)Salomon Popp2025-03-132-4/+16
|
* fix(python): highlight function calls correctly (#7728)Salomon Popp2025-03-122-0/+35
|
* fix(python): don't highlight attribute name as builtin (#7712)Salomon Popp2025-03-111-0/+5
| | | | | | | | | | | | | | | * fix(python): don't highlight attribute name as builtin * fix(python): highlight `@variable.member` correctly for member access context * test: add test * test: expand test * docs: update comment * refactor: change order, remove priority override * style: remove extra newline
* feat(python): highlight modulesOmar Valdez2024-11-211-1/+1
|
* feat!: align standard captures with upstreamChristian Clason2024-01-195-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* chore(tests): consistent capturesChristian Clason2024-01-191-17/+17
|
* fix(python,starlark): builtin types should come after typesAmaan Qureshi2023-04-251-1/+3
|
* feat(python,starlark): highlight type conversions as `@function.macro`Amaan Qureshi2023-04-251-0/+1
|
* fix(python,starlark): update field match patternAmaan Qureshi2023-04-251-0/+10
|
* Python: highlight future import (#2936)Santos Gallegos2022-05-131-0/+4
| | | | | * Python: highlight future import * Use constant.builtin
* Python: highlight raise from statementSantos Gallegos2022-05-011-0/+6
|
* highlights(python): "from" in yield should be `@keyword.return`Stephan Seitz2022-04-011-0/+7
| | | | Fixes #2712
* highlights(python): add support for pattern matchingStephan Seitz2022-01-281-0/+50
Fixes #2080 Depends on https://github.com/tree-sitter/tree-sitter-python/pull/140