aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python
Commit message (Collapse)AuthorAgeFilesLines
* 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(folds): fold whole functions not only bodyStephan Seitz2022-05-151-8/+9
|
* 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
* locals(python): adapt as_pattern to upstream changeStephan Seitz2022-02-071-1/+1
|
* fix: Allow re-parsing in Python, XFAIL `\` indentation testStephan Seitz2022-02-061-1/+0
|
* indents: allow aligned_indent for unfinished calls in C and PythonStephan Seitz2022-02-051-0/+2
|
* highlights(python): add support for pattern matchingStephan Seitz2022-01-282-6/+3
| | | | | Fixes #2080 Depends on https://github.com/tree-sitter/tree-sitter-python/pull/140
* feat(indent): support `@aligned_indent` for pythonMunif Tanjim2022-01-211-3/+14
|
* feat: rewrite indent moduleMunif Tanjim2022-01-211-9/+4
|
* Remove Python docstring injectionsRafik Draoui2022-01-041-18/+0
| | | | | | | | | | | | | | | | These injections lead to inconsistent highlighting since some edge cases aren't handled (as mentioned in the PR description that introduced the injections [0]). Besides, not all Python projects use reStructuredText syntax in docstrings. If someone still wants to use them, they can extend the base injection queries through `after/queries/` [1] or enable them with `vim.treesitter.set_query`. See also: https://github.com/nvim-treesitter/nvim-treesitter/pull/1204 [0]: https://github.com/nvim-treesitter/nvim-treesitter/pull/917 [1]: https://github.com/nvim-treesitter/nvim-treesitter/tree/ad69e2528ac382b7cbf28f1ac7ee450981734ab0#adding-queries
* 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-232-7/+7
| | | | as string.find is much quicker than vim.regex:match*
* Python: highlight semicolonSantos Gallegos2021-11-121-1/+1
|
* chore: fix typosDundar Göc2021-11-022-2/+2
|
* 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
|
* Revert "Comment: use `@combined` to create just one tree per buffer (#1252)"Santos Gallegos2021-05-071-1/+1
| | | | This reverts commit 4a7a713c527f57c355bc817f16fc6d955b8cce9b.
* Comment: use `@combined` to create just one tree per buffer (#1252)Santos Gallegos2021-04-281-1/+1
| | | | | | | | | | | | * Comment: use `@combined` to create just one tree per buffer There is no need to create a tree per line/block for comments. Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251 * Add injections for scss * Fix jsonc * Combine jsdoc
* Add comment parser to highlight comment tags (#893)Santos Gallegos2021-03-121-0/+2
| | | Closes #236
* Python: inject rst in docstrings (#917)Santos Gallegos2021-02-051-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since hasn't been much discussion around https://github.com/nvim-treesitter/nvim-treesitter/issues/806. I'm just porting the injection queries. I've been using this for a while now. Things I've noticed: - Due that rst uses indentation for its syntax, everything is treated as an block quote (but it looks good). This can be solved by having a predicate like `#dedent!`. - Looks like there is a bug in how the injected content is extracted ``` def foo(): """Foo bar""" ``` That would be parsed as a section title for some reason, but it's a paragraph. In rst it would be a title if the content was: ``` """ Foo bar """ ``` If the content is ``` """Foo bar""" ``` That's just a paragraph. I'll try to debug that from the neovim side next week or so.
* indent: add Python @ignore queriesJędrzej Boczar2021-01-141-0/+4
|
* indent: add Python @return queriesJędrzej Boczar2021-01-141-0/+6
|
* Python highlights: update definition of decoratorStephan Seitz2021-01-071-1/+4
|
* Python locals: Add new node with_clauseStephan Seitz2021-01-071-1/+2
|
* Remove usages of `@embedded` in highlightsStephan Seitz2021-01-061-1/+1
|
* Python highlights: Add regex injections: re.match(r"...")Stephan Seitz2021-01-031-0/+6
|
* Python (folds): allow to fold stringsSantos Gallegos2021-01-021-0/+2
| | | | Mostly useful for folding docstrings
* Improve python/indents.scmJędrzej Boczar2020-12-211-7/+29
|
* Python: fix self highlighingSantos Gallegos2020-12-181-1/+1
|
* Update indents.scmEvan2020-12-181-0/+2
|
* Create indents.scm for pythonEvan2020-12-181-0/+14
|