Open RandomFractals opened 3 years ago
Is it a webview editor or webview view?
It will be a webview to view snippets list by language or extension in tabular format.
The closest I could find was this extension: https://github.com/robole/vscode-snippets-ranger
I just don't like the TOC and nav for those snippet tables. So, it will be similar with snippets table listing snippets using prefix, body, name, and description column order and dropdowns for nav.
I don't like how body
looks in that extension. Will body
column have formatting and syntax highlighting?
yep. I'll probably use this lib to make it pretty: https://highlightjs.org/
https://github.com/shikijs/shiki - This highlighter is based on vscode-textmate
, so the highlighting is almost like native vscode one , but I'm not sure it can work in a webview (Although it kind of should: https://marketplace.visualstudio.com/items?itemName=bierner.markdown-shiki)
Actually, it probably wouldn't work. That extension uses shiki on extension side and provides syntax highlighting for markdown preview.
I'll take a look. Thanks for the links.
Ideally, I would like to have snippet body formatted using vscode.MarkdownString
, but I don't know how to wire that in webview yet :)