Skip to content

Commit

Permalink
feat: startVisible flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tris203 committed Dec 30, 2023
1 parent ca9a0ef commit c292777
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/precognition/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local M = {}

---@type Precognition.Config
local default = {
startVisible = true,
hints = {
["^"] = "^",
["$"] = "$",
Expand Down Expand Up @@ -266,7 +267,7 @@ function M.show()
callback = on_cursor_hold,
})

on_cursor_hold({ buf = vim.api.nvim_get_current_buf() })
on_cursor_hold()
end

--- Disable automatic showing of hints
Expand Down Expand Up @@ -297,8 +298,9 @@ function M.setup(opts)

ns = vim.api.nvim_create_namespace("precognition")
au = vim.api.nvim_create_augroup("precognition", { clear = true })

M.show()
if config.startVisible then
M.show()
end
end

return M

0 comments on commit c292777

Please sign in to comment.