aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin
Commit message (Collapse)AuthorAge
...
* | refactor(defaults): edit global cwd on "1-" #41254Nathan Zeng2026-08-11
| | | | | | | | | | | | | | | | | | Problem: `1-` does nothing from a directory buffer, because we are already in the buffer-local CWD. It's also unintuitive that this mapping behaves differently based on the resolved CWD. Solution: Have `1-` open the global CWD.
* | feat(dir): set buffer-local CWD #41174Barrett Ruth2026-08-06
| |
* | fix(editorconfig): avoid trim_trailing_whitespace in insert-mode #41175Oleh Kostiuk2026-08-05
| | | | | | | | | | | | | | | | | | | | | | Problem: During insert-mode / replace-mode, `autowrite` may trigger. If it does, the cursor position can shift due to the automatic removal of trailing spaces on the current line. When I resume typing, the space between the last word and the new word is suddenly gone. Solution: Disable the "remove trailing spaces" handler during Insert (or a similar) mode. Autosave logic is not affected.
* | fix(dir): preserve alternate file #41177Barrett Ruth2026-08-05
| |
* | test: unreliable "nvim.zip … incorrect password" #41159Justin M. Keyes2026-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: FAILED …/plugin/zip_spec.lua @ 442: nvim.zip reports an incorrect archive password Expected values to be equal. Expected: true Actual: false stack traceback: …/plugin/zip_spec.lua:453: in function <…/plugin/zip_spec.lua:442> Solution: The message is scheduled, so poll for it.
* | fix(lsp): ignore (and log once) invalid documentSelector globs #41055Rocco Vaccone2026-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Client:_get_registrations() errors if a documentSelector pattern is not a valid glob (e.g. "**/**.dart" from dartls). The error discards already-matched registrations and propagates to supports_method() and the client/registerCapability handler, disabling capabilities unrelated to the offending pattern. Solution: Skip invalid globs. Treat them as non-matching, and log once per client. (Similar approach was taken for filewatcher globs: 4d9e5acfb5ee081b5b0761205c8a8c36ed7e49e5)
* | Merge #41112 from erdivartanovich/dir-failed-open-recoveryJustin M. Keyes2026-08-04
|\ \
| * | fix(dir): do not swallow errors raised after the list callbackerdivartanovich2026-08-04
| | | | | | | | | | | | | | | | | | | | | | | | Problem: An error raised after the list handler ran (e.g. while rendering) unwinds through the pcall around provider.list() and is routed back into the now no-op handler: silently discarded. Solution: Re-raise the error when the handler has already run.
| * | fix(dir): keep a listing buffer when the initial listing failserdivartanovich2026-08-04
| |/ | | | | | | | | | | | | | | | | | | | | | | Problem: A failed initial directory listing discards the listing state: the user is left in an empty modifiable non-listing buffer, and the BufEnter autocmd retries the failing open, repeating the error on every re-entry. Solution: Render the failure as an empty listing with state and handlers intact: the error is reported once and "R" or :edit retries the listing. Keep the error on the listing state so a failed listing is distinguishable from an empty one; the next list clears it.
* | fix(zip): only refuse a cwd unzip on WindowsBarrett Ruth2026-08-03
| |
* | refactor(zip)!: address entries with zip:// pathsBarrett Ruth2026-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `zipfile://{archive}::{entry}` is ambiguous: `::` is legal in both an archive path and an entry path, so the separator cannot be identified. Splitting at the last `::` reads archives correctly but breaks entries that contain it, and the plugin then emits buffer names it cannot read back. Solution: Address entries as `zip://{archive}/{entry}`, joining the two paths. Resolve the split by walking components: the first one that is a regular file is the archive, because a regular file cannot have children on disk. Entry paths may then contain any character, and no escaping is needed. zipPlugin.vim keeps its own scheme, so the Java ftplugin emits whichever form matches the active plugin until the legacy package is removed.
* | Merge #41088 from barrettruth/feat/zip-health-encryptionJustin M. Keyes2026-08-03
|\ \ | | | | | | feat(zip): checkhealth and encrypted entries
| * | fix(zip): do not warn when zip.lua is disabledBarrett Ruth2026-08-03
| | |
| * | feat(zip): checkhealth and encrypted entriesBarrett Ruth2026-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There is no health check. Encrypted entries cannot be read at all, since Info-ZIP takes a password only from a terminal and `-P` would expose it in the process arguments. Solution: Add `:checkhealth nvim.zip`, reporting the backend and which implementation is handling archives. Prompt for the password on a pty, extracting to a file so the entry's bytes stay off the terminal. Report Info-ZIP's exit code rather than inferring a cause, so an archive using AES is not reported as a failed decryption.
* | | fix(lsp): only send `didSave` to clients attached to the buffer (#41126)Maria Solano2026-08-03
|/ /
* | test(lsp-selection): of by onealtermo2026-08-01
| | | | | | | | | | | | | | The test uses the position col=5,row=5; but such a position is outside of the buffer. Presume that it was meant to be col=5,row=4...
* | feat(options): lua closure/function optionsJustin M. Keyes2026-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot assign Lua functions/closures to "func" ('completefunc', 'tagfun', …) or "expr" ('foldexpr', 'indentexpr', …) options. Solution: - Store "func"/"expr" options as `Callback` instead of string. - Delete oceans of copy-pasted code. - BREAKING: LuaRef returned via RPC/Vimscript is now represented as `"<Lua N: file:line>"` (like what `:map` shows) instead of `nil`. - Note: `man.vim` still uses `v:lua` string, bc it's a vimscript ftplugin. Helped-by: Lewis Russell <lewis6991@gmail.com>
* | fix(test): group zip tests and drop repeated setupBarrett Ruth2026-07-29
| |
* | test(zip): cover difficult member namesBarrett Ruth2026-07-29
| |
* | feat(zip): extract archive membersBarrett Ruth2026-07-29
| |
* | fix(zip): list a valid empty archive as emptyBarrett Ruth2026-07-29
| |
* | fix(zip): keep a leading dash from becoming a backend optionBarrett Ruth2026-07-29
|/
* refactor(zip)!: builtin zip.lua plugin #40846Barrett Ruth2026-07-29
| | | | | | | | | | Problem: The bundled `zip` plugin is implemented in Vimscript, making it harder to maintain and build on with Nvim's Lua runtime infrastructure. Solution: Add an opt-out `zip.lua` browser backed by `nvim.dir`, and disable the legacy Vimscript implementation by moving it to `pack/dist/opt/zip/`. Load it with `:packadd zip`.
* fix(dir): "-" on a non-file buffer opens a bogus path #41034Barrett Ruth2026-07-28
|
* fix(pack): do not write the lockfile when installing from it #41031Evgeni Chasnovski2026-07-28
| | | | | | | | | | | | Problem: Installing plugins during lockfile synchronization always writes the lockfile, even though its content is used during install. This might be a problem if the lockfile (itself or its parent directory) is not writeable (can only be read). Solution: Do not write the lockfile when installing directly from it. This is okay since the `src` and `rev` are used directly from the lockfile and don't change at this step. While potential change in `version` (that must be written to the lockfile) is handled in other code path.
* fix(lsp): multibyte fragment treated as commit char #41019glepnir2026-07-28
| | | | | | | | | | Problem: commit_chars_str() reads a 0x80-0xBF byte as a 2-byte lead, so "\xA9x" makes "x" a commit character. nvim_get_hl() returns a dict, so `#` on it is 0 whether or not the group exists Solution: use vim.str_utf_end() and drop entries that are not one whole character. use next check dict length.
* feat(dir): open cwd with `1-` #40948Barrett Ruth2026-07-27
|
* fix(man): use direct lookup without manpath #40421Josh Hirschkorn2026-07-27
| | | | | | | | | | | Problem: On NetBSD, `man -w open` can return the exact manpage path, but `:Man` may still fail when man directories cannot be discovered from `manpath -q`, bare `man -w`, or `$MANPATH`. Solution: Fall back to the direct manpage lookup when directory discovery fails. Add a test for resolving `open(2)` through `goto_tag()` without manpath data.
* test: start plugin specs with `--clean` #40995Barrett Ruth2026-07-27
|
* Merge #40910 from barrettruth/fix/dir-literal-env-pathsJustin M. Keyes2026-07-26
|\
| * fix(dir): preserve environment variables in pathsBarrett Ruth2026-07-25
| |
* | fix(dir): `:browse edit` opens dir browser #40930Barrett Ruth2026-07-25
| | | | | | | | | | | | | | | | Problem: `:browse edit` (and variants) without an argument fails instead of opening a browser. Solution: Dispatch to dir.lua using the cwd as the implied directory. Replace the inherited GUI-only documentation with the supported behavior. Support vsplit, split, tabedit variants.
* | feat(health): improvements to :checkhealth #40935Olivia Kinnear2026-07-24
| | | | | | | | | | | | | | Changes: - Removed the blank line before the first healthcheck header. - Fixed a bug where the entire "Terminal" section of `vim.health` would not appear if the `infocmp` executable was not found. - Fixed a typo in `vim.lsp` when displaying the LSP log level.
* | feat(dir): support counts for parent navigation #40927Barrett Ruth2026-07-24
| |
* | fix(dir): open CWD from unnamed buffer with `-` mapping #40926Barrett Ruth2026-07-24
|/
* feat(dir): provider framework #40738Barrett Ruth2026-07-22
| | | | | | | | | Problem: The core behaviors of `nvim.dir` cannot be reused by consumers such as the archive plugin, ssh browser, etc. Solution: - Define a basic "provider" shape. - Extract the filesystem provider.
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* fix(lsp): incorrect rendering of markdown codeblock #40861Justin M. Keyes2026-07-20
| | | | | | | | | | | | Problem: LSP hover erroneously drops blank lines before a 4-space-indented codeblock, which is not valid Markdown. This causes incorrect parsing and wrong display. Solution: Fix `split_lines` so that it doesn't drop the blank line just before a 4-space-indented codeblock. fix https://github.com/neovim/neovim/issues/40860
* fix(lsp): preview window converted to normal window is auto-closed (#40770)Rocco Vaccone2026-07-19
| | | | | | | | | | | | | Problem: A floating preview window (hover, signature help) converted to a normal window (e.g. with CTRL-W_H or nvim_win_set_config()) is still closed by the open_floating_preview() autocommands, and a later preview may focus or close it as if it were still a float. Solution: When the preview window is no longer floating, remove its auto-close autocommands and stop tracking it as the buffer's floating preview. Closes #36659
* fix(ui): combine float border with window background #40796Artem Krinitsyn2026-07-19
| | | | | | | | | | Problem: Float border highlight groups (FloatBorder, FloatTitle and FloatFooter) fall back to Normal background highlight if no background color set. Solution: Combine border colors with window-local Normal highlight. Fix #38330
* test(pack): "vim.pack" tests fail on local machineJustin M. Keyes2026-07-18
|
* feat(completion): support completionList.applyKind #40769glepnir2026-07-17
| | | | | | | | | | | Problem: values from completionList.itemDefaults always replace the item's own commitCharacters and data. Since 3.18 a server can ask for them to be merged instead. Solution: Handle CompletionList.applyKind and advertise applyKindSupport. Drop itemDefaults once folded into the items: get_items() runs twice on the same result and a Merge isn't idempotent. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#completionItemApplyKinds
* fix(dir): custom 3P directory-browser #40725Barrett Ruth2026-07-16
| | | | | | | | | | Problem: Third-party directory browsers do not have a documented way to take over local directory buffers from nvim.dir. Solution: Document deleting the nvim.dir augroup and handling FileType directory as the after-startup handoff, and avoid installing the built-in buffer-local "-" mapping when "-" is already mapped.
* feat(completion): commitCharacters #38417glepnir2026-07-15
| | | | | | | | | Problem: LSP completion commitCharacters are not handled. Typing a commit character (e.g. `.`, `(`, `;`) while a completion item is selected does not accept the item first. Solution: Store commit characters as a flat string in complete-items. Check it before completion stops, accept the match and let the character be inserted normally.
* fix(dir): let 3P dir-browser plugin rename the dir buffer #40529Barrett Ruth2026-07-13
| | | | | | | | | | | | | | | | | | | Problem: `FileType directory` fires *before* the `BufEnter` path where `dir.lua` populates the buffer, in order to allow a 3P dir-browser plugin to handle the event and (optionally) rename the buffer to e.g. `example:///tmp/foo/`. But currently, `open_buffer()` continues after `filetypedetect BufRead` as if the original directory buffer is *still* current and valid, which may fall through to the built-in `nvim.dir` path after a 3P plugin ALREADY handled the directory. Solution: Keep a buf ref around the early `filetypedetect BufRead` call for directory buffers. If the `FileType directory` handler switches away from/deletes the original directory buffer, stop the open path instead of continuing into the built-in `nvim.dir` flow.
* test(pack): unreliable "vim.pack" tests on Windows #40717Justin M. Keyes2026-07-13
| | | | | | | | | | | FAILED …/plugin/pack_spec.lua:92: …/plugin/pack_spec.lua @ 70: vim.pack update() can use lockfile revision as a target …/plugin/pack_spec.lua:92: …/plugin/pack_spec.lua:70: process still exists stack traceback: D:/a/neovim/neovim/test/functional/testnvim/exec_lua.lua:124: in function 'system_sync' …/plugin/pack_spec.lua:92: in function 'git_cmd' …/plugin/pack_spec.lua:113: in function 'git_add_commit' …/plugin/pack_spec.lua:1209: in function <…/plugin/pack_spec.lua:1173> fix #40167
* fix(filetype): trigger FileType after BufReadCmd #40679Barrett Ruth2026-07-13
| | | | | | | | | | | | | Problem: A successful `BufReadCmd` can leave an existing `filetype` without rerunning its `FileType` setup, so state cleared during reload may not be restored. This also causes `:edit`/reload syntax `directoryDirectory` groups to not be reapplied. Solution: After `BufReadCmd` handles a read, trigger `FileType` for the existing `filetype` if no `FileType` event fired during the read.
* fix(path): normalize separators (slashes) #39155tao2026-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Continue separators normalization, and try to keep it at the nvim <-> external boundary, e.g., `fn.xxx`, `api.xxx`, `:xxx` Solution: some key changes - normalize `$HOME-windows` - normalize entry points of changing directory - `nvim_set_current_dir()`, `chdir()` - normalize the named pipe - `--listen` arg, `--server` arg, `:restart` - `serverstart()`, `sockconnect()`, `serverstop()` - make `expand()` respect 'shellslash' again - clean up `did_set_shellslash` - replace `forward_slash` with `TO_SLASH` - remove obsolete `TMP_PATHSEPSTR` - remove `slash_adjust` in `do_autocmd_dirchanged`? - make `fnamemodify()` always return `/` (except when substituting separators via `:s`, `:gs` ?) Note: - these funcs still apply `slash_adjust` on return, as before: `:pwd`, `chdir()`, `exepath()`, `getcwd()` - these funcs alwarys return `/`, unlike before the normalization PRs - `getcompletion()`, `finddir()`, `findfile()` Also - clean up code, comments, formatting and tests - move `TO_SLASH` from `f_chdir` to `changedir_func` - move `TO_SLASH` from `f_bufadd` to `buflist_new` Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(lsp): unclear error on malformed server responses #40422Kim A. Brandt2026-07-12
| | | | | | | | | Problem: Malformed server responses with `null` (vim.NIL) values, do not show clear error messages. Solution: Assert two known, specific cases, to avoid user confusion.
* test(dir): "replace `-` mapping" hangs the Windows CIJustin M. Keyes2026-07-11
|