Skip to content

caleb1248/monaco-vscode-textmate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monaco-vscode-textmate

Making textmate grammars work in monaco-editor.

Why?

Monaco editor uses monarch grammars instead of textmate grammars. This means that regular vscode themes won't work in monaco editor. This project lets you use textmate grammars and textmate themes in the monaco editor.

How does it work?

  • It leverages vscode-textmate and vscode-oniguruma to tokenize each line. Each token has an array of scopes.
  • monaco-editor doesn't accept an array of scopes, so we use Microsoft's token converter to convert the tm token to a monaco editor token based on the theme.
  • A vscode theme is converted to a monaco editor theme and used as the theme for the editor.

How do I get the vscode themes?

Go to the vscode command palette and select Developer: Generate Color Theme From Current Settings. Make sure to remove the comments from the color theme JSON.

About

Textmate themes working with monaco.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published