MCPcopy
hub / github.com/babel/babel-sublime

github.com/babel/babel-sublime @v11.2.0 sqlite

repository ↗ · DeepWiki ↗ · release v11.2.0 ↗
79 symbols 94 edges 17 files 1 documented · 1%
README

babel-sublime

Language definition for modern JavaScript with JSX syntax, Flow typing, and Styled Components.

Installation

Find it as Babel through Package Control.

Setting as the default syntax

To set it as the default syntax for a particular extension:

  1. Open a file with that extension,
  2. From the View menu, select SyntaxOpen all with current extension as…BabelJavaScript (Babel)
  3. Repeat this for each extension (e.g.: .js and .jsx).

Setting a Color Scheme

Babel comes bundled with Next from Benvie/JavaScriptNext.tmLanguage. From the command palette, select UI: Select Color Scheme and select Next.

Screenshots

babel-sublime-vs-built-in-jsx

Snippets

Find them separately at babel/babel-sublime-snippets or as Babel Snippets through Package Control.

About

Under the hood, babel-sublime's syntax definition is built using JS Custom. JS Custom is based on Sublime's core JavaScript syntax, which is in turn descended from Benvie/JavaScriptNext.tmLanguage. Special thanks go to @jgebhardt and @zpao.

Contributing

The JavaScript (Babel).sublime-syntax file itself is generated by JS Custom and should not be manually modified — any bug fixes or enhancements to the syntax itself should go through JS Custom.

If you modify the commenting rules or Next theme, make sure to do so by editing the appropriate YAML-tmPreferences or YAML-tmTheme file and converting that file using PackageDev. Then, commit both the source (YAML) file and the converted (XML) file.

Core symbols most depended-on inside this repo

foo
called by 14
tests/syntax_test_js.js
bar
called by 13
tests/syntax_test_js.js
get
called by 2
tests/syntax_test_js_class.js
$
called by 1
tests/syntax_test_js.js
bar
called by 1
tests/syntax_test_js_class.js
testIfElseIndentationNoBraces
called by 0
tests/syntax_test_js_indent_common.js
testIfElseIndentationNoBracesWithLineComments
called by 0
tests/syntax_test_js_indent_common.js
testIfElseIndentationNoBracesMultiLine
called by 0
tests/syntax_test_js_indent_common.js

Shape

Function 43
Method 20
Class 16

Languages

TypeScript100%

Modules by API surface

tests/syntax_test_js.js28 symbols
tests/syntax_test_js_class.js27 symbols
tests/syntax_test_js_indent_common.js12 symbols
tests/syntax_test_js_import_export.js5 symbols
tests/syntax_test_flow.js5 symbols
tests/syntax_test_js_control.js1 symbols
tests/syntax_test_js_bindings.js1 symbols

For agents

$ claude mcp add babel-sublime \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact