refact: deprecate snippets ext. point and add samples ext. point#892
Conversation
|
We could also name the extension point <extension
point="org.eclipse.tm4e.ui.grammarPreviewSamples">
<sample
name="org.eclipse.tm4e.ui.tests.sample1"
path="grammars/sample.ts"
scopeName="source.ts">
</sample>
</extension>I'd like to avoid the term snippet at all since it has a very different meaning in TextMate https://macromates.com/textmate/manual/snippets |
|
I'm fine with such renames. Theorically, we'd also keep ISnippet and ISnippetManager are deprecated; but if we can ensure enough those have no users, it's OK to delete them too. |
I already did a thorough search on Google and GitHub and could not find any references to ISnippet and ISnippetManager in any external code so I think it is safe to rename them. |
|
OK, good. |
|
Thanks @sebthom for this change which was very bad. So now we have snippet as free, I think it would be very nice to implement VSCode snippet https://code.visualstudio.com/docs/editing/userdefinedsnippets Even if Eclipse IDE provide this feature with Template, I think it can be a very good idea to support it, because you could just copy/paste existing snippet from existing vscode extension. |
|
|
We can also keep the legacy |
|
I made a typo in the PR, the old one actually looks like this: <extension
point="org.eclipse.tm4e.ui.snippets">
<snippet
name="org.eclipse.tm4e.ui.tests.snippet1"
path="grammars/snippet.ts"
scopeName="source.ts">
</snippet>
</extension>But yes we could only deprecate the |
This addresses #147. The old "snippets" extension point is still functional so no immediate change required by grammar providers.
Old:
New: