summaryrefslogtreecommitdiffstats
path: root/queries/python/highlights.scm
Commit message (Collapse)AuthorAgeFilesLines
* fix(python): restrict typed parameter highlightObserverOfTime2023-12-141-1/+1
| | | | Only the name is a parameter and not the value
* fix(python): highlight variadic lambda parametersObserverOfTime2023-12-141-0/+6
|
* feat(python): `@string.regex` capture, injection improvements (#5697)Riley Bruins2023-11-211-0/+8
| | | | | | | | | | | | | | | * feat(python): `@string.regex` capture, injection improvements * fix(python): match regex only for first argument of re module * chore(python): remove unneeded capture Co-authored-by: Santos Gallegos <stsewd@proton.me> * fix(python): only highlight string content itself as regex --------- Co-authored-by: Santos Gallegos <stsewd@proton.me>
* 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.
* feat(python): update parser & highlightsAmaan Qureshi2023-08-161-0/+3
|
* fix(python,starlark): update parsers & add escape_interpolationAmaan Qureshi2023-08-161-1/+4
|
* fix(python): fields should not match uppercase-beginning namesAmaan Qureshi2023-04-291-1/+1
|
* fix(python,starlark): builtin types should come after typesAmaan Qureshi2023-04-251-18/+18
|
* feat(python,starlark): highlight type conversions as `@function.macro`Amaan Qureshi2023-04-251-0/+2
|
* fix(python,starlark): update field match patternAmaan Qureshi2023-04-251-3/+3
|
* perf: remove match where possibleAmaan Qureshi2023-04-211-6/+6
|
* fix(python): add object as `@type.builtin`Anthony Shi2023-03-221-1/+1
|
* feat: add `@string.documentation` where applicableAmaan Qureshi2023-03-051-1/+12
|
* feat!: add `@keyword.coroutine` captureAmaan Qureshi2023-03-031-2/+5
|
* Update highlights.scm for PythonAnthony Shi2023-03-021-0/+2
| | | Added new keywords "is not" and "not in"
* python(highlights): adapt query to parser changeChristian Clason2023-02-281-5/+1
|
* highlights(python): fix capturesObserverOfTime2022-11-261-9/+38
|
* highlights(python): add "except*"Stephan Seitz2022-10-251-0/+1
| | | | | | Added in https://github.com/tree-sitter/tree-sitter-python/pull/176 About the feature https://realpython.com/python311-exception-groups/#exception-groups-and-except-in-python-311
* highlights: use @preproc where appropriateObserverOfTime2022-10-151-0/+4
|
* feat(spell): support more languagesLewis Russell2022-09-261-2/+1
|
* feat(spell): upstream spell queries from spellsitterLewis Russell2022-09-061-0/+4
|
* Split func/method definition from calls in python highlighting querylfenzo2022-08-031-2/+2
|
* fix: keep cls variable highlighting consistent in class methodsRyan Barth2022-06-141-10/+2
|
* Python: highlight future import (#2936)Santos Gallegos2022-05-131-0/+1
| | | | | * Python: highlight future import * Use constant.builtin
* Python: highlight raise from statementSantos Gallegos2022-05-011-0/+2
|
* fixup! highlights(python): highlight exception keywordsFerdinand Ratajczak2022-04-071-4/+0
|
* highlights(python): highlight exception keywordsFerdinand Ratajczak2022-04-071-0/+11
|
* highlights(python): "from" in yield should be `@keyword.return`Stephan Seitz2022-04-011-1/+4
| | | | Fixes #2712
* highlights(python): add support for pattern matchingStephan Seitz2022-01-281-1/+1
| | | | | Fixes #2080 Depends on https://github.com/tree-sitter/tree-sitter-python/pull/140
* Update queriesSantos Gallegos2021-12-221-1/+1
| | | | | - Don't use the old form for predicates - Update some invalid queries
* highlights(python): Improve self and cls highlight (#2134)Fabian2021-12-181-5/+8
| | | | | | | | | | | | | | | | | 1. This function simplifies an unnecessary lua-match usage. 2. Fixes an accidental change, where "cls" was changed to "class" (fe4f320b66) 3. Match functions, which have have a decorator. 4. But exclude @staticmethod 5. Only highlight "cls" as @variable.builtin when the decorator is @classmethod This might be a bit to complicated and some of this not to useful, as this existing rule: ```scm ((identifier) @variable.builtin (#eq? @variable.builtin "self")) ``` overwrites the queries anyway.
* Prefer lua-match over matchLewis Russell2021-11-231-6/+6
| | | | as string.find is much quicker than vim.regex:match*
* Python: highlight semicolonSantos Gallegos2021-11-121-1/+1
|
* chore: fix typosDundar Göc2021-11-021-1/+1
|
* Update queries/python/highlights.scmSantos Gallegos2021-11-011-1/+1
|
* Revert "feat: add `del` keyword for highlights"Santos Gallegos2021-11-011-2/+2
| | | | This reverts commit 385193d41fe6b74fe0e3698588ae54545d1cd88b.
* feat: add `del` keyword for highlightsAshish Panigrahi2021-11-011-2/+2
|
* Python: highlight interpolation escaped charsSantos Gallegos2021-10-221-1/+5
| | | | Support for these was just added in the grammar.
* Python: fix class highlights (#1548)Santos Gallegos2021-07-111-6/+7
|
* Highlights(python): Add `@keyword.function`Sergio Alejandro Vargas2021-07-061-2/+5
| | | | Use `@keyword.function` for `def` and `lambda`
* feat(keywords) merge return and yield into keyword.return groupantonk522021-07-041-4/+1
|
* feat(keywords) add keyword.return & keyword.yieldantonk522021-07-041-2/+8
|
* python(highlights): don't use type for APPStephan Seitz2021-07-011-1/+1
|
* highlights(python): use any-of?Stephan Seitz2021-05-161-9/+30
|
* Python highlights: update definition of decoratorStephan Seitz2021-01-071-1/+4
|
* Remove usages of `@embedded` in highlightsStephan Seitz2021-01-061-1/+1
|
* Python: fix self highlighingSantos Gallegos2020-12-181-1/+1
|
* Update Python queriesStephan Seitz2020-11-301-2/+8
|
* Fix Python queries for parser updateStephan Seitz2020-11-031-8/+8
|
* Dart highlights: Reset highlight in interpolationStephan Seitz2020-10-051-1/+1
|