ObserverOfTime
9b43ab819c
highlights: use @preproc where appropriate
2022-10-15 08:49:01 -07:00
Lewis Russell
37398c7d68
feat(spell): support more languages
2022-09-26 13:47:12 +01:00
Lewis Russell
2a63ea5665
feat(spell): upstream spell queries from spellsitter
2022-09-06 12:44:19 +01:00
lfenzo
ae87408513
Split func/method definition from calls in python highlighting query
2022-08-03 12:05:30 -07:00
Ryan Barth
e6ff4c8084
fix: keep cls variable highlighting consistent in class methods
2022-06-14 22:35:14 +02:00
Santos Gallegos
f1373051e5
Python: highlight future import ( #2936 )
...
* Python: highlight future import
* Use constant.builtin
2022-05-13 21:46:06 +00:00
Santos Gallegos
132405f18f
Python: highlight raise from statement
2022-05-01 10:06:13 +02:00
Ferdinand Ratajczak
74a455c01e
fixup! highlights(python): highlight exception keywords
2022-04-07 23:24:18 +02:00
Ferdinand Ratajczak
1fb68f76af
highlights(python): highlight exception keywords
2022-04-07 23:24:18 +02:00
Stephan Seitz
b8d1c2445a
highlights(python): "from" in yield should be @keyword.return
...
Fixes #2712
2022-04-01 17:00:21 +02:00
Stephan Seitz
c4e3564ea3
highlights(python): add support for pattern matching
...
Fixes #2080
Depends on https://github.com/tree-sitter/tree-sitter-python/pull/140
2022-01-28 19:11:20 +01:00
Santos Gallegos
56634f49ab
Update queries
...
- Don't use the old form for predicates
- Update some invalid queries
2021-12-22 21:17:28 +01:00
Fabian
e01c7ce972
highlights(python): Improve self and cls highlight ( #2134 )
...
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-12-18 16:49:30 -05:00
Lewis Russell
011ac894ec
Prefer lua-match over match
...
as string.find is much quicker than vim.regex:match*
2021-11-23 10:02:06 +01:00
Santos Gallegos
6888242b98
Python: highlight semicolon
2021-11-12 19:51:04 +01:00
Dundar Göc
6a4fdb317d
chore: fix typos
2021-11-02 23:47:48 +01:00
Santos Gallegos
6d08b25f0e
Update queries/python/highlights.scm
2021-11-01 16:54:46 +01:00
Santos Gallegos
df06643aa1
Revert "feat: add del keyword for highlights"
...
This reverts commit 385193d41f .
2021-11-01 16:54:46 +01:00
Ashish Panigrahi
385193d41f
feat: add del keyword for highlights
2021-11-01 13:19:27 +01:00
Santos Gallegos
10419ee747
Python: highlight interpolation escaped chars
...
Support for these was just added in the grammar.
2021-10-22 09:21:42 +02:00
Santos Gallegos
948fa6a260
Python: fix class highlights ( #1548 )
2021-07-11 15:06:52 -05:00
Sergio Alejandro Vargas
017760113a
Highlights(python): Add @keyword.function
...
Use `@keyword.function` for `def` and `lambda`
2021-07-06 00:53:40 +02:00
antonk52
90f15d9bf7
feat(keywords) merge return and yield into keyword.return group
2021-07-04 21:49:17 +02:00
antonk52
bd9095e969
feat(keywords) add keyword.return & keyword.yield
2021-07-04 21:49:17 +02:00
Stephan Seitz
6d5b4f19f3
python(highlights): don't use type for APP
2021-07-01 22:50:33 +02:00
Stephan Seitz
fe4f320b66
highlights(python): use any-of?
2021-05-16 21:13:12 +02:00
Stephan Seitz
b441f257a4
Python highlights: update definition of decorator
2021-01-07 08:52:41 +01:00
Stephan Seitz
40588da97c
Remove usages of @embedded in highlights
2021-01-06 09:12:32 -05:00
Santos Gallegos
1ad1f3b35a
Python: fix self highlighing
2020-12-18 20:33:04 +01:00
Stephan Seitz
b3a3403e25
Update Python queries
2020-11-30 11:19:22 +01:00
Stephan Seitz
1e0ab0b885
Fix Python queries for parser update
2020-11-03 20:26:08 +01:00
Stephan Seitz
93f9708a3c
Dart highlights: Reset highlight in interpolation
2020-10-05 06:37:31 +02:00
Stephan Seitz
cd9cab7990
fix(python): use @Normal again for f-strings @none is not aggressive enough
2020-09-19 15:06:04 -05:00
Stephan Seitz
7e3c4f8089
Add @keyword.operator for operators that are English words and add @exception for Java/JS
2020-09-19 07:30:49 +02:00
kiyan42
2fe1f2877e
reset python interpolation node
2020-09-15 00:19:04 +02:00
Stephan Seitz
bcf421b4e7
Fix #307 : Use and document TSVariable/TSVariableBuiltin in all languages
2020-09-14 18:27:20 +02:00
Thomas Vigouroux
b90e520ccd
ci: fix wrong queries
2020-09-11 12:02:35 +02:00
Stephan Seitz
5c0ca925af
Python highlights: add additional operators
...
This is applies the upstream PR to our repo:
https://github.com/tree-sitter/tree-sitter-python/pull/73
2020-08-20 11:51:30 +02:00
Santos Gallegos
fe8d91b748
Python: fix some highlights
...
These aren't valid lua patterns
2020-08-18 10:31:42 -05:00
Santos Gallegos
6effdfbdc4
Python: update highlights
...
- Fix "as" outside imports
- Add builtin classes and constants
2020-08-17 22:23:46 +02:00
Steven Sojka
cab8717959
chore(highlights): remove is predicate usage
2020-08-17 19:27:35 +02:00
Santos Gallegos
cf37d143bf
Python: update highlights
...
- 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-16 22:00:11 +02:00
Steven Sojka
ce43dbf54c
fix(queries): use vim-match for non lua regexes
2020-08-16 18:31:56 +02:00
Steven Sojka
579c9936d6
feat(highlights): add is predicate
2020-08-16 09:04:07 -05:00
Stephan Seitz
187dc8e3f5
Python highlights: Highlight ->, ...
2020-08-14 13:53:00 +02:00
Stephan Seitz
5d696053e5
Fix #198 : prefer method highlighting over attribute
2020-07-22 17:30:48 +02:00
Stephan Seitz
b893592398
Python highlights: add lambda parameters
2020-07-22 17:30:48 +02:00
Stephan Seitz
969edeeced
Python highlights: highlight functions with self as methods ( #198 )
...
Also highlight __init__/__new__ as constructor
2020-07-20 08:57:12 +02:00
Stephan Seitz
c361d65113
Python highlights: Surround type subscript query with (type ...)
2020-07-09 10:00:41 +02:00
Stephan Seitz
0e80b89935
Highlight complete type definition
2020-07-08 17:47:44 +02:00