Problem:
These "foo.vim" syntax tags add 100+ useless tags to help. In
particular, "progress.vim" is the first match for "progress", which not
the result anyone is actually looking for, since Nvim 0.12 gained the
"progress-message" feature.
Solution:
Drop the "foo.vim" syntax tags. The "ft-foo" tags are more appropriately
named.
Problem: Some environment variables which are useful when working inside
a bare repository can affect any Git operation.
Solution: Explicitly unset problematic environment variables.
Problem:
There is no straightforward way to pretty-print objects as JSON.
The existing `vim.inspect` outputs LON.
Solution:
Introduce an `indent` option for `vim.json.encode()` which enables
human-readable output with configurable indentation.
Adapts PR to upstream: openresty/lua-cjson#114
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.
Problem: The document of nvim_buf_get_extmark currently lacks the
following:
- "details" directory: nvim_buf_get_extmarks() allows an option details
to get a "details" directory in result, but it doesn't mention where
that "details" directory is, what fields does it have.
Solution: Add docs for "details" directory in nvim_buf_get_extmarks()
Problem: Progress reports use plain `nvim_echo()` with manually
constructed messages and populate history on every call.
Solution: Use `nvim_echo()` with newly added `kind=progress` which (at
least for now) is meant to be a unified interface for showing progress
report. Also save in history only first and last progress report
messages.
Problem: filetype: .inc file detection can be improved
Solution: Update filetype detection for Pascal and BitBake code
(Martin Schwan).
Fix the detection of .inc files containing Pascal and BitBake code:
- the concatenated string, merged from three lines, only contains one
beginning and the pattern "^" would not match as expected. Use a range()
loop to iterate each line string individually. This way, the pattern "^"
works for beginning of lines.
- improve BitBake include file detection by also matching forward-slashes
"/" in variable names and assignment operators with a dot ".=" and "=.".
Valid examples, which should match, are:
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
MACHINEOVERRIDES =. "qemuall:"
BBPATH .= ":${LAYERDIR}"
- parse twenty instead of just three lines, to accommodate for potential
comments at the beginning of files
closes: vim/vim#182029fd1a657d2
Co-authored-by: Martin Schwan <m.schwan@phytec.de>
- Problem: It's not clear for new plugin developers that `:help` uses
a help-tags file for searching the docs, generated by `:helptags`.
- Solution: Hint to the |:helptags| docs for regenerating the tags
file for their freshly written documentation.
Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
Problem: filetype: vivado journal/log files are not recognized
Solution: Detect vivado*.{jou,log} as tcl filetype (Wu Zhenyu).
closes: vim/vim#181919a6cafdc1c
Also fix missing anchor in the pattern from the port of patch 9.1.1602.
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This change does the following to the M4 syntax script:
- In M4 there are no "strings" in the usual sense. Instead, M4 has
quotes, but the text inside a quoted region is rescanned just like
outside, and quotes can be nested.
- The old m4String region was misleading and removed. A new m4Quoted
region reflects proper quoting semantics.
- Removed a duplicate highlight rule.
- Fixed a typo in a highlight group name (m4builtin → m4Builtin).
- Added a reference link to the POSIX M4 specification.
- Removed outdated maintainer URL.
closes: vim/vim#18192f165798184
Co-authored-by: Damien Lejay <damien@lejay.be>
Problem:
insert-mode ctrl-r input is treated like raw user input, which is almost
never useful. This means any newlines in the input are affected by
autoindent, etc., which is:
- slow
- usually breaks the formatting of the input
Solution:
- ctrl-r should be treated like a paste, not user-input.
- does not affect `<c-r>=`, so `<c-r>=@x` can still be used to get the
old behavior.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
No support is provided or planned for language recognition
in code snippets of documentation comments. Requesting to
load arbitrary syntax plugins with the aid of the concerned
variable is therefore wasteful in general and erroneous when
paired languages ":syn-include" one another without taking
steps to manage circularity.
related: vim/vim#17308
related: vim/vim#17220closes: vim/vim#1817271149dfec5
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Problem:
The default progress message doesn't account for
message-status. Also, the title and percent sections don't get written
to history. And progress percent is hard to find with variable length messages.
Solution:
Apply highlighting on Title based on status. And sync the formated msg
in history too. Also updates the default progress message format to
{title}: {percent}% msg
Problem:
The callback passed to `vim.wait` cannot return results directly, it
must set upvalues or globals.
local rv1, rv2, rv3
local ok = vim.wait(200, function()
rv1, rv2, rv3 = 'a', 42, { ok = { 'yes' } }
return true
end)
Solution:
Let the callback return values after the first "status" result.
local ok, rv1, rv2, rv3 = vim.wait(200, function()
return true, 'a', 42, { ok = { 'yes' } }
end)
Problem: filetype: fvwm2m4 files are no longer recognized
(after 9.1.1687).
Solution: Add a special case in m4 filetype detection (zeertzjq).
closes: vim/vim#181465355e81868
Co-authored-by: Damien Lejay <damien@lejay.be>
These versions have exited their standard support term as of
- bullseye: 2024-08-14
- focal: 2025-05
- oracular: 2025-07-10
closes: vim/vim#18134b760062897
Co-authored-by: James McCoy <jamessan@jamessan.com>
Problem:
`msg_show` has "progress" info (title, status, percent) which is not presented
by default.
Solution:
Format TUI messages as `{title}: {msg}...{percent}%`. This also gets sent to UI.
- With specific formatting sent to UI we can remove the `progress` item from
`msg_show` event. It can be added if needed in the future. Also, having
a default presentation makes the feature more useful.
- For `vim._extui` we just need to implement the replace-msg-with-same-id
behavior.
- If any UI/plugin wants to do anything fancier, they can handle the `Progress`
event.
tmux-direct is functionally the same as tmux-256color, except it
directly reports 24-bit color and how to set them (setaf/setab)
via ncurses 6.x's extended terminfo format.