diff options
| author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2025-09-07 19:59:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-07 09:59:31 -0700 |
| commit | 7853cde29a08aa43bcaecc9848a8b43248bf8d66 (patch) | |
| tree | 20d86fbcb99f5a3dd8cfcf38de790a8c631c1581 /runtime/syntax/python.vim | |
| parent | fd59e72b477002cef76c2cb8f59226c862ca9fb7 (diff) | |
| download | rneovim-7853cde29a08aa43bcaecc9848a8b43248bf8d66.tar.gz rneovim-7853cde29a08aa43bcaecc9848a8b43248bf8d66.tar.bz2 rneovim-7853cde29a08aa43bcaecc9848a8b43248bf8d66.zip | |
feat(pack): vim.pack.get() gets VCS info #35631
Problem:
Force resolve `spec.version` overrides the information about whether
a user supplied `version` or not. Knowing it might be useful in some use
cases (like comparing to previously set `spec` to detect if it has
changed).
Solution:
Do not resolve `spec.version`. This also improves speed when triggering
events and calling `get()`.
- Place default branch first when listing all branches.
- Use correct terminology in `get_hash` helper.
- Do not return `{ '' }` if there are no tags.
Problem:
There is no way to get more information about installed plugins, like
current revision or default branch (necessary if resolving default
`spec.version` manually). As computing Git data migth take some time,
also allow `get()` to limit output to only necessary set of plugins.
Solution:
- introduce arguments to `get(names, opts)`, which follows other
`vim.pack` functions. Plugin extra info is returned by default and
should be opt-out via `opts.info = false`.
- Examples:
- Get current revision: `get({ 'plug-name' })[1].rev`
- Get default branch: `get({ 'plug_name' })[1].branches[1]`
- `update()` and `del()` act on plugins in the same order their names
are supplied. This is less surprising.
- default `opts.info` to `true` since this simplifies logic for the
common user, while still leaving the door open for a faster `get()` if
needed.
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions