valid_FileExtensions.append('myCustomFileExtension')
window = view.window()
fileExtension = window.extract_variables()['file_extension']
How to allow a Sublime Text 3 package for certain file syntax only?