- To add, for example, TypeScript,
- Find a
.sublime-syntax
file for the language. - Create a TypeScript folder in
xi-mac/xi-editor/rust/syntect-plugin/syntect-resources/Packages/
- Place the .sublime-syntax file in that folder.
/xi-mac/xi-editor/rust/syntect-plugin/syntect-resources/Packages/TypeScript/TypeScript.sublime-syntax
- In
xi-mac/xi-editor/rust/syntect-plugin/
, run
cargo run --release --example make_manifest
- Rebuild Xi. In
/xi-mac/
, runxcodebuild
- Restart Xi.
If you don't have a .sublime-syntax file:
- Find a
.tmLanguage
file. - Install a program to convert them
gem install sublime_syntax_convertor
- Use
sublime_syntax_convertor folder
I cloned babel/babel-sublime: Syntax definitions for ES6 and JSX., and called sublime_syntax_convertor
with it.
And for TypeScript, used TypeScript.sublime-syntax.
Random commit that led me to finding how to run make_manifest here.
You can open PRs into https://github.com/xi-editor/syntect-resources to add additional default languages to the syntect-plugin. I am 100% happy to accept syntax definitions for commonly used languages, and typescript would definitely qualify.