Skip to content

Commit 3e02a23

Browse files
committed
Make toggle command to accept bang
1 parent a95bf10 commit 3e02a23

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ NeoCodeium provides `:NeoCodeium` user command, which has some useful actions:
226226
- `:NeoCodeium auth` - authenticates the user and saves the API token.
227227
- `:NeoCodeium[!] disable` - disables completions. With the bang also stops the codeium server.
228228
- `:NeoCodeium enable` - enables NeoCodeium completion.
229-
- `:NeoCodeium toggle` - toggles NeoCodeium completion.
229+
- `:NeoCodeium[!] toggle` - toggles NeoCodeium completion. Convey the bang to disable command.
230230
- `:NeoCodeium disable_buffer` - disables NeoCodeium completion in the current buffer.
231231
- `:NeoCodeium enable_buffer` - enables NeoCodeium completion in the current buffer.
232232
- `:NeoCodeium toggle_buffer` - toggles NeoCodeium completion in the current buffer.

lua/neocodeium/commands.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ function M.enable()
158158
end
159159
end
160160

161-
function M.toggle()
161+
function M.toggle(bang)
162162
if options.enabled then
163-
M.disable()
163+
M.disable(bang)
164164
else
165165
M.enable()
166166
end

0 commit comments

Comments
 (0)