[Bug] Give a proper error message for buffers that don't evaluate
Usually when I need a scratch buffer, it's to put information that I don't intend to execute. I used to use Emacs for notetaking but I'm using neovim now.
Right now, if I try to open a scratch buffer of type markdown, it gives me a cryptic error message.
Seems like you've sort of hardcoded that functionality. I'm not sure how you would like it to be instead though. https://github.com/n-shift/scratch.nvim/blob/95a533ac1042b2995b1386af73a4d1ea857339c0/lua/scratch/buffer.lua#L10-L14
Can you add filetypes for markdown, org, asciidoc, and plaintext? That should cover the major ones. Maybe also add json, yaml, xml, and other information types that also don't evaluate.
Steps:
- Run ex command
:Telescope scratch md
Expected:
Open the buffer without issue.
Actual:
A cryptic error message is shown to me.
Workaround:
Just use :ScratchNew md