chentoast / marks.nvim

A better user experience for viewing and interacting with Vim marks.
MIT License
848 stars 43 forks source link

MarksToggleSigns does not appear to apply to specific buffers, contrary to documentation #21

Closed andrewferrier closed 2 years ago

andrewferrier commented 2 years ago

There are certain buffers for which I would not like marks.nvim to show marks, for example fzf buffers. I've tried turning off marks with MarksToggleSigns in after/ftplugin/fzf.vim; however, it seems this turns off marks globally across NeoVim for all buffers (I'm not sure if this is what was intended).

It would be nice to have a way to disable marks on a buffer-by-buffer basis, either by buffer type or (better in my opinion) with a toggle command/variable.

Thanks!

andrewferrier commented 2 years ago

For anyone else who uses popup fzf windows, a workaround for your after/ftplugin/fzf.vim:

augroup FZFLeave
  autocmd!
  autocmd BufLeave <buffer> MarksToggleSigns
augroup END

MarksToggleSigns
chentoast commented 2 years ago

The current behavior is correct; its the docs that are wrong. However, I do think that its a good idea to allow toggling signs on a per-buffer basis. When I have the time, I'll submit a patch for this.

andrewferrier commented 2 years ago

Thanks, this seems to work well!