fix(lua): fields of nvim.spellfile.Opts are optional #39902

This commit is contained in:
Olivia Kinnear
2026-05-20 01:47:35 -05:00
committed by GitHub
parent a59c8a9c76
commit ea8f1463dd
2 changed files with 10 additions and 10 deletions

View File

@@ -196,13 +196,13 @@ The plugin can be disabled by setting `g:loaded_spellfile_plugin = 1`.
A table with the following fields:
Fields: ~
• {confirm} (`boolean`, default: `true`) Whether to ask user to
confirm download.
• {timeout_ms} (`integer`, default: 15000) Number of milliseconds after
which the |vim.net.request()| times out.
• {url} (`string`) The base URL from where the spellfiles are
downloaded. Uses `g:spellfile_URL` if it's set,
otherwise https://ftp.nluug.nl/pub/vim/runtime/spell.
• {confirm}? (`boolean`, default: `true`) Whether to ask user to
confirm download.
• {timeout_ms}? (`integer`, default: 15000) Number of milliseconds
after which the |vim.net.request()| times out.
• {url}? (`string`) The base URL from where the spellfiles are
downloaded. Uses `g:spellfile_URL` if it's set,
otherwise https://ftp.nluug.nl/pub/vim/runtime/spell.
config({opts}) *spellfile.config()*

View File

@@ -20,15 +20,15 @@ local M = {}
---
--- The base URL from where the spellfiles are downloaded. Uses `g:spellfile_URL`
--- if it's set, otherwise https://ftp.nluug.nl/pub/vim/runtime/spell.
--- @field url string
--- @field url? string
---
--- Number of milliseconds after which the [vim.net.request()] times out.
--- (default: 15000)
--- @field timeout_ms integer
--- @field timeout_ms? integer
---
--- Whether to ask user to confirm download.
--- (default: `true`)
--- @field confirm boolean
--- @field confirm? boolean
--- @type nvim.spellfile.Opts
local config = {