diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-09-09 11:39:03 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2025-09-09 11:39:23 +0800 |
| commit | 12868474db6fe7e4c3a1494bac26c8b0799393a3 (patch) | |
| tree | 6c4caea9e3d83c3dd1b5c7fd135fc794f6fda085 /runtime/lua/vim/_meta/api.lua | |
| parent | 53e78bec7c60fea67ef4ef05ada11ab3c058b0eb (diff) | |
| download | rneovim-12868474db6fe7e4c3a1494bac26c8b0799393a3.tar.gz rneovim-12868474db6fe7e4c3a1494bac26c8b0799393a3.tar.bz2 rneovim-12868474db6fe7e4c3a1494bac26c8b0799393a3.zip | |
vim-patch:77cfc49: runtime(python): highlight ellipsis literals
The ellipsis literal (`...`) can be used in multiple contexts:
- Placeholders: `class Foo: ...`
- Containers: `Tuple[int, ...]`
- Assignments: `x = ...`
This is a trickier pattern to match because we can't rely on keyword
boundaries, so we instead look for exactly three dots (`...`).
This does mean that we will match the `...` portion of `x...x`, which
isn't valid Python syntax, but I think that's an acceptable trade-off
that avoids making this pattern much more complex.
Reference:
- https://docs.python.org/3/library/constants.html#Ellipsis
closes: vim/vim#18107
https://github.com/vim/vim/commit/77cfc49060a50daefd1675b8a1dece0e6e943384
Co-authored-by: Jon Parise <jon@indelible.org>
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
0 files changed, 0 insertions, 0 deletions