@@ -3,64 +3,115 @@ local M = {}
33--- @deprecated
44--- @type Neominimap.Command.Impl
55M .refresh = function (args , opts )
6- vim .deprecate (" require('neominimap').refresh" , " require('neominimap.api').refresh" , " v4" , " neominimap.nvim" )
6+ local msg =
7+ vim .deprecate (" require('neominimap').refresh" , " require('neominimap.api').refresh" , " v4" , " neominimap.nvim" )
8+ if msg then
9+ local logger = require (" neominimap.logger" )
10+ logger .notify (msg , vim .log .levels .WARN )
11+ end
712 require (" neominimap.command.global" ).subcommand_tbl .refresh .impl (args , opts )
813end
914
1015--- @deprecated
1116--- @type Neominimap.Command.Impl
1217M .on = function (args , opts )
13- vim .deprecate (" require('neominimap').on" , " require('neominimap.api').enable" , " v4" , " neominimap.nvim" )
18+ local msg = vim .deprecate (" require('neominimap').on" , " require('neominimap.api').enable" , " v4" , " neominimap.nvim" )
19+ if msg then
20+ local logger = require (" neominimap.logger" )
21+ logger .notify (msg , vim .log .levels .WARN )
22+ end
1423 require (" neominimap.command.global" ).subcommand_tbl .on .impl (args , opts )
1524end
1625
1726--- @deprecated
1827--- @type Neominimap.Command.Impl
1928M .off = function (args , opts )
20- vim .deprecate (" require('neominimap').off" , " require('neominimap.api').disable" , " v4" , " neominimap.nvim" )
29+ local msg = vim .deprecate (" require('neominimap').off" , " require('neominimap.api').disable" , " v4" , " neominimap.nvim" )
30+ if msg then
31+ local logger = require (" neominimap.logger" )
32+ logger .notify (msg , vim .log .levels .WARN )
33+ end
2134 require (" neominimap.command.global" ).subcommand_tbl .off .impl (args , opts )
2235end
2336
2437--- @deprecated
2538--- @type Neominimap.Command.Impl
2639M .toggle = function (args , opts )
27- vim .deprecate (" require('neominimap').toggle" , " require('neominimap.api').toggle" , " v4" , " neominimap.nvim" )
40+ local msg =
41+ vim .deprecate (" require('neominimap').toggle" , " require('neominimap.api').toggle" , " v4" , " neominimap.nvim" )
42+ if msg then
43+ local logger = require (" neominimap.logger" )
44+ logger .notify (msg , vim .log .levels .WARN )
45+ end
2846 require (" neominimap.command.global" ).subcommand_tbl .toggle .impl (args , opts )
2947end
3048
3149--- @deprecated
3250--- Minimap is enabled globally
3351--- @return boolean
3452M .enabled = function ()
35- vim .deprecate (" require('neominimap').enabled" , " require('neominimap.api').enabled" , " v4" , " neominimap.nvim" )
53+ local msg =
54+ vim .deprecate (" require('neominimap').enabled" , " require('neominimap.api').enabled" , " v4" , " neominimap.nvim" )
55+ if msg then
56+ local logger = require (" neominimap.logger" )
57+ logger .notify (msg , vim .log .levels .WARN )
58+ end
3659 return require (" neominimap.variables" ).g .enabled
3760end
3861
3962--- @deprecated
4063--- @type Neominimap.Command.Impl
4164M .bufOn = function (args , opts )
42- vim .deprecate (" require('neominimap').bufOn" , " require('neominimap.api').buf.enable" , " v4" , " neominimap.nvim" )
65+ local msg =
66+ vim .deprecate (" require('neominimap').bufOn" , " require('neominimap.api').buf.enable" , " v4" , " neominimap.nvim" )
67+ if msg then
68+ local logger = require (" neominimap.logger" )
69+ logger .notify (msg , vim .log .levels .WARN )
70+ end
4371 require (" neominimap.command.buf" ).subcommand_tbl .bufOn .impl (args , opts )
4472end
4573
4674--- @deprecated
4775--- @type Neominimap.Command.Impl
4876M .bufOff = function (args , opts )
49- vim .deprecate (" require('neominimap').bufOff" , " require('neominimap.api').buf.disable" , " v4" , " neominimap.nvim" )
77+ local msg =
78+ vim .deprecate (" require('neominimap').bufOff" , " require('neominimap.api').buf.disable" , " v4" , " neominimap.nvim" )
79+ if msg then
80+ local logger = require (" neominimap.logger" )
81+ logger .notify (msg , vim .log .levels .WARN )
82+ end
5083 require (" neominimap.command.buf" ).subcommand_tbl .bufOff .impl (args , opts )
5184end
5285
5386--- @deprecated
5487--- @type Neominimap.Command.Impl
5588M .bufToggle = function (args , opts )
56- vim .deprecate (" require('neominimap').bufToggle" , " require('neominimap.api').buf.toggle" , " v4" , " neominimap.nvim" )
89+ local msg = vim .deprecate (
90+ " require('neominimap').bufToggle" ,
91+ " require('neominimap.api').buf.toggle" ,
92+ " v4" ,
93+ " neominimap.nvim"
94+ )
95+ if msg then
96+ local logger = require (" neominimap.logger" )
97+ logger .notify (msg , vim .log .levels .WARN )
98+ end
5799 require (" neominimap.command.buf" ).subcommand_tbl .bufToggle .impl (args , opts )
58100end
59101
60102--- @deprecated
61103--- @type Neominimap.Command.Impl
62104M .bufRefresh = function (args , opts )
63- vim .deprecate (" require('neominimap').bufRefresh" , " require('neominimap.api').buf.refresh" , " v4" , " neominimap.nvim" )
105+ local msg = vim .deprecate (
106+ " require('neominimap').bufRefresh" ,
107+ " require('neominimap.api').buf.refresh" ,
108+ " v4" ,
109+ " neominimap.nvim"
110+ )
111+ if msg then
112+ local logger = require (" neominimap.logger" )
113+ logger .notify (msg , vim .log .levels .WARN )
114+ end
64115 require (" neominimap.command.buf" ).subcommand_tbl .bufRefresh .impl (args , opts )
65116end
66117
69120--- @param bufnr integer ? If nil , check for the current buffer
70121--- @return boolean
71122M .bufEnabled = function (bufnr )
72- vim .deprecate (" require('neominimap').bufEnabled" , " require('neominimap.api').buf.enabled" , " v4" , " neominimap.nvim" )
123+ local msg = vim .deprecate (
124+ " require('neominimap').bufEnabled" ,
125+ " require('neominimap.api').buf.enabled" ,
126+ " v4" ,
127+ " neominimap.nvim"
128+ )
129+ if msg then
130+ local logger = require (" neominimap.logger" )
131+ logger .notify (msg , vim .log .levels .WARN )
132+ end
73133 if bufnr == nil then
74134 bufnr = 0
75135 end
79139--- @deprecated
80140--- @type Neominimap.Command.Impl
81141M .winOn = function (args , opts )
82- vim .deprecate (" require('neominimap').winOn" , " require('neominimap.api').win.enable" , " v4" , " neominimap.nvim" )
142+ local msg =
143+ vim .deprecate (" require('neominimap').winOn" , " require('neominimap.api').win.enable" , " v4" , " neominimap.nvim" )
144+ if msg then
145+ local logger = require (" neominimap.logger" )
146+ logger .notify (msg , vim .log .levels .WARN )
147+ end
83148 require (" neominimap.command.win" ).subcommand_tbl .winOn .impl (args , opts )
84149end
85150
86151--- @deprecated
87152--- @type Neominimap.Command.Impl
88153M .winOff = function (args , opts )
89- vim .deprecate (" require('neominimap').winOff" , " require('neominimap.api').win.disable" , " v4" , " neominimap.nvim" )
154+ local msg =
155+ vim .deprecate (" require('neominimap').winOff" , " require('neominimap.api').win.disable" , " v4" , " neominimap.nvim" )
156+ if msg then
157+ local logger = require (" neominimap.logger" )
158+ logger .notify (msg , vim .log .levels .WARN )
159+ end
90160 require (" neominimap.command.win" ).subcommand_tbl .winOff .impl (args , opts )
91161end
92162
93163--- @deprecated
94164--- @type Neominimap.Command.Impl
95165M .winToggle = function (args , opts )
96- vim .deprecate (" require('neominimap').winToggle" , " require('neominimap.api').win.toggle" , " v4" , " neominimap.nvim" )
166+ local msg = vim .deprecate (
167+ " require('neominimap').winToggle" ,
168+ " require('neominimap.api').win.toggle" ,
169+ " v4" ,
170+ " neominimap.nvim"
171+ )
172+ if msg then
173+ local logger = require (" neominimap.logger" )
174+ logger .notify (msg , vim .log .levels .WARN )
175+ end
97176 require (" neominimap.command.win" ).subcommand_tbl .winToggle .impl (args , opts )
98177end
99178
100179--- @deprecated
101180--- @type Neominimap.Command.Impl
102181M .winRefresh = function (args , opts )
103- vim .deprecate (" require('neominimap').winRefresh" , " require('neominimap.api').win.refresh" , " v4" , " neominimap.nvim" )
182+ local msg = vim .deprecate (
183+ " require('neominimap').winRefresh" ,
184+ " require('neominimap.api').win.refresh" ,
185+ " v4" ,
186+ " neominimap.nvim"
187+ )
188+ if msg then
189+ local logger = require (" neominimap.logger" )
190+ logger .notify (msg , vim .log .levels .WARN )
191+ end
104192 require (" neominimap.command.win" ).subcommand_tbl .winRefresh .impl (args , opts )
105193end
106194
107195--- @deprecated
108196--- @type Neominimap.Command.Impl
109197M .tabOn = function (args , opts )
110- vim .deprecate (" require('neominimap').tabOn" , " require('neominimap.api').tab.enable" , " v4" , " neominimap.nvim" )
198+ local msg =
199+ vim .deprecate (" require('neominimap').tabOn" , " require('neominimap.api').tab.enable" , " v4" , " neominimap.nvim" )
200+ if msg then
201+ local logger = require (" neominimap.logger" )
202+ logger .notify (msg , vim .log .levels .WARN )
203+ end
111204 require (" neominimap.command.tab" ).subcommand_tbl .tabOn .impl (args , opts )
112205end
113206
114207--- @deprecated
115208--- @type Neominimap.Command.Impl
116209M .tabOff = function (args , opts )
117- vim .deprecate (" require('neominimap').tabOff" , " require('neominimap.api').tab.disable" , " v4" , " neominimap.nvim" )
210+ local msg =
211+ vim .deprecate (" require('neominimap').tabOff" , " require('neominimap.api').tab.disable" , " v4" , " neominimap.nvim" )
212+ if msg then
213+ local logger = require (" neominimap.logger" )
214+ logger .notify (msg , vim .log .levels .WARN )
215+ end
118216 require (" neominimap.command.tab" ).subcommand_tbl .tabOff .impl (args , opts )
119217end
120218
123221--- @param winid integer ? If nil , check for the current window
124222--- @return boolean
125223M .winEnabled = function (winid )
126- vim .deprecate (" require('neominimap').winEnabled" , " require('neominimap.api').win.wnabled" , " v4" , " neominimap.nvim" )
224+ local msg = vim .deprecate (
225+ " require('neominimap').winEnabled" ,
226+ " require('neominimap.api').win.enabled" ,
227+ " v4" ,
228+ " neominimap.nvim"
229+ )
230+ if msg then
231+ local logger = require (" neominimap.logger" )
232+ logger .notify (msg , vim .log .levels .WARN )
233+ end
127234 if winid == nil then
128235 winid = 0
129236 end
@@ -133,14 +240,32 @@ end
133240--- @deprecated
134241--- @type Neominimap.Command.Impl
135242M .tabToggle = function (args , opts )
136- vim .deprecate (" require('neominimap').tabToggle" , " require('neominimap.api').tab.toggle" , " v4" , " neominimap.nvim" )
243+ local msg = vim .deprecate (
244+ " require('neominimap').tabToggle" ,
245+ " require('neominimap.api').tab.toggle" ,
246+ " v4" ,
247+ " neominimap.nvim"
248+ )
249+ if msg then
250+ local logger = require (" neominimap.logger" )
251+ logger .notify (msg , vim .log .levels .WARN )
252+ end
137253 require (" neominimap.command.tab" ).subcommand_tbl .tabToggle .impl (args , opts )
138254end
139255
140256--- @deprecated
141257--- @type Neominimap.Command.Impl
142258M .tabRefresh = function (args , opts )
143- vim .deprecate (" require('neominimap').tabRefresh" , " require('neominimap.api').tab.refresh" , " v4" , " neominimap.nvim" )
259+ local msg = vim .deprecate (
260+ " require('neominimap').tabRefresh" ,
261+ " require('neominimap.api').tab.refresh" ,
262+ " v4" ,
263+ " neominimap.nvim"
264+ )
265+ if msg then
266+ local logger = require (" neominimap.logger" )
267+ logger .notify (msg , vim .log .levels .WARN )
268+ end
144269 require (" neominimap.command.tab" ).subcommand_tbl .tabRefresh .impl (args , opts )
145270end
146271
149274--- @param tabid integer ? If nil , check for the current tab page
150275--- @return boolean
151276M .tabEnabled = function (tabid )
152- vim .deprecate (" require('neominimap').tabEnabled" , " require('neominimap.api').tab.enabled" , " v4" , " neominimap.nvim" )
277+ local msg = vim .deprecate (
278+ " require('neominimap').tabEnabled" ,
279+ " require('neominimap.api').tab.enabled" ,
280+ " v4" ,
281+ " neominimap.nvim"
282+ )
283+ if msg then
284+ local logger = require (" neominimap.logger" )
285+ logger .notify (msg , vim .log .levels .WARN )
286+ end
153287 if tabid == nil then
154288 tabid = 0
155289 end
@@ -159,26 +293,40 @@ end
159293--- @deprecated
160294--- @type Neominimap.Command.Impl
161295M .focus = function (args , opts )
162- vim .deprecate (" require('neominimap').focus" , " require('neominimap.api').focus.on" , " v4" , " neominimap.nvim" )
296+ local msg =
297+ vim .deprecate (" require('neominimap').focus" , " require('neominimap.api').focus.on" , " v4" , " neominimap.nvim" )
298+ if msg then
299+ local logger = require (" neominimap.logger" )
300+ logger .notify (msg , vim .log .levels .WARN )
301+ end
163302 require (" neominimap.command.focus" ).subcommand_tbl .focus .impl (args , opts )
164303end
165304
166305--- @deprecated
167306--- @type Neominimap.Command.Impl
168307M .unfocus = function (args , opts )
169- vim .deprecate (" require('neominimap').unfocus" , " require('neominimap.api').focus.off" , " v4" , " neominimap.nvim" )
308+ local msg =
309+ vim .deprecate (" require('neominimap').unfocus" , " require('neominimap.api').focus.off" , " v4" , " neominimap.nvim" )
310+ if msg then
311+ local logger = require (" neominimap.logger" )
312+ logger .notify (msg , vim .log .levels .WARN )
313+ end
170314 require (" neominimap.command.focus" ).subcommand_tbl .unfocus .impl (args , opts )
171315end
172316
173317--- @deprecated
174318--- @type Neominimap.Command.Impl
175319M .toggleFocus = function (args , opts )
176- vim .deprecate (
320+ local msg = vim .deprecate (
177321 " require('neominimap').toggleFocus" ,
178322 " require('neominimap.api').focus.toggle" ,
179323 " v4" ,
180324 " neominimap.nvim"
181325 )
326+ if msg then
327+ local logger = require (" neominimap.logger" )
328+ logger .notify (msg , vim .log .levels .WARN )
329+ end
182330 require (" neominimap.command.focus" ).subcommand_tbl .toggleFocus .impl (args , opts )
183331end
184332
0 commit comments