22
33# @codemirror/lang-javascript [ ![ NPM version] ( https://img.shields.io/npm/v/@codemirror/lang-javascript.svg )] ( https://www.npmjs.org/package/@codemirror/lang-javascript )
44
5- [ [ ** WEBSITE** ] ( https://codemirror.net/ ) | [ ** ISSUES** ] ( https://github.com/codemirror/dev/issues ) | [ ** FORUM** ] ( https://discuss.codemirror.net/c/next/ ) | [ ** CHANGELOG** ] ( https://github.com/codemirror/lang-javascript/blob/main/CHANGELOG.md ) ]
5+ [ [ ** WEBSITE** ] ( https://codemirror.net/6/ ) | [ ** ISSUES** ] ( https://github.com/codemirror/dev/issues ) | [ ** FORUM** ] ( https://discuss.codemirror.net/c/next/ ) | [ ** CHANGELOG** ] ( https://github.com/codemirror/lang-javascript/blob/main/CHANGELOG.md ) ]
66
77This package implements JavaScript language support for the
8- [ CodeMirror] ( https://codemirror.net/ ) code editor.
8+ [ CodeMirror] ( https://codemirror.net/6/ ) code editor.
99
10- The [ project page] ( https://codemirror.net/ ) has more information, a
11- number of [ examples] ( https://codemirror.net/examples/ ) and the
12- [ documentation] ( https://codemirror.net/docs/ ) .
10+ The [ project page] ( https://codemirror.net/6/ ) has more information, a
11+ number of [ examples] ( https://codemirror.net/6/ examples/ ) and the
12+ [ documentation] ( https://codemirror.net/6/ docs/ ) .
1313
1414This code is released under an
1515[ MIT license] ( https://github.com/codemirror/lang-javascript/tree/main/LICENSE ) .
@@ -20,6 +20,7 @@ conduct](http://contributor-covenant.org/version/1/1/0/) that applies
2020to communication around the project.
2121
2222## API Reference
23+
2324<dl >
2425<dt id =" user-content-javascript " >
2526 <code ><strong ><a href =" #user-content-javascript " >javascript</a ></strong >(<a id =" user-content-javascript^config " href =" #user-content-javascript^config " >config</a >⁠ ; ?: {jsx⁠ ; ?: <a href =" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean " >boolean</a >, typescript⁠ ; ?: <a href =" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean " >boolean</a >} = {}) → <a href =" https://codemirror.net/docs/ref#language.LanguageSupport " >LanguageSupport</a ></code ></dt >
@@ -28,33 +29,45 @@ to communication around the project.
2829completion.</p >
2930</dd >
3031<dt id =" user-content-javascriptlanguage " >
31- <code ><strong ><a href =" #user-content-javascriptlanguage " >javascriptLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LezerLanguage " >LezerLanguage </a ></code ></dt >
32+ <code ><strong ><a href =" #user-content-javascriptlanguage " >javascriptLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LRLanguage " >LRLanguage </a ></code ></dt >
3233
3334<dd ><p >A language provider based on the <a href =" https://github.com/lezer-parser/javascript " >Lezer JavaScript
3435parser</a >, extended with
3536highlighting and indentation information.</p >
3637</dd >
3738<dt id =" user-content-typescriptlanguage " >
38- <code ><strong ><a href =" #user-content-typescriptlanguage " >typescriptLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LezerLanguage " >LezerLanguage </a ></code ></dt >
39+ <code ><strong ><a href =" #user-content-typescriptlanguage " >typescriptLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LRLanguage " >LRLanguage </a ></code ></dt >
3940
4041<dd ><p >A language provider for TypeScript.</p >
4142</dd >
4243<dt id =" user-content-jsxlanguage " >
43- <code ><strong ><a href =" #user-content-jsxlanguage " >jsxLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LezerLanguage " >LezerLanguage </a ></code ></dt >
44+ <code ><strong ><a href =" #user-content-jsxlanguage " >jsxLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LRLanguage " >LRLanguage </a ></code ></dt >
4445
4546<dd ><p >Language provider for JSX.</p >
4647</dd >
4748<dt id =" user-content-tsxlanguage " >
48- <code ><strong ><a href =" #user-content-tsxlanguage " >tsxLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LezerLanguage " >LezerLanguage </a ></code ></dt >
49+ <code ><strong ><a href =" #user-content-tsxlanguage " >tsxLanguage</a ></strong >: <a href =" https://codemirror.net/docs/ref#language.LRLanguage " >LRLanguage </a ></code ></dt >
4950
5051<dd ><p >Language provider for JSX + TypeScript.</p >
5152</dd >
53+ <dt id =" user-content-autoclosetags " >
54+ <code ><strong ><a href =" #user-content-autoclosetags " >autoCloseTags</a ></strong >: <a href =" https://codemirror.net/docs/ref#state.Extension " >Extension</a ></code ></dt >
55+
56+ <dd ><p >Extension that will automatically insert JSX close tags when a <code >> ; </code > or
57+ <code >/</code > is typed.</p >
58+ </dd >
5259<dt id =" user-content-snippets " >
5360 <code ><strong ><a href =" #user-content-snippets " >snippets</a ></strong >: readonly <a href =" https://codemirror.net/docs/ref#autocomplete.Completion " >Completion</a >[ ] </code ></dt >
5461
5562<dd ><p >A collection of JavaScript-related
5663<a href =" https://codemirror.net/docs/ref/#autocomplete.snippet " >snippets</a >.</p >
5764</dd >
65+ <dt id =" user-content-localcompletionsource " >
66+ <code ><strong ><a href =" #user-content-localcompletionsource " >localCompletionSource</a ></strong >(<a id =" user-content-localcompletionsource^context " href =" #user-content-localcompletionsource^context " >context</a >: <a href =" https://codemirror.net/docs/ref#autocomplete.CompletionContext " >CompletionContext</a >) → <a href =" https://codemirror.net/docs/ref#autocomplete.CompletionResult " >CompletionResult</a > | <a href =" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null " >null</a ></code ></dt >
67+
68+ <dd ><p >Completion source that looks up locally defined names in
69+ JavaScript code.</p >
70+ </dd >
5871<dt id =" user-content-eslint " >
5972 <code ><strong ><a href =" #user-content-eslint " >esLint</a ></strong >(<a id =" user-content-eslint^eslint " href =" #user-content-eslint^eslint " >eslint</a >: any, <a id =" user-content-eslint^config " href =" #user-content-eslint^config " >config</a >⁠ ; ?: any) → fn(<a id =" user-content-eslint^returns^view " href =" #user-content-eslint^returns^view " >view</a >: <a href =" https://codemirror.net/docs/ref#view.EditorView " >EditorView</a >) → <a href =" https://codemirror.net/docs/ref#lint.Diagnostic " >Diagnostic</a >[ ] </code ></dt >
6073
7184packages may help with that.</p >
7285</dd >
7386</dl >
74-
0 commit comments