Skip to content

Commit 03fb506

Browse files
authored
feat: hide_context fn (#76)
1 parent 4b89241 commit 03fb506

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/nvim_context_vt/init.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151
function M.toggle_context()
5252
if opts.enabled then
5353
opts.enabled = false
54-
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
54+
M.hide_context()
5555
else
5656
opts.enabled = true
5757
M.show_context()
@@ -83,4 +83,8 @@ function M.show_context()
8383
end
8484
end
8585

86+
function M.hide_context()
87+
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
88+
end
89+
8690
return M

0 commit comments

Comments
 (0)