MiniVisits not saving when using add_path() #1766
-
Contributing guidelines
Module(s)mini.visits QuestionHi, I've been trying out However, I'm a bit confused. I tried using Here's a short video demonstrating the issue: output_confuso.mp4Reproduction code:vim.cmd('echo "Installing `mini.nvim`" | redraw')
local mini_path = vim.fn.stdpath("data") .. "/site/pack/deps/start/mini.nvim"
local clone_cmd = { "git", "clone", "--depth=1", "https://github.com/echasnovski/mini.nvim", mini_path }
vim.fn.system(clone_cmd)
vim.cmd('echo "`mini.nvim` is installed" | redraw')
-- Make sure 'mini.nvim' is available
vim.cmd("packadd mini.nvim")
require("mini.deps").setup()
vim.cmd.colorscheme("randomhue")
require("mini.pick").setup({})
require("mini.extra").setup({})
require("mini.visits").setup({
track = {
event = "",
},
})I also tested Any clarification or solution would be greatly appreciated. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
The You can see the currently active index and what effect |
Beta Was this translation helpful? Give feedback.
add_path()is a helper that ensures that path is present in the current index. If it wasn't there, itscountandlatestare 0, which means that entry will get pruned during normalization before writing to the disk (becausecount0 is less than default 0.5 threshold).The
register_visit()is basicallyadd_path()plus extra manipulation withcountandlatest. The result is not pruned during normalization.You can see the currently active index and what effect
add_path/register_visithave on it with:=MiniVisits.get_index().