Skip to content

mini visits - only track files in the current dir or its children #621

Closed Answered by echasnovski
beaumccartney asked this question in Q&A
Discussion options

You must be logged in to vote

There are at least two approaches here:

  • Create an autocommand on BufAdd which sets vim.b.minivisits_disable if it doesn't fit requirements for being tracked. This is doable and does directly what you want.
  • A slightly alternative solution would be to define your own config.store.normalize function which removes unwanted path entries. This looks like a slightly cleaner and more performant approach, but it means that unwanted paths will be in index before normalization is done (during writing to disk or manually calling normalize()). Here is a snippet which removes non-children entries:
local visits = require('mini.visits')
local default_normalize = visits.gen_normalize.default()
local nor…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants