| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements "extended registers"
Extended registers provide access to a separate namespace of registers
backed by custom lua callback functions.
A new special register ("~) is introduced, which prompts the user for
the name of an extregistr to yank or paste from.
This enables file-backed or cloud-synced or other arbitrary register
behavior.
One can now use:
`"~file_extreg<cr>yy`
to yank into the "file_extreg" register.
AI-assisted: Qwen3-Coder
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Work towards enabling ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
in all `:help` files.
Problem:
The final boss of vimdoc pseudo-structure: Vim's quasi-headings on
function signatures and excmd docs is visually distinctive but too
inconsistent for a nice parse rule.
Solution:
- Define the quasi-heading format as an "h4" variant, specified at
`:help help-tag-heading`.
- For simplicity and predictability, it is defined as any line that
ends with a help tag(s) preceded by 2 or more spaces (or 1 tab).
- Update existing docs.
- This one-time update has a lot of changes, but is very unlikely to
conflict with ported Vim-patches because (1) Vim rarely adds new
*excmds* that we want, and (2) *function* docs are auto-generated.
ref https://github.com/neovim/tree-sitter-vimdoc/issues/110
|
| |
|
|
|
|
|
|
| |
Problem:
By default, 'termpastefilter' removes TAB chars when pasting to a :terminal.
Very annoying, and does not improve "security".
Solution:
Drop "HT" from the 'termpastefilter' default.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
options (#42403)
Problem: gitrevlist's keywordprg "git show" doesn't realise that input
should never be interpreted as an option. (Note that it is in
practice impossible to pass a value that is interpreted as an
option, but this expresses intent and is defensive.)
Solution: pass --end-of-options to force input to be interpreted as
arguments.
related: vim/vim#20702
closes: vim/vim#21472
https://github.com/vim/vim/commit/4eae1d03e82c5b775a25c097509562efd350a8a3
Co-authored-by: Fionn Fitzmaurice <git@fionn.computer>
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
TM_DIRECTORY expands to the directory's basename, losing its parent path.
Solution:
Remove the tail modifier when expanding the current file's directory.
Extend the existing known-variable test to check the full directory path.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: watchdirs() keeps its state in large nested callbacks in
_watch.lua, which makes its directory tracking logic harder to change.
Solution: Move the backend into its own module and store its state in a
WatchDirs instance. Split setup, event handling and cleanup into
methods. Extend the existing test to cover cancellation while a
directory stat is pending.
AI-assisted
|
| |
|
|
|
|
|
|
|
| |
Problem:
No "spec" for various :help format (vimdoc) conventions, including the
new "table" support.
Solution:
Introduce `:help help-spec`.
Also, bump the vimdoc parser.
|
| |
|
|
|
|
|
|
|
|
| |
Work towards enabling "flow" layout in most `:help` files.
Since [tables are supported in help](https://github.com/neovim/tree-sitter-vimdoc#tables),
it's now possible to render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739),
flow layout will allow `:help` presentation-mode to un-hardwrap text
blocks.
|
| |
|
|
|
|
|
|
|
|
| |
Work towards enabling "flow" layout in most `:help` files.
Since [tables are supported in help](https://github.com/neovim/tree-sitter-vimdoc#tables),
it's now possible to render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739),
flow layout will allow `:help` presentation-mode to un-hardwrap text
blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: [security]: code injection via cargo quickfix plugin
(Daniel Dalvelac)
Solution: Use chdir() instead of string executing a cd command
Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-x2w5-pj55-7hpc
fyi @gpanders
https://github.com/vim/vim/commit/b93c000ddfc27c6a1192bcba77204709536cf094
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
After edits move diagnostic ranges, counted jumps resume searching from
their original positions. This can revisit the same diagnostic and hang
the default first/last diagnostic mappings.
Solution:
Advance the search origin using the diagnostic's current logical position.
Test forward and backward counted jumps after inserting or deleting a
line, including jumps to the last or first diagnostic without wrapping.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Accepting an item from another completion source raises an error when its
user_data.nvim table does not contain LSP metadata.
Solution:
Retrieve and guard the nested LSP metadata before accessing its fields.
Cover acceptance of a foreign completion item without LSP metadata.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
An empty snippet insertText falls back to the label during selection, but
acceptance clears that label and expands an empty string.
Solution:
Require nonempty insertText before expanding a snippet without textEdit.
Extend the omnifunc acceptance fixture with an empty snippet insertion.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
A completion list default edit range can replace the explicit range of an
InsertReplaceEdit, filtering out valid items or changing their replacement.
Solution:
Only synthesize a default text edit when the completion item has none.
Extend the existing itemDefaults test for explicit edits with both range variants.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Snippet completion words and previews prefer insertText even when textEdit
is present, although the actual expansion uses textEdit.newText.
Solution:
Use the text edit before the fallback insertion text in both selectors.
Extend the existing precedence test to check the snippet word and preview.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
| |
Work towards enabling "flow" layout in most `:help` files.
Since [tables are supported in
help](https://github.com/neovim/tree-sitter-vimdoc#tables), it's now possible to
render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739),
flow layout will allow `:help` presentation-mode to un-hardwrap text blocks.
https://github.com/neovim/neovim/issues/31825
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
Active-feature report text is passed to string.format() without
arguments. Percent signs in buffer or client names can raise an error
or change the displayed text.
Solution:
Report the concatenated text without formatting it again.
AI-assisted
|
| |
|
|
|
|
|
|
| |
Problem: Custom ui2 window tracks 'fillchars' option to adjust to the
change of `msgsep` flag. However, 'fillchars' is `:h global-local`
window option. If it is set locally to the window, ui2 reacts to its
`msgsep` value and keeps using it afterwards even in other windows.
Solution: Use and react to only global value of 'fillchars'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Highlight inspection is limited to a single position, and its
result types do not document the fields shared by different highlight
sources.
Solution: Accept end_row/end_col in vim.inspect_pos to inspect a range.
Keep range ends exclusive and retain the existing single-position
behavior.
Support Ex line ranges in :Inspect, including Visual selections.
Document named result types, expose shared highlight fields, and keep
the existing extmark details and buffer field for compatibility.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
The timeout handler raises an error before jobstop(), leaving the
provider probe running after the healthcheck fails.
Solution:
Stop the job before raising the timeout error.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Provider checks start and wait for a job, then execute the same command
again to obtain its output. The returned output can disagree with the
first process's exit status, and the second execution has no timeout.
Solution:
Return the first job's captured output. Bind the output callbacks to
their state and preserve line breaks between callback data entries.
Cover invocation count, multiline stdout, and merged stderr.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
The configuration check compares the boolean 'paste' option to 1, so it
never reports that the option is enabled.
Solution:
Check the boolean value directly and cover enabled and disabled states.
AI-assisted
|
| |
|
| |
highlights.scm: `#match` is slow, prefer `#lua-match`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
vim.diagnostic.Opts.VirtualText has a `source` option to prefix
diagnostic messages with their source (`'if_many'` or always), but the
newer virtual_lines handler never got the same option, even though the
shared helpers it needs (diagnostic_shared.prefix_source/count_sources)
are already render-target-agnostic and used by virtual_text as-is.
Add the same `source` field to vim.diagnostic.Opts.VirtualLines and
apply it in the virtual_lines handler right after message formatting,
mirroring virtual_text's own ordering (format first, then prefix the
source onto the already-formatted message).
|
| |
|
|
|
| |
Generate PDF using `chrome`.
TODO: we probably don't need the `typst` codepath.
|
| |
|
|
|
|
| |
Render tables in both `:help` and generated HTML.
Use NBSP (nonbreaking space) char in empty table cells.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- `<` before a listitem (`< - foo`) is not concealed.
- Codeblock HTML has extra blank lines.
- Codeblock in a listitem ends the listitem, so HTML docs drop the rest
of the item and its nesting. Example from `:h nvim_open_win()`:
```
• border: … the double-box style can be specified as: >
[ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ].
<
If fewer than eight chars are given, they will be repeated.
• bufpos: …
tree-sitter-vimdoc v4.1.0:
(block
(line_li (prefix) (line) (codeblock (code (line)))))
(block
(line) ; "If fewer…"
(line_li (prefix) (line) (line))) ; "bufpos"
tree-sitter-vimdoc v4.2.0:
(block
(line_li (prefix) (line) (codeblock (code (line)))
(line)) ; "If fewer…"
(line_li (prefix) (line) (line))) ; "bufpos"
```
Solution:
- Bump tree-sitter-vimdoc to v4.2.0. https://github.com/neovim/tree-sitter-vimdoc/pull/174
- gen_help_html: get listitem indent from its first line
- gen_help_html: don't double codeblock newlines.
- highlight query: conceal `<` in `line_li`.
- docs: fix doc sources where a blank line was missing after listitems
followed by non-listitem text.
|
| |
|
|
|
|
|
|
|
|
|
| |
via filename
While at it, also fix E716 when calling gnat.Get_Command('Find')
by renaming the key from 'Find_Program' to the expected 'Find_Command'.
https://github.com/vim/vim/commit/26d8c851889df19e93dde2a3572e1e356b3a84e3
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
| |
|
|
|
|
| |
https://github.com/vim/vim/commit/abb6f3ea4cf61ec1b5702a6fbb6be2594549fb16
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
| |
|
|
|
| |
Fixes some vimdoc CI errors: https://github.com/neovim/tree-sitter-vimdoc/blob/0c53e5be84a62cee1e583b15febf2b90720e52c9/.github/workflows/main.yml#L41-L47
The other errors are "lone backtick" cases, which will be fixed by https://github.com/neovim/tree-sitter-vimdoc/pull/171
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`nvim_set_option_value('fo', {'c','r','o'}, {operation='remove'})` does
nothing on "jcqrol": the items are joined into one `:set-=` value, which
only matches a contiguous substring. Removing map keys, e.g. {'eol','space'}
from 'listchars', never matches. `vim.opt:remove{…}` inherits this.
(Regression from f34ee3da80e8; 429338e74bf4 fixed the case where the
flags are adjacent and in order.)
Solution:
Remove each item separately.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in ftplugins (#42340)
Problem: The current test 'exists(':terminal') == 2' is valid even in
Vim builds that have the terminal not included (e.g. normal
feature builds) and thus the K key would cause an error:
"E319: Sorry, the command is not available in this version" or
"E117: Unknown function: term_start()"
Solution: Change the terminal feature test to "has('terminal')" to
properly detect Vims without the terminal feature and use
exists('*term_start') for functionality that depends on Vims
support for the term_start() feature. While at it, change the
Last Change date to the preferred style for Vim runtime files.
https://github.com/vim/vim/commit/d6f7a03f7c569d84f34259c68dabfe9b357ba0fb
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
After clearing cursors, "]C" "[C" do nothing, although the previous
cursor positions ("gQ") may still be useful as marks.
Solution:
If multicursor is not active, "]C" "[C" iterate the
"nvim.multicursor.last" extmarks. They also work as an operator motion
("d]C"), since there is no cascade.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: [security]: code injection via rmd syntax pattern for fenced
languages (ylerni7-ant)
Solution: Keep only the leading word characters of the language name
in the syntax script.
Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-x2w5-pj55-7hpc
https://github.com/vim/vim/commit/7670338d8b695c476de868dabd34d68d6de2443b
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: [security]: possible code injection via rubycomplete
(tnshima)
Solution: Do not use eval() for arbitrary buffer text
Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4xgr-vqh2-xfx8
https://github.com/vim/vim/commit/05d704d2856dbb75e95bd33cf222c2e6264fff8b
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
| |
lookup
https://github.com/vim/vim/commit/52ce28a4ad0ec9df8eebb6556ebf677cc46ddbe8
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
| |
keywordprg
https://github.com/vim/vim/commit/0fa670400bda8d78f90287c9b80af57fbb76ef55
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
| |
https://github.com/vim/vim/commit/40295c92be643a09d6443121637fa93d6cd105a1
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
- `v:cascading` is false during the Insert-mode live-preview.
- `vim.on_key()` sees the internal keys of the Visual-selection preview
and "zq" steps.
Solution:
- Set `v:cascading` during the Insert-mode preview.
- Don't send internal keys to `on_key` callbacks.
- Use `v:cascading` as the source of truth for `mc_replaying()`.
|
| |
|
|
|
| |
Problem: No way to check if cascade is in action.
Solution: Add `v:cascading` variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
With multicursors, an Insert-mode edit by a Lua/`<Cmd>` mapping or API
(nvim_put(), …) is live-previewed at the other cursors, but dropped at
ESC: the cascade replays _redo_, which does not contain such edits.
Solution:
When `<Cmd>`/Lua/RPC changes the buffer during Insert-mode, sync the
previews and restart the capture (like a non-captured cursor-move). The
edit stays as text.
- The mapping runs only at the primary. Its text is mirrored as-is
(similar to insert-completion). Re-running it per cursor would require
a "partial-remap" span replay, and breaks single-session plugins
(vim.snippet).
- Not during completion; redo already captures the pre-inserted
candidate on accept.
- Text typed before the edit is kept as mirrored, not replayed, so
per-cursor effects ('textwidth' wrapping, …) don't apply to it.
Known issues:
- "o"/"O"/"cc" with 'autoindent' followed by the mapping: the per-cursor
insert-entry replay is still pending, so the edit is lost.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
Handlers defer `show()` on unloaded buffers with a buffer-local BufRead
autocmd whose id is stored per-namespace:
- `noautocmd bwipeout` deletes the autocmd, so the next show/hide fails.
- Showing another buffer in the same namespace cancels the pending show.
Solution:
Handlers skip unloaded buffers. The existing global BufRead autocmd
shows cached diagnostics when the buffer loads.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`nvim --embed --listen addr` always treats stdin as an RPC channel. If
stdin is /dev/null (e.g. backgrounded over ssh), the channel closes
before a UI can attach, so Nvim exits (detach=false behavior). If stdin
is a tty, keystrokes are read as RPC.
Solution:
With `--embed --listen`, open the stdio RPC channel only if stdin is
a pipe or socket. Else wait for a UI at the `--listen` address.
$ nvim --embed --listen ./nvim.sock
Nvim server (pid: 71984) waiting for UI, listening on: "./nvim.sock"
Note:
- No change when stdin is a pipe. So the test harness, TUI, and :restart
all behave exactly as before.
- The #29634 use-case of configuring a UI that attaches *after* startup
(a second UI, or reattach) still requires #25377 (reliable UIEnter).
Not affected by this change.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Only the stdio channel can "own" a server (self-exit on close). After
:restart the TUI reconnects over a socket, so the restarted server does
not have "self-exit" behavior when the channel closes (e.g. by UI
disconnect, host-terminal close, etc.), which leaves a dangling server.
Solution:
- Introduce `nvim_chan_set`. (`nvim_set_client_info` doesn't fit:
exposing it to Lua would require a `channel` param, which is not
backwards-compatible, plus it's awkward because it doesn't merge info.)
- Broadcast per-channel properties in the "restart" UI event as an
opaque dict (a potentially useful pattern for other UI-events in the
future).
- UIs are expected to restore the channel properties on restart.
- `nvim_get_chan_info()` reports "detach".
- Remove `nvim__chan_set_detach()`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Remove duplicate STRUCT definition.
- Add Genie NEW, alias for HEAP.
closes: vim/vim#21435
https://github.com/vim/vim/commit/b114ec4791f41f97a4306e1efe5c319852c51ec7
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Janis Papanagnou <janis_papanagnou@hotmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
usage with re=1
- Fix typescriptArrowFuncDef pattern memory errors when regexpegine=1.
- Add a test.
fixes: vim/vim#17247
related: vim/vim#21400
closes: vim/vim#21423
https://github.com/vim/vim/commit/cff1d9e4e73a390ce3da333a8536d0490ce15d20
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| |\
| |
| | |
perf(watch): skip directories outside include glob prefixes
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|