From c292777ed6e701e5d376b2f545bdb445d3635c30 Mon Sep 17 00:00:00 2001 From: tris203 Date: Sat, 30 Dec 2023 22:03:22 +0000 Subject: [PATCH] feat: startVisible flag --- lua/precognition/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/precognition/init.lua b/lua/precognition/init.lua index aae76d0..4361337 100644 --- a/lua/precognition/init.lua +++ b/lua/precognition/init.lua @@ -8,6 +8,7 @@ local M = {} ---@type Precognition.Config local default = { + startVisible = true, hints = { ["^"] = "^", ["$"] = "$", @@ -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 @@ -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