-
Notifications
You must be signed in to change notification settings - Fork 44
/
codeMirrorAddons.js
36 lines (29 loc) · 900 Bytes
/
codeMirrorAddons.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* Brackets Themes Copyright (c) 2014 Miguel Castillo.
*
* Licensed under MIT
*/
define(function (require, exports, module) {
"use strict";
var spromise = require("lib/spromise");
function initAddons(CodeMirror) {
// Set some default value for codemirror...
CodeMirror.defaults.highlightSelectionMatches = true;
CodeMirror.defaults.styleSelectedText = true;
}
function init() {
/**
* This is where it all starts to load up...
*/
return spromise(function(resolve) {
brackets.getModule([
"thirdparty/CodeMirror/lib/codemirror",
"thirdparty/CodeMirror/addon/selection/mark-selection",
"thirdparty/CodeMirror/addon/search/match-highlighter"
], resolve);
}).done(initAddons);
}
return {
ready: init().done
};
});