Skip to content

Commit

Permalink
feat: added SmearToggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke-McMahon committed Dec 1, 2024
1 parent 78c4217 commit d6577be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lua/smear_cursor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ M.setup = function(opts)
for key, value in pairs(opts) do
M[key] = value
end

vim.api.nvim_create_user_command("SmearToggle", M.toggle, {})
end

M.toggle = function(opts)
opts = opts or {}

if opts.enabled then
opts.enabled = false
else
opts.enabled = true
end
end

setmetatable(M, metatable)
Expand Down

0 comments on commit d6577be

Please sign in to comment.