snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

feature: words should provide per-filetype disable option

Open andreihh opened this issue 1 week ago • 2 comments

Did you check the docs?

  • [x] I have read all the snacks.nvim docs

Is your feature request related to a problem? Please describe.

We should be able to selectively disable Snacks.words in certain buffers or filetypes (e.g., if the corresponding LSP is slow).

Describe the solution you'd like

This could be achieved e.g. with a global Snacks.words.exclude_filetypes option.

Alternatively, providing a buffer-local vim.b.snacks_words_enable option (similar to vim.b.snacks_animate) might work, e.g. by setting it on a FileType autocmd (I think).

Describe alternatives you've considered

We can manually toggle Snacks.words globally when we open or navigate into or out of a problematic buffer. However, this is very tedious and annoying.

Additional context

No response

andreihh avatar Feb 19 '25 00:02 andreihh