summaryrefslogtreecommitdiff
path: root/queries/python/highlights.scm
AgeCommit message (Collapse)Author
2021-12-22Update queriesSantos Gallegos
- Don't use the old form for predicates - Update some invalid queries
2021-12-18highlights(python): Improve self and cls highlight (#2134)Fabian
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.
2021-11-23Prefer lua-match over matchLewis Russell
as string.find is much quicker than vim.regex:match*
2021-11-12Python: highlight semicolonSantos Gallegos
2021-11-02chore: fix typosDundar Göc
2021-11-01Update queries/python/highlights.scmSantos Gallegos
2021-11-01Revert "feat: add `del` keyword for highlights"Santos Gallegos
This reverts commit 385193d41fe6b74fe0e3698588ae54545d1cd88b.
2021-11-01feat: add `del` keyword for highlightsAshish Panigrahi
2021-10-22Python: highlight interpolation escaped charsSantos Gallegos
Support for these was just added in the grammar.
2021-07-11Python: fix class highlights (#1548)Santos Gallegos
2021-07-06Highlights(python): Add `@keyword.function`Sergio Alejandro Vargas
Use `@keyword.function` for `def` and `lambda`
2021-07-04feat(keywords) merge return and yield into keyword.return groupantonk52
2021-07-04feat(keywords) add keyword.return & keyword.yieldantonk52
2021-07-01python(highlights): don't use type for APPStephan Seitz
2021-05-16highlights(python): use any-of?Stephan Seitz
2021-01-07Python highlights: update definition of decoratorStephan Seitz
2021-01-06Remove usages of `@embedded` in highlightsStephan Seitz
2020-12-18Python: fix self highlighingSantos Gallegos
2020-11-30Update Python queriesStephan Seitz
2020-11-03Fix Python queries for parser updateStephan Seitz
2020-10-05Dart highlights: Reset highlight in interpolationStephan Seitz
2020-09-19fix(python): use `@Normal` again for f-strings `@none` is not aggressive enoughStephan Seitz
2020-09-19Add @keyword.operator for operators that are English words and add ↵Stephan Seitz
@exception for Java/JS
2020-09-15reset python interpolation nodekiyan42
2020-09-14Fix #307: Use and document TSVariable/TSVariableBuiltin in all languagesStephan Seitz
2020-09-11ci: fix wrong queriesThomas Vigouroux
2020-08-20Python highlights: add additional operatorsStephan Seitz
This is applies the upstream PR to our repo: https://github.com/tree-sitter/tree-sitter-python/pull/73
2020-08-18Python: fix some highlightsSantos Gallegos
These aren't valid lua patterns
2020-08-17Python: update highlightsSantos Gallegos
- Fix "as" outside imports - Add builtin classes and constants
2020-08-17chore(highlights): remove is predicate usageSteven Sojka
2020-08-16Python: update highlightsSantos Gallegos
- Get rid of @self - Highlight methods correctly - Highlight self as the first parameter of a method - Use new syntax (# for predicates, (_) instead of (*) for wildcards)
2020-08-16fix(queries): use vim-match for non lua regexesSteven Sojka
2020-08-16feat(highlights): add is predicateSteven Sojka
2020-08-14Python highlights: Highlight ->, ...Stephan Seitz
2020-07-22Fix #198: prefer method highlighting over attributeStephan Seitz
2020-07-22Python highlights: add lambda parametersStephan Seitz
2020-07-20Python highlights: highlight functions with self as methods (#198)Stephan Seitz
Also highlight __init__/__new__ as constructor
2020-07-09Python highlights: Surround type subscript query with (type ...)Stephan Seitz
2020-07-08Highlight complete type definitionStephan Seitz
2020-07-08Python locals/highlights: Parameters can be optionally typedStephan Seitz
2020-06-30add python asynckiyan42
2020-06-26Python highlights: Reset highlighting in f-string interpolationStephan Seitz
This solution is preferable to `(identifier) @Normal` since otherwise everything without highlight will use string-highlighting.
2020-06-26Python highlights: Add walrus operatorStephan Seitz
2020-06-24Adapt Python highlights to new query syntaxStephan Seitz
2020-06-21Add highlighting of dunder identifiers (e.g. __all__, __add__) to Python ↵Stephan Seitz
highlights
2020-06-21Updated python highlightsJakub Łuczyński
* allow for digits in constant names * removed redundant/conflicting rules * added missing hlmap * fixed escape_sequence * more explicit @constructor assignment * added rules for function decoration identifiers
2020-05-28Improve Python highlightsStephan Seitz
- Highlight types in attributes as @type (**Foo**.a) - Highlight superclasses @type - Highlight ^[A-Z] as @type - Highlight isinstance(*, type) as @type - Highlight default_parameter and keyword_argument as @parameter - Highlight *args, **kwargs as @parameter - Highlight -> as @operator
2020-05-17Introduce `@include`Stephan Seitz
2020-05-17Add python/highlights.scm from tree-sitter-pythonStephan Seitz