From 2702caf35222e6824f02e08a29415a6f1618c979 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 3 Feb 2026 21:46:43 -0500 Subject: [PATCH 1/2] fix: add deprecation warning for setup() --- lua/midnight/init.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/midnight/init.lua b/lua/midnight/init.lua index 50a83ba..1ed25ca 100644 --- a/lua/midnight/init.lua +++ b/lua/midnight/init.lua @@ -17,4 +17,17 @@ function M.load() theme.apply() end +---@deprecated Use `vim.cmd('colorscheme midnight')` instead +function M.setup(opts) + vim.deprecate( + 'require("midnight").setup()', + 'vim.cmd("colorscheme midnight")', + 'v0.1.0', + 'midnight.nvim', + false + ) + + M.load() +end + return M From 94a373f416f2b9ff3a720fbbc59e1229414e5cab Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 3 Feb 2026 21:51:55 -0500 Subject: [PATCH 2/2] fix: mark opts as intentionally unused --- lua/midnight/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/midnight/init.lua b/lua/midnight/init.lua index 1ed25ca..1055fda 100644 --- a/lua/midnight/init.lua +++ b/lua/midnight/init.lua @@ -18,7 +18,7 @@ function M.load() end ---@deprecated Use `vim.cmd('colorscheme midnight')` instead -function M.setup(opts) +function M.setup(_opts) vim.deprecate( 'require("midnight").setup()', 'vim.cmd("colorscheme midnight")',