mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 22:39:08 +00:00
refactor(spellfile): config() interface, docs #36481
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|.
This commit is contained in:
committed by
GitHub
parent
cf347110c1
commit
9bdb011a50
@@ -42,7 +42,7 @@ describe('nvim.spellfile', function()
|
||||
local requests = 0
|
||||
vim.net.request = function(...) requests = requests + 1 end
|
||||
|
||||
s.load_file('en_gb')
|
||||
s.get('en_gb')
|
||||
|
||||
return { prompted = prompted, requests = requests }
|
||||
]],
|
||||
@@ -88,7 +88,7 @@ describe('nvim.spellfile', function()
|
||||
end
|
||||
end
|
||||
|
||||
s.load_file('en_gb')
|
||||
s.get('en_gb')
|
||||
|
||||
local spl = vim.fs.joinpath(data_root, 'site/spell/en_gb.utf-8.spl')
|
||||
local sug = vim.fs.joinpath(data_root, 'site/spell/en_gb.utf-8.sug')
|
||||
@@ -136,7 +136,7 @@ describe('nvim.spellfile', function()
|
||||
|
||||
vim.net.request = function(_, _, cb) cb(nil, { status = 404 }) end
|
||||
|
||||
local info = s.load_file('zz')
|
||||
local info = s.get('zz')
|
||||
local done = s._done[info.key] == true
|
||||
|
||||
return { warns = warns, done = done, did_reload = did_reload }
|
||||
|
||||
Reference in New Issue
Block a user