Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. def generate_tm_coloring_json(gen_path, textx_ls, env):
  2.     template = env.get_template('coloring_json.template')
  3.     lang_name = textx_ls.configuration.language_name
  4.     coloring_file_name = lang_name.lower() + '.tmLanguage.json'
  5.     coloring = ColoringVSCode(textx_ls.configuration)
  6.     with open(join(gen_path, 'syntaxes', coloring_file_name), 'w') as f:
  7.         f.write(template.render(coloring.get_coloring_model()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement