Skip to content

Add Sass, Haml and HamlCoffeeAssets support. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Syntax Highlighter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ def check_syntax(self, view):

if self.is_apache():
return

if self.is_haml():
return

if self.is_sass():
return

def is_rspec(self):
if self.name.find('_spec') > -1:
Expand Down Expand Up @@ -157,6 +162,17 @@ def is_php(self):
return False


def is_haml(self):
if self.ext == '.haml' or self.ext == '.hamlc':
self.set_syntax('Ruby Haml', 'Haml/Syntaxes')
return True

def is_sass(self):
if self.ext == '.sass':
self.set_syntax('Sass', 'Sass/Syntaxes')
return True


def reset_cache_variables(self, view, file_name):
self.view = view
self.file_name = file_name
Expand Down