initial coffeescript support. No proper highlighting of executing parts and errors are not displayed inline

This commit is contained in:
Dominik Kundel 2014-03-28 14:42:08 +01:00
parent 35a16b47ff
commit 267d033997
4 changed files with 8 additions and 8 deletions

View file

@ -62,7 +62,7 @@ module.exports = class EditorConfigModal extends View
@aceConfig.behaviors = @$el.find('#tome-behaviors').prop('checked')
me.set 'aceConfig', @aceConfig
Backbone.Mediator.publish 'tome:change-config'
Backbone.Mediator.publish 'tome:change-language' unless @aceConfig.language is oldLanguage
Backbone.Mediator.publish 'tome:change-language' unless @aceConfig.language isnt oldLanguage
me.save()
destroy: ->

View file

@ -85,7 +85,7 @@ module.exports = class Spell
aether.hasChangedSignificantly (newSource ? @originalSource), (currentSource ? @source), true, true
createAether: (thang) ->
aceConfig = me.get 'aceConfig' ? {}
aceConfig = me.get('aceConfig') ? {}
aetherOptions =
problems:
jshint_W040: {level: "ignore"}
@ -110,7 +110,7 @@ module.exports = class Spell
aether
updateLanguageAether: ->
aceConfig = me.get 'aceConfig' ? {}
aceConfig = me.get('aceConfig') ? {}
for thangId, spellThang of @thangs
spellThang.aether?.setLanguage (aceConfig.language ? 'javascript')
spellThang.castAether = null

View file

@ -17,7 +17,7 @@ module.exports = class SpellView extends View
editModes:
'javascript': 'ace/mode/javascript'
'coffeescript': 'ace/mode/coffeescript'
'coffeescript': 'ace/mode/coffee'
keyBindings:
'default': null
@ -567,14 +567,14 @@ module.exports = class SpellView extends View
@ace.setValue pretty
onChangeEditorConfig: (e) ->
aceConfig = me.get 'aceConfig'
aceConfig = me.get('aceConfig') ? {}
@ace.setDisplayIndentGuides aceConfig.indentGuides # default false
@ace.setShowInvisibles aceConfig.invisibles # default false
@ace.setKeyboardHandler @keyBindings[aceConfig.keyBindings ? 'default']
@aceSession.setMode @editModes[aceConfig.language ? 'javascript']
# @aceSession.setMode @editModes[aceConfig.language ? 'javascript']
onChangeLanguage: (e) ->
aceConfig = me.get 'aceConfig'
aceConfig = me.get('aceConfig') ? {}
@aceSession.setMode @editModes[aceConfig.language ? 'javascript']
dismiss: ->

View file

@ -218,7 +218,7 @@ module.exports = class TomeView extends View
Backbone.Mediator.publish 'tome:cast-spells', spells: @spells
updateLanguageForAllSpells: ->
spell.updateLanguageAether for spellKey, spell of @spells
spell.updateLanguageAether() for spellKey, spell of @spells
destroy: ->
spell.destroy() for spellKey, spell of @spells