diff --git a/lua/http-codes.lua b/lua/http-codes.lua index 47c17c2..0a10c8f 100644 --- a/lua/http-codes.lua +++ b/lua/http-codes.lua @@ -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