File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,16 @@ function M:init()
158
158
return
159
159
end
160
160
161
- if not val then
161
+ local is_preset_required = cmd == ' enable' or cmd == ' disable' or cmd == ' toggle'
162
+
163
+ if not val and is_preset_required then
162
164
vim .notify (' reactive.nvim: specify a preset name' , vim .log .levels .ERROR )
163
165
return
164
166
end
165
167
166
168
if not self .commands [cmd ] then
167
169
vim .notify (' reactive.nvim: There\' s no such a command: ' .. cmd , vim .log .levels .ERROR )
168
- elseif not require (' reactive.state' ).presets [val ] then
170
+ elseif is_preset_required and not require (' reactive.state' ).presets [val ] then
169
171
vim .notify (' reactive.nvim: There\' s no such a preset: ' .. val , vim .log .levels .ERROR )
170
172
else
171
173
self .commands [cmd ](val )
You can’t perform that action at this time.
0 commit comments