fix: add deprecated setup() for backward compatibility
Restores setup() with deprecation warning via vim.deprecate(). Users can continue using setup() while migrating to vim.g.http_codes.
This commit is contained in:
parent
7586374e68
commit
1e185330ca
1 changed files with 11 additions and 0 deletions
|
|
@ -68,4 +68,15 @@ end
|
|||
|
||||
M.http_codes = M.pick
|
||||
|
||||
---@deprecated Use `vim.g.http_codes` instead
|
||||
function M.setup(user_config)
|
||||
vim.deprecate('require("http-codes").setup()', 'vim.g.http_codes', '2.0.0', 'http-codes.nvim')
|
||||
|
||||
if user_config then
|
||||
vim.g.http_codes = vim.tbl_deep_extend('force', vim.g.http_codes or {}, user_config)
|
||||
end
|
||||
|
||||
init()
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue