tm4e icon indicating copy to clipboard operation
tm4e copied to clipboard

Import TextMate (and language-configuration.json) from TextMate/Sublime/Vscode bundle

Open angelozerr opened this issue 1 year ago • 2 comments

IJ provides a nice import for TextMate grammar file coming from:

  • TextMate bundle
  • Sublime bundle
  • VScode package.json

See entry point from https://github.com/JetBrains/intellij-community/blob/9ad1c858cc67a30002096dbe13bc1cf42c52b497/plugins/textmate/src/org/jetbrains/plugins/textmate/TextMateServiceImpl.java#L240

For the case of Vscode package.json, you need just to select a package.json and it import the TextMate grammar + language-configuration.json.

Takes a sample with Go. You need just to select the local file package.json https://github.com/golang/vscode-go/blob/89b02f46268ff6b0197cc780b5f3d02ba36f1cc7/extension/package.json

and after that, it loads:

  • the proper language-configuration.json by using https://github.com/golang/vscode-go/blob/89b02f46268ff6b0197cc780b5f3d02ba36f1cc7/extension/package.json#L122
  • the proper TextMate grammar files by using https://github.com/golang/vscode-go/blob/89b02f46268ff6b0197cc780b5f3d02ba36f1cc7/extension/package.json#L172

angelozerr avatar Jan 30 '24 13:01 angelozerr

@sebthom if yiu are motivation and yiu have time to work on this feature it will be a great feature.

User will need just to clone the vscode extension and select the package.json file and textmate language configuration 1nd in the future snippet will work out of the box

angelozerr avatar Jun 03 '25 16:06 angelozerr

@angelozerr I'm not interested in implementing this feature request. Instead, I resolved our needs for third-party grammar support through extra-syntax-highlighting-eclipse-plugin, which also takes care of grammar updates once they’re installed through automated plugin updates.

sebthom avatar Jun 04 '25 12:06 sebthom