Skip to content

Commit

Permalink
fix(docs): resolve some linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cbochs committed Apr 9, 2024
1 parent 306eb36 commit fcca9e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/grapple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ function Grapple.cycle_tags(direction, opts)
or direction

---@cast direction "next" | "prev"

if not vim.tbl_contains({ "next", "prev" }, direction) then
return vim.notify(string.format("invalid direction: %s", direction), vim.log.levels.ERROR)
end
Expand Down Expand Up @@ -423,7 +424,7 @@ function Grapple.unload(opts)

opts = opts or {}

local err = app:unload(opts)
local err = app:unload({ scope = opts.scope, id = opts.id })
if err then
if opts.notify then
vim.notify(err, vim.log.levels.ERROR)
Expand All @@ -446,7 +447,7 @@ function Grapple.reset(opts)

opts = opts or {}

local err = app:reset(opts)
local err = app:reset({ scope = opts.scope, id = opts.id })
if err then
if opts.notify then
vim.notify(err, vim.log.levels.ERROR)
Expand All @@ -472,6 +473,7 @@ function Grapple.prune(opts)
local pruned_ids, err = app.tag_manager:prune(opts.limit or app.settings.prune)
if not pruned_ids then
if opts.notify then
---@diagnostic disable-next-line: param-type-mismatch
vim.notify(err, vim.log.levels.ERROR)
end
return nil, err
Expand Down

0 comments on commit fcca9e8

Please sign in to comment.