Skip to content

Commit

Permalink
feat: hide_context fn (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
topaxi authored Jul 16, 2024
1 parent 4b89241 commit 03fb506
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/nvim_context_vt/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end
function M.toggle_context()
if opts.enabled then
opts.enabled = false
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
M.hide_context()
else
opts.enabled = true
M.show_context()
Expand Down Expand Up @@ -83,4 +83,8 @@ function M.show_context()
end
end

function M.hide_context()
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
end

return M

0 comments on commit 03fb506

Please sign in to comment.