Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@superatomic
Copy link
Contributor

@superatomic superatomic commented Dec 5, 2025

Problem

Setups which wish to download files non-interactively via nvim --headless +qall! have no way to configure spellfile.lua to download files without prompting. Additionally, some users with a fast internet connection may wish to avoid a prompt when downloading spellfiles interactively.

Solution

Based off of vim.pack.add()'s confirm option, which allows for downloading plugins without confirmation, introduce a similar option to the builtin spellfile.lua plugin. This option defaults to true, so there is no change in behavior for users which do not opt in.

@github-actions github-actions bot added the spell spellcheck label Dec 5, 2025
@superatomic superatomic force-pushed the spellfile.lua-confirm-opt branch 2 times, most recently from fd912de to dad3ae0 Compare December 6, 2025 02:11
@superatomic superatomic marked this pull request as ready for review December 6, 2025 02:35
test/functional/plugin/spellfile_spec.lua Outdated Show resolved Hide resolved
Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No major objection but we should start thinking about a global flag similar to the existing 'confirm' option, because it's getting pretty repetivie to add these flags everywhere. Unfortunately the existing 'confirm' has a very narrow purpose and likely can't be re-used :(

Also if more enhancements are planned for this we need to find a way to not have 30 lines of new test code for every trivial feature. But for this PR I don't see a way to avoid it.

@superatomic superatomic force-pushed the spellfile.lua-confirm-opt branch from dad3ae0 to 768d17f Compare December 6, 2025 22:03
rtp_dir
)

neq(0, out.requests)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for future reference, t.ok usually enables more meaningful tests instead of neq:

t.ok(out.requests > 0, '>0', out.requests)

@justinmk justinmk merged commit 4e1644d into neovim:master Dec 6, 2025
33 of 35 checks passed
@superatomic superatomic deleted the spellfile.lua-confirm-opt branch December 6, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spell spellcheck

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.