Socket
Socket
Sign inDemoInstall

@codemirror/basic-setup

Package Overview
Dependencies
24
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.18.0 to 0.18.1

10

CHANGELOG.md

@@ -0,3 +1,13 @@

## 0.18.1 (2021-05-15)
### New features
The basic setup now includes `highlightActiveLineGutter` from @codemirror/gutter.
## 0.18.0 (2021-03-03)
### Breaking changes
Update dependencies to 0.18.
## 0.17.1 (2021-01-06)

@@ -4,0 +14,0 @@

@@ -5,4 +5,41 @@ import { Extension } from '@codemirror/state';

/**
This is an extension value that just pulls together a whole lot of
extensions that you might want in a basic editor. It is meant as a
convenient helper to quickly set up CodeMirror without installing
and importing a lot of packages.
Specifically, it includes...
- [the default command bindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
- [line numbers](https://codemirror.net/6/docs/ref/#gutter.lineNumbers)
- [special character highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars)
- [the undo history](https://codemirror.net/6/docs/ref/#history.history)
- [a fold gutter](https://codemirror.net/6/docs/ref/#fold.foldGutter)
- [custom selection drawing](https://codemirror.net/6/docs/ref/#view.drawSelection)
- [multiple selections](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
- [reindentation on input](https://codemirror.net/6/docs/ref/#language.indentOnInput)
- [the default highlight style](https://codemirror.net/6/docs/ref/#highlight.defaultHighlightStyle) (as fallback)
- [bracket matching](https://codemirror.net/6/docs/ref/#matchbrackets.bracketMatching)
- [bracket closing](https://codemirror.net/6/docs/ref/#closebrackets.closeBrackets)
- [autocompletion](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion)
- [rectangular selection](https://codemirror.net/6/docs/ref/#rectangular-selection.rectangularSelection)
- [active line highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLine)
- [active line gutter highlighting](https://codemirror.net/6/docs/ref/#gutter.highlightActiveLineGutter)
- [selection match highlighting](https://codemirror.net/6/docs/ref/#search.highlightSelectionMatches)
- [search](https://codemirror.net/6/docs/ref/#search.searchKeymap)
- [commenting](https://codemirror.net/6/docs/ref/#comment.commentKeymap)
- [linting](https://codemirror.net/6/docs/ref/#lint.lintKeymap)
(You'll probably want to add some language package to your setup
too.)
This package does not allow customization. The idea is that, once
you decide you want to configure your editor more precisely, you
take this package's source (which is just a bunch of imports and
an array literal), copy it into your own code, and adjust it as
desired.
*/
declare const basicSetup: Extension;
export { basicSetup };

102

dist/index.js

@@ -8,3 +8,3 @@ import { highlightSpecialChars, drawSelection, highlightActiveLine, keymap } from '@codemirror/view';

import { indentOnInput } from '@codemirror/language';
import { lineNumbers } from '@codemirror/gutter';
import { lineNumbers, highlightActiveLineGutter } from '@codemirror/gutter';
import { defaultKeymap } from '@codemirror/commands';

@@ -20,52 +20,56 @@ import { bracketMatching } from '@codemirror/matchbrackets';

/// This is an extension value that just pulls together a whole lot of
/// extensions that you might want in a basic editor. It is meant as a
/// convenient helper to quickly set up CodeMirror without installing
/// and importing a lot of packages.
///
/// Specifically, it includes...
///
/// - [the default command bindings](#commands.defaultKeymap)
/// - [line numbers](#gutter.lineNumbers)
/// - [special character highlighting](#view.highlightSpecialChars)
/// - [the undo history](#history.history)
/// - [a fold gutter](#fold.foldGutter)
/// - [custom selection drawing](#view.drawSelection)
/// - [multiple selections](#state.EditorState^allowMultipleSelections)
/// - [reindentation on input](#language.indentOnInput)
/// - [the default highlight style](#highlight.defaultHighlightStyle) (as fallback)
/// - [bracket matching](#matchbrackets.bracketMatching)
/// - [bracket closing](#closebrackets.closeBrackets)
/// - [autocompletion](#autocomplete.autocompletion)
/// - [rectangular selection](#rectangular-selection.rectangularSelection)
/// - [active line highlighting](#view.highlightActiveLine)
/// - [selection match highlighting](#search.highlightSelectionMatches)
/// - [search](#search.searchKeymap)
/// - [commenting](#comment.commentKeymap)
/// - [linting](#lint.lintKeymap)
///
/// (You'll probably want to add some language package to your setup
/// too.)
///
/// This package does not allow customization. The idea is that, once
/// you decide you want to configure your editor more precisely, you
/// take this package's source (which is just a bunch of imports and
/// an array literal), copy it into your own code, and adjust it as
/// desired.
/**
This is an extension value that just pulls together a whole lot of
extensions that you might want in a basic editor. It is meant as a
convenient helper to quickly set up CodeMirror without installing
and importing a lot of packages.
Specifically, it includes...
- [the default command bindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
- [line numbers](https://codemirror.net/6/docs/ref/#gutter.lineNumbers)
- [special character highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars)
- [the undo history](https://codemirror.net/6/docs/ref/#history.history)
- [a fold gutter](https://codemirror.net/6/docs/ref/#fold.foldGutter)
- [custom selection drawing](https://codemirror.net/6/docs/ref/#view.drawSelection)
- [multiple selections](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
- [reindentation on input](https://codemirror.net/6/docs/ref/#language.indentOnInput)
- [the default highlight style](https://codemirror.net/6/docs/ref/#highlight.defaultHighlightStyle) (as fallback)
- [bracket matching](https://codemirror.net/6/docs/ref/#matchbrackets.bracketMatching)
- [bracket closing](https://codemirror.net/6/docs/ref/#closebrackets.closeBrackets)
- [autocompletion](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion)
- [rectangular selection](https://codemirror.net/6/docs/ref/#rectangular-selection.rectangularSelection)
- [active line highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLine)
- [active line gutter highlighting](https://codemirror.net/6/docs/ref/#gutter.highlightActiveLineGutter)
- [selection match highlighting](https://codemirror.net/6/docs/ref/#search.highlightSelectionMatches)
- [search](https://codemirror.net/6/docs/ref/#search.searchKeymap)
- [commenting](https://codemirror.net/6/docs/ref/#comment.commentKeymap)
- [linting](https://codemirror.net/6/docs/ref/#lint.lintKeymap)
(You'll probably want to add some language package to your setup
too.)
This package does not allow customization. The idea is that, once
you decide you want to configure your editor more precisely, you
take this package's source (which is just a bunch of imports and
an array literal), copy it into your own code, and adjust it as
desired.
*/
const basicSetup = [
lineNumbers(),
highlightSpecialChars(),
history(),
foldGutter(),
drawSelection(),
EditorState.allowMultipleSelections.of(true),
indentOnInput(),
/*@__PURE__*/lineNumbers(),
/*@__PURE__*/highlightActiveLineGutter(),
/*@__PURE__*/highlightSpecialChars(),
/*@__PURE__*/history(),
/*@__PURE__*/foldGutter(),
/*@__PURE__*/drawSelection(),
/*@__PURE__*/EditorState.allowMultipleSelections.of(true),
/*@__PURE__*/indentOnInput(),
defaultHighlightStyle.fallback,
bracketMatching(),
closeBrackets(),
autocompletion(),
rectangularSelection(),
highlightActiveLine(),
highlightSelectionMatches(),
keymap.of([
/*@__PURE__*/bracketMatching(),
/*@__PURE__*/closeBrackets(),
/*@__PURE__*/autocompletion(),
/*@__PURE__*/rectangularSelection(),
/*@__PURE__*/highlightActiveLine(),
/*@__PURE__*/highlightSelectionMatches(),
/*@__PURE__*/keymap.of([
...closeBracketsKeymap,

@@ -72,0 +76,0 @@ ...defaultKeymap,

{
"name": "@codemirror/basic-setup",
"version": "0.18.0",
"version": "0.18.1",
"description": "Example configuration for the CodeMirror code editor",
"scripts": {
"test": "echo 'No tests'",
"prepare": "tsc -p tsconfig.local.json && rollup -c"
"test": "cm-runtests",
"prepare": "cm-buildhelper src/basic-setup.ts"
},

@@ -46,5 +46,3 @@ "keywords": [

"devDependencies": {
"rollup": "^2.35.1",
"rollup-plugin-dts": "^2.0.1",
"typescript": "^4.1.3"
"@codemirror/buildhelper": "^0.1.5"
},

@@ -51,0 +49,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc