Skip to content

Commit

Permalink
fix(nvim): cowboy
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 13, 2024
1 parent c6ecc66 commit ed37990
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nvim/lua/util/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ end

function M.cowboy()
---@type table?
local id
local ok = true
for _, key in ipairs({ "h", "j", "k", "l", "+", "-" }) do
local count = 0
Expand All @@ -43,15 +42,14 @@ function M.cowboy()
count = 0
end
if count >= 10 and vim.bo.buftype ~= "nofile" then
ok, id = pcall(vim.notify, "Hold it Cowboy!", vim.log.levels.WARN, {
ok = pcall(vim.notify, "Hold it Cowboy!", vim.log.levels.WARN, {
icon = "🤠",
replace = id,
id = "cowboy",
keep = function()
return count >= 10
end,
})
if not ok then
id = nil
return map
end
else
Expand Down

0 comments on commit ed37990

Please sign in to comment.