fix: use vim.notify_once for deprecation warning
This commit is contained in:
parent
1e185330ca
commit
e66db54cef
1 changed files with 4 additions and 1 deletions
|
|
@ -70,7 +70,10 @@ M.http_codes = M.pick
|
||||||
|
|
||||||
---@deprecated Use `vim.g.http_codes` instead
|
---@deprecated Use `vim.g.http_codes` instead
|
||||||
function M.setup(user_config)
|
function M.setup(user_config)
|
||||||
vim.deprecate('require("http-codes").setup()', 'vim.g.http_codes', '2.0.0', 'http-codes.nvim')
|
vim.notify_once(
|
||||||
|
'http-codes.nvim: setup() is deprecated. Use vim.g.http_codes instead.',
|
||||||
|
vim.log.levels.WARN
|
||||||
|
)
|
||||||
|
|
||||||
if user_config then
|
if user_config then
|
||||||
vim.g.http_codes = vim.tbl_deep_extend('force', vim.g.http_codes or {}, user_config)
|
vim.g.http_codes = vim.tbl_deep_extend('force', vim.g.http_codes or {}, user_config)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue