enter language as text input
arcturus140 opened this issue · comments
Snippet language can be chosen when clicking with the cursor in the selection box. Would be nice if it accepts text input directly, as well.
Steps to replicate
- Create -> Single-file snippet
- type "name" for snippet name -> press tap to next input field
- type "Brainfuck" -> press tap
- type "tag" -> press tap, press tap
- press tap
- press tap
- press "Create" button -> Error message appears: "Please specify at least snippet name and language"
- click into "Snippet language" input field
- press "Create" button -> success
Ideally, there should be no Snippet language drop-down for single file snippet.
Instead there should be a Snippet filename input to enter the filename for the snippet (same as Multi file Snippet
The Snippet name should be required to identify the snippet from the snippets list (current behavior).
The Snippet language should be guessed according to the file extension provided in Snippet filename. This will help mitigate the aforementioned issue.
e.g.
[Snippet name]: [A test md file]
[Snippet language]: [Markdown 🔽]
[Snippet name]: [A test md file]
[Snippet filename]: [test-file.md]
The Snippet filename can then be used to export the snippet content (just content w/o metadata) to a file with provided filename.
Snippet filename is a good idea, I'll do it.....when I have the time