I have a plugin for a specific syntax.
I use is_visible
to enable or disable it with this:
def is_visible(self):
view = sublime.active_window().active_view()
if view:
return view.settings().get('syntax') == 'Packages/Mine/Mine.tmLanguage'
I want to add a new syntax to the same package, so moved Packages/Mine/Mine.tmLanguage
to Packages/Mine/syntax/Mine/Mine.tmLanguage
and added Packages/Mine/syntax/New/New.tmLanguage
.
Due to the relocation, I need to update the is_visible
method.
Is there a way to use view.settings().get('???')
to get the name
of the syntax, rather than the path so it is location independent?
I have not found a list of strings that can be used with the get()
method.