mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add TextMateBundle which handles all bundle loading
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
AceAdaptor = require 'ace-adaptor'
|
||||
Range = require 'range'
|
||||
TextMateGrammar = require 'text-mate-grammar'
|
||||
TextMateBundle = require 'text-mate-bundle'
|
||||
_ = require 'underscore'
|
||||
|
||||
module.exports =
|
||||
@@ -15,7 +15,8 @@ class LanguageMode
|
||||
constructor: (@editSession) ->
|
||||
@buffer = @editSession.buffer
|
||||
@aceMode = @requireAceMode()
|
||||
@grammar = TextMateGrammar.grammarForExtension(@editSession.buffer.getExtension())
|
||||
|
||||
@grammar = TextMateBundle.grammarForFileName(@editSession.buffer.getBaseName())
|
||||
@aceAdaptor = new AceAdaptor(@editSession)
|
||||
|
||||
_.adviseBefore @editSession, 'insertText', (text) =>
|
||||
|
||||
Reference in New Issue
Block a user