Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Commit

Permalink
resolves syntax highlighting issue introduced by most recent sublime …
Browse files Browse the repository at this point in the history
…update

fixes #784
  • Loading branch information
joeferraro committed May 13, 2016
1 parent c184d99 commit 7b6d3ec
Show file tree
Hide file tree
Showing 7 changed files with 461 additions and 2,401 deletions.
12 changes: 6 additions & 6 deletions mavensmate.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,24 +314,24 @@ def on_load_async(self, view):
ext = util.get_file_extension(fn)
if ext == '.cls' or ext == '.trigger':
if "linux" in sys.platform or "darwin" in sys.platform:
view.set_syntax_file(os.path.join("Packages","MavensMate","sublime","lang","Apex.tmLanguage"))
view.set_syntax_file(os.path.join("Packages","MavensMate","sublime","lang","Apex.sublime-syntax"))
else:
view.set_syntax_file(os.path.join("Packages/MavensMate/sublime/lang/Apex.tmLanguage"))
view.set_syntax_file(os.path.join("Packages/MavensMate/sublime/lang/Apex.sublime-syntax"))
elif ext == '.page' or ext == '.component':
if "linux" in sys.platform or "darwin" in sys.platform:
view.set_syntax_file(os.path.join("Packages","MavensMate","sublime","lang","Visualforce.tmLanguage"))
view.set_syntax_file(os.path.join("Packages","MavensMate","sublime","lang","Visualforce.sublime-syntax"))
else:
view.set_syntax_file(os.path.join("Packages/MavensMate/sublime/lang/Visualforce.tmLanguage"))
view.set_syntax_file(os.path.join("Packages/MavensMate/sublime/lang/Visualforce.sublime-syntax"))
elif ext == '.app' or ext == '.auradoc' or ext == '.cmp':
if "linux" in sys.platform or "darwin" in sys.platform:
view.set_syntax_file(os.path.join("Packages","XML","XML.tmLanguage"))
else:
view.set_syntax_file(os.path.join("Packages/XML/XML.tmLanguage"))
elif ext == '.log' and ('/debug/' in fn or '\\debug\\' in fn or '\\apex-scripts\\log\\' in fn or '/apex-scripts/log/' in fn):
if "linux" in sys.platform or "darwin" in sys.platform:
view.set_syntax_file(os.path.join("Packages","MavensMate","sublime","lang","MMLog.tmLanguage"))
view.set_syntax_file(os.path.join("Packages","MavensMate","sublime","lang","MMLog.sublime-syntax"))
else:
view.set_syntax_file(os.path.join("Packages/MavensMate/sublime/lang/MMLog.tmLanguage"))
view.set_syntax_file(os.path.join("Packages/MavensMate/sublime/lang/MMLog.sublime-syntax"))
except:
pass

Expand Down
Loading

0 comments on commit 7b6d3ec

Please sign in to comment.