Ejemplo n.º 1
0
 def should_show_plugin(self):
     view = self.view
     if not view.window() or view.is_scratch() or view.is_read_only():
         return False
     if self.allow_inline_formatting is True:
         return True
     if self.is_source_js(view) is True:
         return True
     if self.is_css(view) is True:
         return True
     if self.is_angular_html(view) is True:
         return True
     if self.is_mdx(view) is True:
         return True
     if self.is_markdown(view) is True:
         return True
     if self.is_yaml(view) is True:
         return True
     if self.is_html(view) is True:
         return True
     if self.is_php(view) is True:
         return True
     if is_file_auto_formattable(view) is True:
         return True
     return False
Ejemplo n.º 2
0
 def should_show_plugin(self):
     view = self.view
     if self.allow_inline_formatting is True:
         return True
     if self.is_source_js(view) is True:
         return True
     if self.is_css(view) is True:
         return True
     if is_file_auto_formattable(view) is True:
         return True
     return False
Ejemplo n.º 3
0
 def should_show_plugin(self):
     view = self.view
     if self.allow_inline_formatting is True:
         return True
     if self.is_source_js(view) is True:
         return True
     if self.is_css(view) is True:
         return True
     if is_file_auto_formattable(view) is True:
         return True
     return False
Ejemplo n.º 4
0
    def is_excluded(self, view):
        filename = view.file_name() or ""
        excludes = self.get_auto_format_on_save_excludes(view)
        regmatch_ef = [
            fnmatch.translate(os.path.normpath(pattern))
            for pattern in excludes
        ]
        for regmatch in regmatch_ef:
            if match(regmatch, filename):
                return False
        return True

        if self.is_html(view) is True:
            return True
        if is_file_auto_formattable(view) is True:
            return True
        return False
Ejemplo n.º 5
0
 def should_show_plugin(self):
     view = self.view
     if self.allow_inline_formatting is True:
         return True
     if self.is_source_js(view) is True:
         return True
     if self.is_css(view) is True:
         return True
     if self.is_angular_html(view) is True:
         return True
     if self.is_mdx(view) is True:
         return True
     if self.is_markdown(view) is True:
         return True
     if self.is_yaml(view) is True:
         return True
     if self.is_html(view) is True:
         return True
     if is_file_auto_formattable(view) is True:
         return True
     return False
Ejemplo n.º 6
0
 def should_show_plugin(self):
     view = self.view
     if self.allow_inline_formatting is True:
         return True
     if self.is_source_js(view) is True:
         return True
     if self.is_css(view) is True:
         return True
     if self.is_angular_html(view) is True:
         return True
     if self.is_mdx(view) is True:
         return True
     if self.is_markdown(view) is True:
         return True
     if self.is_yaml(view) is True:
         return True
     if self.is_html(view) is True:
         return True
     if is_file_auto_formattable(view) is True:
         return True
     return False
Ejemplo n.º 7
0
 def is_allowed(view):
     return is_file_auto_formattable(view)
Ejemplo n.º 8
0
 def is_allowed(view):
     return is_file_auto_formattable(view)