summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/plugin
AgeCommit message (Collapse)AuthorFiles
2026-04-05fix(net): handle remote archive URLs via tar/zip browse #38744Tom Ampuero1
Problem: Opening .tar.gz or .zip URLs shows raw binary instead of using the archive plugins. Solution: Similar to the original netrw implementation, the autocmd should detect archive URLs, download them to a temp file and the open them with tar/zip handlers already bundled as vim plugins.
2026-03-23feat(net): vim.net.request(outbuf) writes response to buffer #36164Yochem van Rosmalen1
Problem: Non-trivial to write output of vim.net.request to buffer. Requires extra code in plugin/net.lua which can't be reused by other plugin authors. ``` vim.net.request('https://neovim.io', {}, function(err, res) if not err then local buf = vim.api.nvim_create_buf(true, false) if res then local lines = vim.split(res.body, '\n', { plain = true }) vim.api.nvim_buf_set_lines(buf, 0, -1, true, lines) end end end) ``` Solution: Accept an optional `outbuf` argument to indicate the buffer to write output to, similar to `outpath`. vim.net.request('https://neovim.io', { outbuf = buf }) Other fixes / followups: - Make plugin/net.lua smaller - Return objection with close() method - vim.net.request.Opts class - vim.validate single calls - Use (''):format(...) instead of `..`
2026-03-23refactor: rename termcap.lua -> tty.lua #38437Justin M. Keyes1
Problem: The `termcap.lua` module is too narrowly named. We may need a place for tty-related functionality in the future. https://github.com/neovim/neovim/pull/31399#discussion_r1882598297 Solution: This isn't a public/documented interface, so just rename it.
2026-03-23fix(runtime)!: move "tohtml" to pack/dist/opt/ #34557Justin M. Keyes3
Problem: The "tohtml" plugin is loaded by default. Solution: - Move it to `pack/dist/opt/nvim.tohtml/`, it is an "opt-in" plugin now. - Document guidelines. - Also revert the `plugin/` locations of `spellfile.lua` and `net.lua`. That idea was not worth the trouble, it will be too much re-education for too little gain.
2026-03-12docs: use "ev" convention in event-handlersJustin M. Keyes3
Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
2025-12-20feat(cmdline): completion for :TOhtml #37045Eric Wong1
2025-11-19fix(vim.net): filetype detection, mark unmodified #36297Michele Sorcinelli1
Problem: When running ":edit <url>", filetype detection is not triggered. Solution: Run the autocmds in the filetypedetect group after loading the content. Problem: After fetching remote content from a URL and adding it to the buffer, the buffer is marked as modified. This is inconsistent with the original netrw behavior, and it causes problems with `:e` to refresh or `:q` as it prompts for saving the file even if the user hasn't touched the content at all. Solution: Mark the buffer as unmodified right after adding the remote content to the buffer.
2025-11-09refactor(spellfile): config() interface, docs #36481Yochem van Rosmalen1
Problem: - Exposing the raw config as table is a pattern not seen anywhere else in the Nvim codebase. - Old spellfile.vim docs still available, no new documentation Solution: - Exposing a `config()` function that both acts as "getter" and "setter" is a much more common idiom (e.g. vim.lsp, vim.diagnostic). - Add new documentation and link old docs to |spellfile.lua| instead of |spellfile.vim|.
2025-10-26refactor(spell): cleanupJustin M. Keyes1
- prefer `stdpath(data)/site/spell` instead of looking for random dirs in 'runtimepath'. - drop unused functions `choose_directory`, `setup`, etc.
2025-10-26refactor(spell): migrate to Lua, drop netrw dependencyTom Ampuero2
Problem: Spell file downloads relied on Vimscript and netrw (:Nread). If netrw is disabled, downloads fail. Solution: Port the logic to Lua as `nvim.spellfile` and wire it via a Lua plugin that handles `SpellFileMissing`. Use `vim.net.request()` with a timeout for HTTP, prompt via `vim.fn.input` and report via `vim.notify`. Closes #7189
2025-10-07vim-patch:8824526: runtime(zip): add *.pkpass to list of zip extensions (#36061)zeertzjq1
Similar to a359c9c25e5c3c1e543fc720223aa7256e6f72cf. See https://developer.apple.com/documentation/walletpasses/building-a-pass#Sign-the-Pass-and-Create-the-Bundle, which explicitly mentions that pkpasses are just renamed ZIPs. closes: vim/vim#18501 https://github.com/vim/vim/commit/882452644cd3258c887a09de856e4c59eb284a92 Co-authored-by: MultisampledNight <contact@multisamplednight.com>
2025-08-22feat(tui): add nvim_ui_send (#35406)Gregory Anders1
This function allows the Nvim core to write arbitrary data to a TTY connected to a UI's stdout.
2025-07-23fix(shada): check return value is 0Yochem van Rosmalen1
Problem: Vimscript functions return number to signal ok/error. Lua doesn't convert these to be falsey. Solution: Explicitly check if the return value is 0.
2025-07-23refactor(shada): switch plugin/shada.vim to Lua #34725Yochem van Rosmalen2
2025-07-18vim-patch:9.1.1552: [security]: path traversal issue in tar.vimzeertzjq1
Problem: [security]: path traversal issue in tar.vim (@ax) Solution: warn the user for such things, drop leading /, don't forcefully overwrite files when writing temporary files, refactor autoload/tar.vim tar.vim: drop leading / in path names A tar archive containing files with leading `/` may cause confusions as to where the content is extracted. Let's make sure we drop the leading `/` and use a relative path instead. Also while at it, had to refactor it quite a bit and increase the minimum supported Vim version to v9. Also add a test for some basic tar functionality closes: vim/vim#17733 https://github.com/vim/vim/commit/87757c6b0a4b2c1f71c72ea8e1438b8fb116b239 Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-17Merge pull request #34860 from gpanders/push-lorwmnmtysntGregory Anders1
feat(tui): use DA1 response to determine OSC 52 support
2025-07-13feat(net): vim.net.request(), :edit [url] #34140Tom Ampuero1
Problem: Nvim depends on netrw to download/request URL contents. Solution: - Add `vim.net.request()` as a thin curl wrapper: - Basic GET with --silent, --show-error, --fail, --location, --retry - Optional `opts.outpath` to save to a file - Operates asynchronously. Pass an `on_response` handler to get the result. - Add integ tests (requires NVIM_TEST_INTEG to be set) to test success and 404 failure. - Health check for missing `curl`. - Handle `:edit https://…` using `vim.net.request()`. API Usage: 1. Asynchronous request: vim.net.request('https://httpbingo.org/get', { retry = 2 }, function(err, response) if err then print('Fetch failed:', err) else print('Got body of length:', #response.body) end end) 2. Download to file: vim.net.request('https://httpbingo.org/get', { outpath = 'out_async.txt' }, function(err) if err then print('Error:', err) end end) 3. Remote :edit integration (in runtime/plugin/net.lua) fetches into buffer: :edit https://httpbingo.org/get
2025-07-09feat(tui): use DA1 response to determine OSC 52 supportGregory Anders1
Many terminals now include support for OSC 52 in their Primary Device Attributes (DA1) response. This is preferable to using XTGETTCAP because DA1 is _much_ more broadly supported.
2025-05-22fix: use nvim namespace convention #34010Yochem van Rosmalen1
2025-05-13vim-patch:9.1.1384: still some problem with the new tutors filetype pluginbrianhuster1
Problem: still some problem with the new tutors filetype plugin Solution: refactor code to enable/disable tutor mode into tutor#EnableInteractive() function, include a test (Phạm Bình An) I find it annoying that Tutor's interactive mode is always on (or debug mode is off) even when I open a tutor file with :edit command. I think it makes more sense to make this "interactive mode": - Always on when it is opened with :Tutor command - Off otherwise For more references, see `:help` feature, it is a much better than :Tutor, since I don't have to run `:let g:help_debug = 1` just to be able to edit and save a help file Therefore, I remove `g:tutor_debug` closes: vim/vim#17299 https://github.com/vim/vim/commit/13bea589a25707c8f9e29b2920410bdcccd79bc5 Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
2025-05-13vim-patch:3704b5b: runtime(tutor): improve tutor.vim plugin and filetype pluginbrianhuster1
- Set g:tutor_debug on startup if it doesn't exist so that users can get cmdline completion when interactively setting it. - set b:undo_ftplugin in filetype plugin - set default runtime file headers closes: vim/vim#17274 https://github.com/vim/vim/commit/3704b5b58ace1163522188e3228996c15e56820e Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
2025-04-12fix(man.lua): noisy "ENOENT" error on Windows #33409Emanuel Krollmann1
Problem: :Man shows noisy "ENOENT: no such file or directory" error on Windows. Solution: Do some checks before calling `vim.system`.
2025-04-10vim-patch:9.1.1289: tests: no test for matchparen plugin with WinScrolled ↵zeertzjq1
event (#33411) Problem: tests: no test for matchparen plugin with WinScrolled event Solution: add missing test closes: vim/vim#10942 https://github.com/vim/vim/commit/96a0b2a6d5107580398435e263bd529d4ba3df49 Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-03vim-patch:a359c9c: runtime(zip): add *.whl to the list of zip extensionszeertzjq1
This commits adds the extension *.whl to the list of zip extensions. Wheel (WHL) files are binary distribution files for python packages. Reference: https://packaging.python.org/en/latest/specifications/binary-distribution-format/ fixes: vim/vim#17038 https://github.com/vim/vim/commit/a359c9c25e5c3c1e543fc720223aa7256e6f72cf Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-03-15vim-patch:9.1.1203: matchparen keeps cursor on case label in sh filetype ↵zeertzjq1
(#32900) Problem: matchparen keeps cursor on case label in sh filetype (@categorical, after 9.1.1187). Solution: Use :defer so that cursor is always restored, remove checks for older Vims, finish early if Vim does not support :defer fixes: vim/vim#16887 closes: vim/vim#16888 https://github.com/vim/vim/commit/47071c6076018cace96f6e567054a21c123d0c10
2025-03-12fix: update osc52 termfeatures flag on UIEnter/UILeave (#32756)Gregory Anders1
Problem: Nvim tries to use OSC 52 even when no TUIs are attached. Solution: On each UIEnter/UILeave event, check that there is a TUI client connected to Nvim's stdout.
2025-03-09vim-patch:9.1.1187: matchparen plugin wrong highlights shell case statement ↵zeertzjq1
(#32798) Problem: matchparen plugin wrong highlights shell case statement (Swudu Susuwu) Solution: return early, if we are in a shSnglCase syntax element The shell syntax element "case $var in foobar)" uses closing parenthesis but there is no corresponding opening parenthesis for that syntax element. However matchparen is not aware of such things and will happily try to match just the next opening parenthesis. So let's just add a way to opt out for such cases. In this case, use the syntax state to check if the closing parenthesis belongs to the syntax item "shSnglCase" and if it is, do not try to find a corresponding opening parenthesis. Since inspecting the syntax state might be expensive, put the whole check behind a filetype test, so that matchparen will only perform this particular check, when it knows the current buffer is a "sh" filetype. fixes: vim/vim#16801 closes: vim/vim#16831 https://github.com/vim/vim/commit/9102ac11ab3938ec8c15bfebd00d2f91d3f1cd6c Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-03-01vim-patch:56957ed: runtime(misc): add support for bzip3 to tar, vimball and ↵Christian Clason2
gzip plugins fixes: vim/vim#16751 closes: vim/vim#16755 https://github.com/vim/vim/commit/56957ed4109fb0c37922c6c37d5926cfe0a3313b Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
2025-02-07vim-patch:b69cd52: runtime(misc): Add support for lz4 to tar & gzip plugin ↵zeertzjq2
(#32360) while at it, clean up the tar plugin a bit and sort the patterns for the tar and gzip plugin References: - https://github.com/lz4/lz4 - https://lz4.org/ closes: vim/vim#16591 https://github.com/vim/vim/commit/b69cd52447584cedadc1513aa3acd5b4cd9f4340 Co-authored-by: Corpulent Robin <177767857+corpulentrobin@users.noreply.github.com>
2025-01-18vim-patch:9cfdabb: runtime(netrw): change netrw maintainerChristian Clason1
Dr. Chip retired some time ago and is no longer maintaining the netrw plugin. However as a runtime plugin distributed by Vim, it important to maintain the netrw plugin in the future and fix bugs as they are reported. So, split out the netrw plugin as an additional package, however include some stubs to make sure the plugin is still loaded by default and the documentation is accessible as well. closes: vim/vim#16368 https://github.com/vim/vim/commit/9cfdabb074feefc9848e9f7a4538f201e28c7f06 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-01-14refactor: use nvim.foo.bar format for autocommand groupsMaria José Solano2
2025-01-04fix(runtime): let matchit and matchparen skips fallback on treesitter capturesEmilia Simmons1
When treesitter is enabled, by default syntax groups are not defined, but these groups are used to identify where to skip matches in matchit and matchparen. This patch does three things: 1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`): Use original implementation. 2. If treesitter is enabled and syntax is not: Match the syntax groups (i.e. `comment\|string`) against treesitter captures to check for skipped groups. 3. Add an explicit treesitter syntax for marking captures to skip: matchit uses `b:match_skip` to determine what counts as skippable Where 's:comment\|string' uses a match of the named syntax groups against a regex match of comment\|string, 't:comment\|string' now uses vim regex to match against the names of the treesitter capture groups.
2024-12-31feat(clipboard)!: use OSC 52 as fallback clipboard provider (#31730)Gregory Anders1
We currently enable the OSC 52 clipboard provider by setting g:clipboard when a list of conditions are met, one of which is that $SSH_TTY must be set. We include this condition because often OSC 52 is not the best clipboard provider, so if there are "local" providers available Nvim should prefer those over OSC 52. However, if no other providers are available, Nvim should use OSC 52 even when $SSH_TTY is not set. When a user is in an SSH session then the checks for the other clipboard providers will still (typically) fail, so OSC 52 continues to be enabled by default in SSH sessions. This is marked as a breaking change because there are some cases where OSC 52 wasn't enabled before and is now (or vice versa).
2024-12-20vim-patch:c363ca1: runtime(netrw): change indent size from 1 to 2 (#31648)zeertzjq1
closes: vim/vim#16248 https://github.com/vim/vim/commit/c363ca1ecd1f8db03663ef98dcf41eeacc3c22c7 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2024-12-18refactor(man.lua): various changesLewis Russell1
- Replace all uses of vim.regex with simpler Lua patterns. - Replace all uses of vim.fn.substitute with string.gsub. - Rework error handling so expected errors are passed back via a return. - These get routed up an passed to `vim.notify()` - Any other errors will cause a stack trace. - Reworked the module initialization of `localfile_arg` - Updated all type annotations. - Refactored CLI completion by introduction a parse_cmdline() function. - Simplified `show_toc()` - Refactor highlighting - Inline some functions - Fix completion on MacOS 13 and earlier. - Prefer `manpath -q` over `man -w` - Make completion more efficient by avoiding vim.fn.sort and vim.fn.uniq - Reimplement using a single loop
2024-11-05vim-patch:59834ba: runtime(matchparen): Add matchparen_disable_cursor_hl ↵Christian Clason1
config option Set the "matchparen_disable_cursor_hl" config variable to disable highlighting the cursor with the MatchParen highlighting group. closes: vim/vim#15984 https://github.com/vim/vim/commit/59834ba6df10dc48565bf55ac6c8e8a4aa40210b Co-authored-by: Matteo Landi <matteo@matteolandi.net>
2024-10-31vim-patch:8b0fa7a: runtime(netrw): make :Launch/Open autoloadablezeertzjq1
fixes: vim/vim#15959 closes: vim/vim#15962 https://github.com/vim/vim/commit/8b0fa7a565d8aec306e5755307d182fa7d81e65f Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-10-31vim-patch:d69ffbe: runtime(netrw): add missing change for s:redir()zeertzjq1
Somehow, that change got lost in commit 70197885 https://github.com/vim/vim/commit/d69ffbe4bc2196c4fc2b9377167a9a194213a686 Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-31vim-patch:7019788: runtime(netrw): improve netrw's open-handling furtherzeertzjq1
closes: vim/vim#15956 https://github.com/vim/vim/commit/70197885a8957071e4ab6816141ce6e8026635c6 Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-10-31vim-patch:7c96776: runtime(netrw): fix syntax error in netrwPlugin.vimzeertzjq1
https://github.com/vim/vim/commit/7c96776729a671b7c5f6be81bc29d860920ea1c1 Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-31vim-patch:3d7e567: runtime(netrw): simplify gx file handlingzeertzjq1
It did not work very well, at least on Debian 12, and I am not sure Git Bash and WSL, for example, were taken care of as maintenance stalled. The whole logic was somewhat convoluted with some parts repeatedly invoking failed commands. The file handling was outdated, for example, nowadays Netscape is rarely used, and also opinionated, for example mainly Microsoft Paint and Gimp for Image files. Instead, let's use (xdg-)open and similar commands on other systems which respects the user's preferences. closes: vim/vim#15721 https://github.com/vim/vim/commit/3d7e567ea7392e43a90a6ffb3cd49b71a7b59d1a Co-authored-by: Konfekt <Konfekt@users.noreply.github.com> Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
2024-08-25vim-patch:9.1.0694: matchparen is slow on a long line (#30134)zeertzjq1
Problem: The matchparen plugin is slow on a long line. Solution: Don't use a regexp to get char at and before cursor. (zeertzjq) Example: ```vim call setline(1, repeat(' foobar', 100000)) runtime plugin/matchparen.vim normal! $hhhhhhhh ``` closes: vim/vim#15568 https://github.com/vim/vim/commit/81e7513c86459c40676bd983f73c2722096d67a9
2024-07-16fix(tohtml): support ranges againaltermo1
2024-05-18vim-patch:94043780196c (#28831)zeertzjq1
runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797) fixes: neovim/neovim#28828 https://github.com/vim/vim/commit/94043780196cc66d23eeec10e2c722c6552324e0
2024-05-09vim-patch:1e34b95e4402Christian Clason1
runtime(netrw): Remove and cleanup Win9x legacy from netrw closes: vim/vim#14732 https://github.com/vim/vim/commit/1e34b95e4402fd8964ea4bcee0d2b6ffa6677aab Co-authored-by: Nir Lichtman <nir@lichtman.org>
2024-04-05feat(defaults): add :Inspect to right-click menu (#28181)zeertzjq1
Ref #21393 - Move default user commands to _defaults.lua as that now contains all kinds of defaults rather than just default mappings and menus. - Remove the :aunmenu as there are no menus when _defaults.lua is run.
2024-03-12vim-patch:9.1.0167: Changing buffer in another window causes it to show ↵zeertzjq1
matchparen (#27820) Problem: Changing buffer in another window using win_execute() causes it to show matchparen (after 9.0.0969). Solution: Delay highlighting with SafeState in BufWinEnter. (zeertzjq) closes: vim/vim#14177 https://github.com/vim/vim/commit/49ffb6b428e1e053446ec0209558a8f9d0963ae7
2024-02-28fix(tohtml): set filetype of generated HTML to `html`Christian Clason1
Problem: `:TOhtml` opens the generated HTML code in a split, meaning it inherits the `help` filetype if a help buffer is to be converted. Solution: Explicitly set the filetype to `html`.
2024-02-28feat!: rewrite TOhtml in luaaltermo2
Co-authored-by: wookayin <wookayin@gmail.com> Co-authored-by: clason <c.clason@uni-graz.at> Co-authored-by: Lewis Russell <me@lewisr.dev>
2024-02-21vim-patch:f9ca139e3aa1 (#27554)zeertzjq2
runtime(misc): announce adoption of various runtime files https://github.com/vim/vim/commit/f9ca139e3aa12dd03177ebba5eedcee4f0836f27 Co-authored-by: Christian Brabandt <cb@256bit.org>