Skip to content

Commit

Permalink
docs: note on visible state with example
Browse files Browse the repository at this point in the history
Signed-off-by: Osamu Aoki <[email protected]>
  • Loading branch information
osamuaoki committed Jun 16, 2024
1 parent 8140b00 commit e019b24
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ or
require("precognition").toggle()
```

The subcommands and functions `show` and `hide` are also available.
The return value indicating the visible state can be used to produce a notification.

```lua
if require("precognition").toggle() then
vim.notify("precognition on")
else
vim.notify("precognition off")
end
```

The subcommands and functions `show` and `hide` are also available with the return value indicating the visible state.

### Peeking

Expand Down

0 comments on commit e019b24

Please sign in to comment.