Skip to content
Discussion options

You must be logged in to vote

Tried to add MiniMap.close() in after/ftplugin/markdown.lua but it closes that for all buffers

Yes, that's the right direction, but it does only half the job: it hides map window when it needs to be hidden. The other part is making sure that it is opened when it needs to be shown.

Here is one way to do it (put this in a regular config files, not filetype script):

-- Define filetypes which need to not show map window
local hide_map_filetypes = { markdown = true }

-- Use `schedule_wrap` to skip some "temporary" buffers
local f = vim.schedule_wrap(function(ev)
  -- Act only if the target buffer that triggered the autocommand is current
  -- This is also to skip some "temporary" buffers
  if 

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
Labels
question Further information is requested mini.map
2 participants