From 69778adb4c19d4b083127515559f74f96f2a6a09 Mon Sep 17 00:00:00 2001 From: David Alan Hjelle Date: Sun, 10 Apr 2011 00:03:07 -0500 Subject: [PATCH] Added Solarized color scheme (from http://ethanschoonover.com/solarized) --- index.html | 2 + lib/ace/theme/solarized_dark.js | 200 +++++++++++++++++ lib/ace/theme/solarized_light.js | 199 ++++++++++++++++ tool/tmtheme.js | 4 +- tool/tmthemes/Solarized-dark.tmTheme | 312 ++++++++++++++++++++++++++ tool/tmthemes/Solarized-light.tmTheme | 305 +++++++++++++++++++++++++ 6 files changed, 1021 insertions(+), 1 deletion(-) create mode 100644 lib/ace/theme/solarized_dark.js create mode 100644 lib/ace/theme/solarized_light.js create mode 100644 tool/tmthemes/Solarized-dark.tmTheme create mode 100644 tool/tmthemes/Solarized-light.tmTheme diff --git a/index.html b/index.html index 4cdac4cd..c79abe0f 100644 --- a/index.html +++ b/index.html @@ -47,6 +47,8 @@ + + diff --git a/lib/ace/theme/solarized_dark.js b/lib/ace/theme/solarized_dark.js new file mode 100644 index 00000000..2a0baefb --- /dev/null +++ b/lib/ace/theme/solarized_dark.js @@ -0,0 +1,200 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define(function(require, exports, module) { + + var dom = require("pilot/dom"); + + var cssText = ".ace-solarized-dark .ace_editor {\ + border: 2px solid rgb(159, 159, 159);\ +}\ +\ +.ace-solarized-dark .ace_editor.ace_focus {\ + border: 2px solid #327fbd;\ +}\ +\ +.ace-solarized-dark .ace_gutter {\ + width: 50px;\ + background: #e8e8e8;\ + color: #333;\ + overflow : hidden;\ +}\ +\ +.ace-solarized-dark .ace_gutter-layer {\ + width: 100%;\ + text-align: right;\ +}\ +\ +.ace-solarized-dark .ace_gutter-layer .ace_gutter-cell {\ + padding-right: 6px;\ +}\ +\ +.ace-solarized-dark .ace_print_margin {\ + width: 1px;\ + background: #e8e8e8;\ +}\ +\ +.ace-solarized-dark .ace_scroller {\ + background-color: #002B36;\ +}\ +\ +.ace-solarized-dark .ace_text-layer {\ + cursor: text;\ + color: #93A1A1;\ +}\ +\ +.ace-solarized-dark .ace_cursor {\ + border-left: 2px solid #D30102;\ +}\ +\ +.ace-solarized-dark .ace_cursor.ace_overwrite {\ + border-left: 0px;\ + border-bottom: 1px solid #D30102;\ +}\ + \ +.ace-solarized-dark .ace_marker-layer .ace_selection {\ + background: #073642;\ +}\ +\ +.ace-solarized-dark .ace_marker-layer .ace_step {\ + background: rgb(198, 219, 174);\ +}\ +\ +.ace-solarized-dark .ace_marker-layer .ace_bracket {\ + margin: -1px 0 0 -1px;\ + border: 1px solid rgba(147, 161, 161, 0.50);\ +}\ +\ +.ace-solarized-dark .ace_marker-layer .ace_active_line {\ + background: #073642;\ +}\ +\ + \ +.ace-solarized-dark .ace_invisible {\ + color: rgba(147, 161, 161, 0.50);\ +}\ +\ +.ace-solarized-dark .ace_keyword {\ + color:#859900;\ +}\ +\ +.ace-solarized-dark .ace_keyword.ace_operator {\ + \ +}\ +\ +.ace-solarized-dark .ace_constant {\ + \ +}\ +\ +.ace-solarized-dark .ace_constant.ace_language {\ + color:#B58900;\ +}\ +\ +.ace-solarized-dark .ace_constant.ace_library {\ + \ +}\ +\ +.ace-solarized-dark .ace_constant.ace_numeric {\ + color:#D33682;\ +}\ +\ +.ace-solarized-dark .ace_invalid {\ + \ +}\ +\ +.ace-solarized-dark .ace_invalid.ace_illegal {\ + \ +}\ +\ +.ace-solarized-dark .ace_invalid.ace_deprecated {\ + \ +}\ +\ +.ace-solarized-dark .ace_support {\ + \ +}\ +\ +.ace-solarized-dark .ace_support.ace_function {\ + color:#268BD2;\ +}\ +\ +.ace-solarized-dark .ace_function.ace_buildin {\ + \ +}\ +\ +.ace-solarized-dark .ace_string {\ + color:#2AA198;\ +}\ +\ +.ace-solarized-dark .ace_string.ace_regexp {\ + color:#D30102;\ +}\ +\ +.ace-solarized-dark .ace_comment {\ + font-style:italic;\ +color:#657B83;\ +}\ +\ +.ace-solarized-dark .ace_comment.ace_doc {\ + \ +}\ +\ +.ace-solarized-dark .ace_comment.ace_doc.ace_tag {\ + \ +}\ +\ +.ace-solarized-dark .ace_variable {\ + \ +}\ +\ +.ace-solarized-dark .ace_variable.ace_language {\ + color:#268BD2;\ +}\ +\ +.ace-solarized-dark .ace_xml_pe {\ + \ +}\ +\ +.ace-solarized-dark .ace_collab.ace_user1 {\ + \ +}"; + + // import CSS once + dom.importCssString(cssText); + + exports.cssClass = "ace-solarized-dark"; +}); \ No newline at end of file diff --git a/lib/ace/theme/solarized_light.js b/lib/ace/theme/solarized_light.js new file mode 100644 index 00000000..e8839918 --- /dev/null +++ b/lib/ace/theme/solarized_light.js @@ -0,0 +1,199 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define(function(require, exports, module) { + + var dom = require("pilot/dom"); + + var cssText = ".ace-solarized-light .ace_editor {\ + border: 2px solid rgb(159, 159, 159);\ +}\ +\ +.ace-solarized-light .ace_editor.ace_focus {\ + border: 2px solid #327fbd;\ +}\ +\ +.ace-solarized-light .ace_gutter {\ + width: 50px;\ + background: #e8e8e8;\ + color: #333;\ + overflow : hidden;\ +}\ +\ +.ace-solarized-light .ace_gutter-layer {\ + width: 100%;\ + text-align: right;\ +}\ +\ +.ace-solarized-light .ace_gutter-layer .ace_gutter-cell {\ + padding-right: 6px;\ +}\ +\ +.ace-solarized-light .ace_print_margin {\ + width: 1px;\ + background: #e8e8e8;\ +}\ +\ +.ace-solarized-light .ace_scroller {\ + background-color: #FDF6E3;\ +}\ +\ +.ace-solarized-light .ace_text-layer {\ + cursor: text;\ + color: #586E75;\ +}\ +\ +.ace-solarized-light .ace_cursor {\ + border-left: 2px solid #000000;\ +}\ +\ +.ace-solarized-light .ace_cursor.ace_overwrite {\ + border-left: 0px;\ + border-bottom: 1px solid #000000;\ +}\ + \ +.ace-solarized-light .ace_marker-layer .ace_selection {\ + background: #073642;\ +}\ +\ +.ace-solarized-light .ace_marker-layer .ace_step {\ + background: rgb(198, 219, 174);\ +}\ +\ +.ace-solarized-light .ace_marker-layer .ace_bracket {\ + margin: -1px 0 0 -1px;\ + border: 1px solid rgba(147, 161, 161, 0.50);\ +}\ +\ +.ace-solarized-light .ace_marker-layer .ace_active_line {\ + background: #EEE8D5;\ +}\ +\ + \ +.ace-solarized-light .ace_invisible {\ + color: rgba(147, 161, 161, 0.50);\ +}\ +\ +.ace-solarized-light .ace_keyword {\ + color:#859900;\ +}\ +\ +.ace-solarized-light .ace_keyword.ace_operator {\ + \ +}\ +\ +.ace-solarized-light .ace_constant {\ + \ +}\ +\ +.ace-solarized-light .ace_constant.ace_language {\ + color:#B58900;\ +}\ +\ +.ace-solarized-light .ace_constant.ace_library {\ + \ +}\ +\ +.ace-solarized-light .ace_constant.ace_numeric {\ + color:#D33682;\ +}\ +\ +.ace-solarized-light .ace_invalid {\ + \ +}\ +\ +.ace-solarized-light .ace_invalid.ace_illegal {\ + \ +}\ +\ +.ace-solarized-light .ace_invalid.ace_deprecated {\ + \ +}\ +\ +.ace-solarized-light .ace_support {\ + \ +}\ +\ +.ace-solarized-light .ace_support.ace_function {\ + color:#268BD2;\ +}\ +\ +.ace-solarized-light .ace_function.ace_buildin {\ + \ +}\ +\ +.ace-solarized-light .ace_string {\ + color:#2AA198;\ +}\ +\ +.ace-solarized-light .ace_string.ace_regexp {\ + color:#D30102;\ +}\ +\ +.ace-solarized-light .ace_comment {\ + color:#93A1A1;\ +}\ +\ +.ace-solarized-light .ace_comment.ace_doc {\ + \ +}\ +\ +.ace-solarized-light .ace_comment.ace_doc.ace_tag {\ + \ +}\ +\ +.ace-solarized-light .ace_variable {\ + \ +}\ +\ +.ace-solarized-light .ace_variable.ace_language {\ + color:#268BD2;\ +}\ +\ +.ace-solarized-light .ace_xml_pe {\ + \ +}\ +\ +.ace-solarized-light .ace_collab.ace_user1 {\ + \ +}"; + + // import CSS once + dom.importCssString(cssText); + + exports.cssClass = "ace-solarized-light"; +}); \ No newline at end of file diff --git a/tool/tmtheme.js b/tool/tmtheme.js index 4e0e2d30..b9331017 100644 --- a/tool/tmtheme.js +++ b/tool/tmtheme.js @@ -186,7 +186,9 @@ var themes = { "mono_industrial": "monoindustrial", "clouds": "Clouds", "clouds_midnight": "Clouds Midnight", - "kr_theme": "krTheme" + "kr_theme": "krTheme", + "solarized_light": "Solarized-light", + "solarized_dark": "Solarized-dark" } for (var name in themes) { diff --git a/tool/tmthemes/Solarized-dark.tmTheme b/tool/tmthemes/Solarized-dark.tmTheme new file mode 100644 index 00000000..4efdabdb --- /dev/null +++ b/tool/tmthemes/Solarized-dark.tmTheme @@ -0,0 +1,312 @@ + + + + + name + Solarized (dark) + settings + + + settings + + background + #002B36 + caret + #D30102 + foreground + #93A1A1 + invisibles + #93A1A180 + lineHighlight + #073642 + selection + #073642 + + + + name + Comment + scope + comment + settings + + fontStyle + italic + foreground + #657B83 + + + + name + String + scope + string + settings + + foreground + #2AA198 + + + + name + Regexp + scope + string.regexp + settings + + foreground + #D30102 + + + + name + Number + scope + constant.numeric + settings + + foreground + #D33682 + + + + name + Variable + scope + variable.language, variable.other + settings + + foreground + #268BD2 + + + + name + Keyword + scope + keyword + settings + + foreground + #859900 + + + + name + Storage + scope + storage + settings + + fontStyle + bold + foreground + #93A1A1 + + + + name + Class name + scope + entity.name.class, entity.name.type.class + settings + + fontStyle + + foreground + #CB4B16 + + + + name + Function name + scope + entity.name.function + settings + + foreground + #268BD2 + + + + name + Variable start + scope + punctuation.definition.variable + settings + + foreground + #859900 + + + + name + Embedded code markers + scope + punctuation.section.embedded.begin, punctuation.section.embedded.end + settings + + foreground + #D30102 + + + + name + Built-in constant + scope + constant.language, meta.preprocessor + settings + + foreground + #B58900 + + + + name + Support.construct + scope + support.function.construct, keyword.other.new + settings + + foreground + #CB4B16 + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #CB4B16 + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + foreground + #6C71C4 + + + + name + Function argument + scope + variable.parameter + settings + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + bold + foreground + #268BD2 + + + + name + Tag start/end + scope + punctuation.definition.tag + settings + + foreground + #657B83 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + foreground + #93A1A1 + + + + name + Library function + scope + support.function + settings + + foreground + #268BD2 + + + + name + Continuation + scope + punctuation.separator.continuation + settings + + foreground + #D30102 + + + + name + Library constant + scope + support.constant + settings + + + + name + Library class/type + scope + support.type, support.class + settings + + foreground + #859900 + + + + name + Library Exception + scope + support.type.exception + settings + + foreground + #CB4B16 + + + + name + Library variable + scope + support.other.variable + settings + + + + name + Invalid + scope + invalid + settings + + + + uuid + F930B0BF-AA03-4232-A30F-CEF749FF8E72 + + diff --git a/tool/tmthemes/Solarized-light.tmTheme b/tool/tmthemes/Solarized-light.tmTheme new file mode 100644 index 00000000..9db72b86 --- /dev/null +++ b/tool/tmthemes/Solarized-light.tmTheme @@ -0,0 +1,305 @@ + + + + + name + Solarized (light) + settings + + + settings + + background + #FDF6E3 + caret + #000000 + foreground + #586E75 + invisibles + #93A1A180 + lineHighlight + #EEE8D5 + selection + #073642 + + + + name + Comment + scope + comment + settings + + foreground + #93A1A1 + + + + name + String + scope + string + settings + + foreground + #2AA198 + + + + name + Regexp + scope + string.regexp + settings + + foreground + #D30102 + + + + name + Number + scope + constant.numeric + settings + + foreground + #D33682 + + + + name + Variable + scope + variable.language, variable.other + settings + + foreground + #268BD2 + + + + name + Keyword + scope + keyword + settings + + foreground + #859900 + + + + name + Storage + scope + storage + settings + + fontStyle + bold + foreground + #073642 + + + + name + Class name + scope + entity.name.class, entity.name.type.class + settings + + foreground + #268BD2 + + + + name + Function name + scope + entity.name.function + settings + + foreground + #268BD2 + + + + name + Variable start + scope + punctuation.definition.variable + settings + + foreground + #859900 + + + + name + Embedded code markers + scope + punctuation.section.embedded.begin, punctuation.section.embedded.end + settings + + foreground + #D30102 + + + + name + Built-in constant + scope + constant.language, meta.preprocessor + settings + + foreground + #B58900 + + + + name + Support.construct + scope + support.function.construct, keyword.other.new + settings + + foreground + #D30102 + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #CB4B16 + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + + + name + Function argument + scope + variable.parameter + settings + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + bold + foreground + #268BD2 + + + + name + Tag start/end + scope + punctuation.definition.tag.begin, punctuation.definition.tag.end + settings + + foreground + #93A1A1 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + foreground + #93A1A1 + + + + name + Library function + scope + support.function + settings + + foreground + #268BD2 + + + + name + Continuation + scope + punctuation.separator.continuation + settings + + foreground + #D30102 + + + + name + Library constant + scope + support.constant + settings + + + + name + Library class/type + scope + support.type, support.class + settings + + foreground + #859900 + + + + name + Library Exception + scope + support.type.exception + settings + + foreground + #CB4B16 + + + + name + Library variable + scope + support.other.variable + settings + + + + name + Invalid + scope + invalid + settings + + + + uuid + 38E819D9-AE02-452F-9231-ECC3B204AFD7 + +