The base syntax name as such isn't exposed, but if you want want to switch on the top level language, then you can query the view for it's 'syntax' setting, getting back the name of the .tmLanguage file

jps wrote:The base syntax name as such isn't exposed, but if you want want to switch on the top level language, then you can query the view for it's 'syntax' setting, getting back the name of the .tmLanguage file