| Age | Commit message (Collapse) | Author | Files |
|
pattern performance (#38263)
- Improve the performance of all pythonNumber patterns by unrolling
digit/underscore sequence loops.
- Split the float literal pattern into two simpler patterns.
fixes: vim/vim#19625 (Reported by James McCoy)
closes: vim/vim#19630
https://github.com/vim/vim/commit/2cf18fcc240030880bbd138e5174e436a3f20823
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Also add syntax tests for those newly constants.
closes: vim/vim#17788
closes: vim/vim#18922
https://github.com/vim/vim/commit/632fd8bb968b029d0a7c40a00101008ea5200b91
Co-authored-by: Rob B <github@0x7e.net>
|
|
- Highlight t-strings
- Update comments
- Add tests
closes: vim/vim#18679
https://github.com/vim/vim/commit/8d8c9074c3cbb33b2b8b97556bdb7267e2617b93
Co-authored-by: Rob B <github@0x7e.net>
|
|
The previous patterns unintentionally highlighted words like 'typename'.
addresses: https://github.com/vim/vim/pull/18090#issuecomment-3333025523
closes: vim/vim#18394
https://github.com/vim/vim/commit/900c747da393b031f3347428fb640224ac2f5442
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
pattern (#35724)
fixes: vim/vim#18263
closes: vim/vim#18264
https://github.com/vim/vim/commit/15070eee2f1e11a69a4c2d99bad03c8f6756e6e0
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
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>
|
|
highlighting
Fix matching of floats at the beginning of an f-string replacement
field, immediately after the opening brace.
The existing pattern, using `\zs`, cannot consume the already matched
`{` so use a lookbehind instead.
See comment: https://github.com/vim/vim/pull/17962#issuecomment-3201550443
closes: vim/vim#18220
https://github.com/vim/vim/commit/6bb16d2cee87f834f003bf368ce70c5688242ac1
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
pythonType
related: vim/vim#17962
closes: vim/vim#18206
https://github.com/vim/vim/commit/f1212a7b4554f2f544b581f7e819d6ef67c5e9ad
Co-authored-by: Rob B <github@0x7e.net>
|
|
fixes: vim/vim#14033
closes: vim/vim#17962
https://github.com/vim/vim/commit/d2b28ddfc2a7350c2f63b75d06cc53d17b3a66ff
Co-authored-by: Rob B <github@0x7e.net>
|
|
`type` became a soft keyword in Python 3.12. In that form, it is a
statement that declares a type alias:
# type_stmt ::= 'type' identifier [type_params] "=" expression
type Point = tuple[float, float]
To implement support for this, this change does three things:
1. adds a `pythonType` group (linked to `Type`)
2. matches `type` followed by an identifier as `pythonStatement`
3. continues to match `type` in other forms as `pythonBuiltin`
Ref:
- https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
- https://docs.python.org/3/reference/simple_stmts.html#the-type-statement
closes: vim/vim#18090
https://github.com/vim/vim/commit/99964e2ea704465f25207c519fefb2bb6d6931bb
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
Order the keywords by expected frequency: "def" and "class" are assumed
to be more likely than "async def" in the majority of Python code.
closes: vim/vim#18032
https://github.com/vim/vim/commit/2f7e4eb335df389d73aaeb2ff6879b233c1a293f
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
script (#35328)
These are special names by convention, and giving them distinct
highlighting is a nice visual clue (using Identifier by default).
This group is named "pythonClassVar" to match the name used by
python-syntax. Some third-party color schemes are aware of this
name and customized their colors accordingly.
closes: vim/vim#17968
https://github.com/vim/vim/commit/1ee1d9b43da37b157a91662a312415e4db400ba9
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
A file containing only async functions (`async def func()`) wouldn't
previously match the pythonSync pattern.
Also, this pattern only matches at the beginning of the line, so it
won't ever match method definitions (which are indented within class
scopes). Update the comment accordingly.
closes: vim/vim#17963
https://github.com/vim/vim/commit/dba9eb46e622efe39331b75d0c57c5d8b61b526f
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
Python
Highlight f-string replacement fields, including
- Comments
- Debugging flags
- Conversion fields
- Format specifications
- Delimiters
Syntax inside fields will be addressed in a separate commit.
related: vim/vim#10734
related: vim/vim#14033
closes: vim/vim#17784
https://github.com/vim/vim/commit/a94a0555d911da0d3bcd7e91d76c8e8ef03d9b0e
Co-authored-by: Rob B <github@0x7e.net>
|
|
Class and function definitions previously shared a single highlight
group (pythonFunction). This change gives classes their own highlight
group (pythonClass) that's linked to Structure.
closes: vim/vim#17856
https://github.com/vim/vim/commit/48b7eb1ceb16527640ce5853d876c432d7342532
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
fixes: vim/vim#10734
fixes: vim/vim#14033
closes: vim/vim#17767
https://github.com/vim/vim/commit/b7fc24d3a3d21ccf1461c703eb7ff07ef3994c54
Co-authored-by: Rob B <github@0x7e.net>
|
|
- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals
fixes: vim/vim#14033
fixes: vim/vim#17726
closes: vim/vim#17728
https://github.com/vim/vim/commit/a24f5be86d895981cb84266f98bae9f14407264b
Co-authored-by: Rob B <github@0x7e.net>
|
|
literals in syntax script
This change:
* enforces that the alias starts with a letter
* allows the other words in an alias to be separated by either a space
or a hyphen, but not both or double separators
* allows only a letter after space, possibly followed by letters or
digits
* allows both letters and digits after a hyphen
Tested with:
a = '\N{Cyrillic Small Letter Zhe} is pronounced as zh in pleasure'
b = '\N{NO-BREAK SPACE} is needed here'
# ... other tests here
r = '\N{HENTAIGANA LETTER E-1} is a Japanese hiragana letter archaic ye'
s = '\N{CUNEIFORM SIGN NU11 TENU} is a correction alias'
t = '\N{RECYCLING SYMBOL FOR TYPE-1 PLASTICS} base shape is a triangle'
print(a)
print(b)
print(r)
print(s)
print(t)
The tests confirm the behavior and are selected from real Unicode
tables/aliases to check these combinations based on the specification.
fixes: vim/vim#17323
closes: vim/vim#17735
https://github.com/vim/vim/commit/6f85cec4fbc1d1261c67a339a11792dd8f2efd14
Co-authored-by: Zvezdan Petkovic <zpetkovic@acm.org>
|
|
Update runtime files
https://github.com/vim/vim/commit/71badf9547e8f89571b9a095183671cbb333d528
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
vim-patch:partial:dd60c365cd26
Update runtime files
https://github.com/vim/vim/commit/dd60c365cd2630794be84d63c4fe287124a30b97
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Skip: eval.txt, repeat.txt (needs `getscriptinfo()`)
|
|
Update runtime files
https://github.com/vim/vim/commit/2ecbe53f452e92e941aff623f6a0b72f80e43d07
|
|
Update runtime files
https://github.com/vim/vim/commit/0e6adf8a29d5c2c96c42cc7157f71bf22c2ad471
|
|
Update runtime files.
https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849
Omit vim9.
|
|
Runtime file updates.
https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Closes #5055
|
|
Updated runtime files.
https://github.com/vim/vim/commit/d07969093a9b3051511c478d71c36de6fc33c0d6
|
|
Updated runtime files. Remove HiLink commands.
https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
|
|
Updated runtime files. Remove version checks for Vim older than 6.0.
https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
|
|
Updated runtime files. Add Scala files.
https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
|
|
Updated runtime files.
https://github.com/vim/vim/commit/6f1d9a096bf22d50c727dca73abbfb8e3ff55176
|
|
Updated runtime files.
https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Ignore changes to:
* doc/channel.txt, doc/eval.txt: Channel related docs
* doc/options.txt: GUI related docs
* doc/tags: Generated at build time
* doc/todo.txt: Irrelevant for Neovim
|
|
Update various runtime files.
https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
|
|
Updated and new runtime files.
https://github.com/vim/vim/commit/f91328100db34996ed7e7a800bed0a30ff0890dd
|
|
Updated runtime files.
https://github.com/vim/vim/commit/541f92
|
|
"""\"""" was highlighted incorrectly. The fix is simply adding skip=+\\["']+ to
the syntax of triple-quoted strings.
Closes #3151
|
|
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7
Excluding:
Amiga icons (*.info, icons/)
doc/hangulin.txt
tutor/
spell/
lang/ (only used for menu translations)
macros/maze/, macros/hanoi/, macros/life/, macros/urm/
These were used to test vi compatibility.
termcap
"Demonstration of a termcap file (for the Amiga and Archimedes)"
Helped-by: Rich Wareham <rjw57@cam.ac.uk>
Helped-by: John <john.schmidt.h@gmail.com>
Helped-by: Yann <yann@yann-salaun.com>
Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com>
Helped-by: drasill <github@tof2k.com>
Helped-by: Tae Sandoval Murgan <taecilla@gmail.com>
Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>
|