Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@uiw/codemirror-extensions-langs
Advanced tools
Load languages Extensions for CodeMirror6.
npm install @uiw/codemirror-extensions-langs --save
import { loadLanguage, langNames, langs } from '@uiw/codemirror-extensions-langs';
loadLanguage('tsx');
langs.tsx();
console.log('langNames:', langNames); // => "jsx" | "typescript" | "javascript" | "tsx"
import CodeMirror from '@uiw/react-codemirror';
import { langs } from '@uiw/codemirror-extensions-langs';
function App() {
return <CodeMirror value="console.log('hello world!');" height="200px" extensions={[langs.tsx()]} />;
}
export default App;
import CodeMirror from '@uiw/react-codemirror';
import { loadLanguage } from '@uiw/codemirror-extensions-langs';
function App() {
return <CodeMirror value="console.log('hello world!');" height="200px" extensions={[loadLanguage('tsx')]} />;
}
export default App;
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { loadLanguage, langs } from '@uiw/codemirror-extensions-langs';
const state = EditorState.create({
doc: 'my source code',
extensions: [langs.jsx()],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
import CodeMirror from '@uiw/react-codemirror';
import { StreamLanguage } from '@codemirror/language';
import { go } from '@codemirror/legacy-modes/mode/go';
const goLang = `package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}`;
export default function App() {
return <CodeMirror value={goLang} height="200px" extensions={[StreamLanguage.define(go)]} />;
}
@codemirror/legacy-modes/mode/cpp
@codemirror/lang-cpp
@codemirror/legacy-modes/mode/html
@codemirror/lang-html
@codemirror/legacy-modes/mode/java
@codemirror/lang-java
@codemirror/legacy-modes/mode/javascript
@codemirror/lang-javascript
@codemirror/legacy-modes/mode/json
@codemirror/lang-json
@codemirror/legacy-modes/mode/lezer
@codemirror/lang-lezer
@codemirror/legacy-modes/mode/markdown
@codemirror/lang-markdown
@codemirror/legacy-modes/mode/php
@codemirror/lang-php
@codemirror/legacy-modes/mode/python
@codemirror/lang-python
@codemirror/legacy-modes/mode/rust
@codemirror/lang-rust
@codemirror/legacy-modes/mode/sql
@codemirror/lang-sql
@codemirror/legacy-modes/mode/xml
@codemirror/lang-xml
@codemirror/legacy-modes/mode/css
@codemirror/lang-less
@codemirror/legacy-modes/mode/sass
@codemirror/lang-sass
@codemirror/legacy-modes/mode/clojure
@nextjournal/lang-clojure
@codemirror/legacy-modes/mode/clike
@replit/codemirror-lang-csharp
As always, thanks to our amazing contributors!
Made with github-action-contributors.
Licensed under the MIT License.
FAQs
Load languages Extensions for CodeMirror6.
The npm package @uiw/codemirror-extensions-langs receives a total of 36,068 weekly downloads. As such, @uiw/codemirror-extensions-langs popularity was classified as popular.
We found that @uiw/codemirror-extensions-langs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.