Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@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 28,868 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.