
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@uiw/codemirror-theme-gruvbox-dark
Advanced tools
This package implements the gruvbox light theme for the CodeMirror code editor.
npm install @uiw/codemirror-theme-gruvbox-dark --save
import { EditorState } from '@codemirror/state';
import { javascript } from '@codemirror/lang-javascript';
import { gruvboxDark } from '@uiw/codemirror-theme-gruvbox-dark';
const state = EditorState.create({
doc: 'my source code',
extensions: [gruvboxDark, javascript({ jsx: true })],
});
Using in React:
import { gruvboxDark, gruvboxDarkInit, gruvboxLight, gruvboxLightInit } from '@uiw/codemirror-theme-nord';
<CodeMirror theme={gruvboxDark} />
<CodeMirror
theme={gruvboxDarkInit({
settings: {
caret: '#c6c6c6',
fontFamily: 'monospace',
}
})}
/>
import { CreateThemeOptions } from '@uiw/codemirror-themes';
export declare const defaultSettingsGruvboxDark: CreateThemeOptions['settings'];
export declare const gruvboxDarkInit: (options?: Partial<CreateThemeOptions>) => import('@codemirror/state').Extension;
export declare const gruvboxDark: import('@codemirror/state').Extension;
export declare const defaultSettingsGruvboxLight: CreateThemeOptions['settings'];
export declare const gruvboxLightInit: (options?: Partial<CreateThemeOptions>) => import('@codemirror/state').Extension;
export declare const gruvboxLight: import('@codemirror/state').Extension;
import CodeMirror from '@uiw/react-codemirror';
import { gruvboxDark, gruvboxLight } from '@uiw/codemirror-theme-gruvbox-dark';
import { javascript } from '@codemirror/lang-javascript';
function App() {
return (
<CodeMirror
value="console.log('hello world!');"
height="200px"
theme={gruvboxDark}
extensions={[javascript({ jsx: true })]}
/>
);
}
export default App;
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { javascript } from '@codemirror/lang-javascript';
import { gruvboxDark } from '@uiw/codemirror-theme-gruvbox-dark';
const state = EditorState.create({
doc: 'my source code',
extensions: [gruvboxDark, javascript({ jsx: true })],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
As always, thanks to our amazing contributors!
Made with github-action-contributors.
Licensed under the MIT License.
FAQs
Theme gruvbox-dark for CodeMirror.
We found that @uiw/codemirror-theme-gruvbox-dark demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.