# v6

**URL:** https://discuss.codemirror.net/c/v6/7.md

[Latest](https://discuss.codemirror.net/latest.md) · [Categories](https://discuss.codemirror.net/categories.md)

---

## [About the v6 category](https://discuss.codemirror.net/t/about-the-v6-category/2699)

<div class="topic-metadata">

**Author:** [@marijn](https://discuss.codemirror.net/u/marijn)\
**Replies:** 0

</div>

Post relating to CodeMirror 6

---

## [Chinese IME input inside string literals causes garbled pinyin characters to appear in SQL editor](https://discuss.codemirror.net/t/chinese-ime-input-inside-string-literals-causes-garbled-pinyin-characters-to-appear-in-sql-editor/9890)

<div class="topic-metadata">

**Author:** [@sergeyteleshev](https://discuss.codemirror.net/u/sergeyteleshev)\
**Replies:** 3\
**Last updated:** [September 22, 2026, 6:14am UTC](https://discuss.codemirror.net/t/chinese-ime-input-inside-string-literals-causes-garbled-pinyin-characters-to-appear-in-sql-editor/9890 "2026-09-22T06:14:33Z")

</div>

Description When typing Chinese inside a single-quoted SQL string, intermediate pinyin text may remain after confirming the Chinese candidate. Existing text can also disappear or be replaced unexpectedly. Steps to repro…

---

## [Virtualization using the content-visibility CSS API](https://discuss.codemirror.net/t/virtualization-using-the-content-visibility-css-api/9887)

<div class="topic-metadata">

**Author:** [@nimeshnayaju](https://discuss.codemirror.net/u/nimeshnayaju)\
**Replies:** 0\
**Last updated:** [September 11, 2026, 4:28am UTC](https://discuss.codemirror.net/t/virtualization-using-the-content-visibility-css-api/9887 "2026-09-11T04:28:36Z")

</div>

Hi! Would you consider an option in @codemirror/view to render the entire document without JavaScript-based virtualization? My main motivation is compatibility with browser-native features and tools that inspect the DOM…

---

## [Native spellcheck is never applied to a CodeMirror 6 editing host on Chromium 152 (Electron 44)](https://discuss.codemirror.net/t/native-spellcheck-is-never-applied-to-a-codemirror-6-editing-host-on-chromium-152-electron-44/9886)

<div class="topic-metadata">

**Author:** [@mlongo](https://discuss.codemirror.net/u/mlongo)\
**Replies:** 3\
**Last updated:** [September 9, 2026, 10:37pm UTC](https://discuss.codemirror.net/t/native-spellcheck-is-never-applied-to-a-codemirror-6-editing-host-on-chromium-152-electron-44/9886 "2026-09-09T22:37:31Z")

</div>

On Chromium 152 (Electron 44), a bare EditorView (only EditorView.contentAttributes.of({spellcheck: "true", lang: "en-US"}), no other extensions) is never underlined by the native spellchecker, and the right-click menu o…

---

## [Multiple cursors across multiple CodeMirror instances](https://discuss.codemirror.net/t/multiple-cursors-across-multiple-codemirror-instances/9843)

<div class="topic-metadata">

**Author:** [@daguej](https://discuss.codemirror.net/u/daguej)\
**Replies:** 8\
**Last updated:** [September 9, 2026, 9:37pm UTC](https://discuss.codemirror.net/t/multiple-cursors-across-multiple-codemirror-instances/9843 "2026-09-09T21:37:12Z")

</div>

Imagine you have a page with 2+ CodeMirror instances. I’d like to allow the user to type into multiple instances at the same time. What’s the best way of going about this?

---

## [HTML rename start and ending tag](https://discuss.codemirror.net/t/html-rename-start-and-ending-tag/9499)

<div class="topic-metadata">

**Author:** [@shshaw](https://discuss.codemirror.net/u/shshaw)\
**Replies:** 2\
**Last updated:** [September 9, 2026, 9:12pm UTC](https://discuss.codemirror.net/t/html-rename-start-and-ending-tag/9499 "2026-09-09T21:12:47Z")

</div>

When using lang-html, is there a way to enable renaming both the start and end tag? E.g. If you have \<div\>Hello\</div\> , can you rename to \<h1\>Hello\</h1\> by only selecting one of the tags and typing h1? This used to be …

---

## [Safari input lag with focusable elements inside block replacement widgets](https://discuss.codemirror.net/t/safari-input-lag-with-focusable-elements-inside-block-replacement-widgets/9881)

<div class="topic-metadata">

**Author:** [@wilsons](https://discuss.codemirror.net/u/wilsons)\
**Replies:** 8\
**Last updated:** [September 9, 2026, 9:03pm UTC](https://discuss.codemirror.net/t/safari-input-lag-with-focusable-elements-inside-block-replacement-widgets/9881 "2026-09-09T21:03:40Z")

</div>

In Safari 17.6, typing before CodeMirror block replacement widgets becomes noticeably slow when the widgets contain native focusable elements such as . Minimal reproduction: create 2–3 Decoration.replace({block: true, w…

---

## [Four new CodeMirror 6 language packages: C, Lua, Luau, and Scala](https://discuss.codemirror.net/t/four-new-codemirror-6-language-packages-c-lua-luau-and-scala/9883)

<div class="topic-metadata">

**Author:** [@fazelllyyy](https://discuss.codemirror.net/u/fazelllyyy)\
**Replies:** 2\
**Last updated:** [September 4, 2026, 3:28pm UTC](https://discuss.codemirror.net/t/four-new-codemirror-6-language-packages-c-lua-luau-and-scala/9883 "2026-09-04T15:28:43Z")

</div>

Hi everyone! I’ve recently created four new language packages for CodeMirror 6: @fazelstudio/codemirror-lang-c — C language support @fazelstudio/codemirror-lang-lua — Lua 5.4 language support @fazelstudio/codem…

---

## [New CodeMirror 6 language packages for Kotlin and Swift](https://discuss.codemirror.net/t/new-codemirror-6-language-packages-for-kotlin-and-swift/9882)

<div class="topic-metadata">

**Author:** [@fazelllyyy](https://discuss.codemirror.net/u/fazelllyyy)\
**Replies:** 2\
**Last updated:** [September 3, 2026, 7:11am UTC](https://discuss.codemirror.net/t/new-codemirror-6-language-packages-for-kotlin-and-swift/9882 "2026-09-03T07:11:14Z")

</div>

Hi everyone! I’ve recently created two new language packages for CodeMirror 6: @fazelstudio/codemirror-lang-kotlin — Kotlin language support @fazelstudio/codemirror-lang-swift — Swift language support Both pack…

---

## [Minimap for Codemirror 6?](https://discuss.codemirror.net/t/minimap-for-codemirror-6/5232)

<div class="topic-metadata">

**Author:** [@Boscop](https://discuss.codemirror.net/u/Boscop)\
**Replies:** 6\
**Last updated:** [August 29, 2026, 6:52pm UTC](https://discuss.codemirror.net/t/minimap-for-codemirror-6/5232 "2026-08-29T18:52:38Z")

</div>

Is there something like a minimap (bird’s eye view of the doc) for Codemirror 6 or are there plans for it? :slight\_smile: It would be very useful for working with large documents. I found this package but it’s for v5: h…

---

## [Adjacent highlightWhitespace() marker spans become one span containing IME preedit text during composition](https://discuss.codemirror.net/t/adjacent-highlightwhitespace-marker-spans-become-one-span-containing-ime-preedit-text-during-composition/9877)

<div class="topic-metadata">

**Author:** [@motoki-kentaro](https://discuss.codemirror.net/u/motoki-kentaro)\
**Replies:** 7\
**Last updated:** [August 28, 2026, 5:30pm UTC](https://discuss.codemirror.net/t/adjacent-highlightwhitespace-marker-spans-become-one-span-containing-ime-preedit-text-during-composition/9877 "2026-08-28T17:30:13Z")

</div>

Hi, I found a composition-time rendering issue with CodeMirror’s built-in highlightWhitespace() extension on Windows with a Japanese IME. I’m not sure whether the DOM behavior itself is expected as part of CodeMirror’s…

---

## [Partial views of documents](https://discuss.codemirror.net/t/partial-views-of-documents/3160)

<div class="topic-metadata">

**Author:** [@devast8a](https://discuss.codemirror.net/u/devast8a)\
**Replies:** 2\
**Last updated:** [August 22, 2026, 5:08pm UTC](https://discuss.codemirror.net/t/partial-views-of-documents/3160 "2026-08-22T17:08:45Z")

</div>

In codemirror 5 you can use linkedDoc to link two documents together so that changes to one document are reflected in the linked document automatically. You can also provide a start and end line to linkedDoc which causes…

---

## [New language packages for Astro and Prisma](https://discuss.codemirror.net/t/new-language-packages-for-astro-and-prisma/9870)

<div class="topic-metadata">

**Author:** [@fazelllyyy](https://discuss.codemirror.net/u/fazelllyyy)\
**Replies:** 2\
**Last updated:** [August 22, 2026, 12:04pm UTC](https://discuss.codemirror.net/t/new-language-packages-for-astro-and-prisma/9870 "2026-08-22T12:04:45Z")

</div>

Hi everyone, I recently built and published two new language packages for the CodeMirror ecosystem. If you are building editors that need to support Astro components or Prisma schemas, I hope you find these useful! Her…

---

## [Changing line ending dynamically causes weird characters to show](https://discuss.codemirror.net/t/changing-line-ending-dynamically-causes-weird-characters-to-show/9855)

<div class="topic-metadata">

**Author:** [@paladox](https://discuss.codemirror.net/u/paladox)\
**Replies:** 5\
**Last updated:** [August 21, 2026, 6:45pm UTC](https://discuss.codemirror.net/t/changing-line-ending-dynamically-causes-weird-characters-to-show/9855 "2026-08-21T18:45:00Z")

</div>

Hi, changing line endings dynamically seems to show weird characters. It resolves if you close the editor and reopen. https://gerrit-review.googlesource.com/c/plugins/codemirror-editor/+/615582 is my code. I want to fix…

---

## [Add the ability to have both CRLF and LF](https://discuss.codemirror.net/t/add-the-ability-to-have-both-crlf-and-lf/9869)

<div class="topic-metadata">

**Author:** [@paladox](https://discuss.codemirror.net/u/paladox)\
**Replies:** 1\
**Last updated:** [August 20, 2026, 6:03am UTC](https://discuss.codemirror.net/t/add-the-ability-to-have-both-crlf-and-lf/9869 "2026-08-20T06:03:17Z")

</div>

You can have both CRLF and LF in a file. Could the ability for this be added to CM? The idea is that if someone uses git to upload a file to a code review. And said code review uses CodeMirror to allow editing the file t…

---

## [Horizontal scrollbar and line numbers](https://discuss.codemirror.net/t/horizontal-scrollbar-and-line-numbers/9854)

<div class="topic-metadata">

**Author:** [@Fran](https://discuss.codemirror.net/u/Fran)\
**Replies:** 2\
**Last updated:** [August 17, 2026, 8:38am UTC](https://discuss.codemirror.net/t/horizontal-scrollbar-and-line-numbers/9854 "2026-08-17T08:38:02Z")

</div>

Hello, I’ve added vertical and horizontal scroll bar and everything works great, however I’ve realized horizontal bar goes “over” line numbers, is there a way to limit its wide to “editor area”? In case extensions’s…

---

## [Showcase: Margin, a local-first markdown notes app for macOS built on CM6](https://discuss.codemirror.net/t/showcase-margin-a-local-first-markdown-notes-app-for-macos-built-on-cm6/9867)

<div class="topic-metadata">

**Author:** [@sth\_wicked](https://discuss.codemirror.net/u/sth_wicked)\
**Replies:** 0\
**Last updated:** [August 15, 2026, 8:27pm UTC](https://discuss.codemirror.net/t/showcase-margin-a-local-first-markdown-notes-app-for-macos-built-on-cm6/9867 "2026-08-15T20:27:31Z")

</div>

I’ve been building Margin (https://gomargin.app), a markdown notes app for Mac (Tauri v2, so CM6 runs in the system webview). Notes are plain markdown files on disk; the editor is where I’ve spent most of my time, and it…

---

## [Dash Separated / Kebab Case Selection Too Inclusive](https://discuss.codemirror.net/t/dash-separated-kebab-case-selection-too-inclusive/9619)

<div class="topic-metadata">

**Author:** [@shshaw](https://discuss.codemirror.net/u/shshaw)\
**Replies:** 6\
**Last updated:** [August 14, 2026, 9:40am UTC](https://discuss.codemirror.net/t/dash-separated-kebab-case-selection-too-inclusive/9619 "2026-08-14T09:40:59Z")

</div>

Typically on Mac, double clicking a dash separated “word” ( like-this-example ) will only select the clicked segment up until a dash. (Double click example and you’d get like-this-example with the bold text showing the s…

---

## [\[Plugin\] Git Gutter for CodeMirror6 - a VSCode-style inline diff gutter + peek view for CodeMirror 6](https://discuss.codemirror.net/t/plugin-git-gutter-for-codemirror6-a-vscode-style-inline-diff-gutter-peek-view-for-codemirror-6/9863)

<div class="topic-metadata">

**Author:** [@fazelllyyy](https://discuss.codemirror.net/u/fazelllyyy)\
**Replies:** 0\
**Last updated:** [August 13, 2026, 10:37am UTC](https://discuss.codemirror.net/t/plugin-git-gutter-for-codemirror6-a-vscode-style-inline-diff-gutter-peek-view-for-codemirror-6/9863 "2026-08-13T10:37:01Z")

</div>

Hello everyone! :wave: I’ve been building a CodeMirror 6 extension that adds a git gutter with a VSCode-like peek view, and I’d love to share it and get your feedback. Repo: https://github.com/fazelllyyy/codemirror-git…

---

## [\[Plugin\] Sticky Scroll for CodeMirror 6 — VS Code / Monaco-style pinned scope lines](https://discuss.codemirror.net/t/plugin-sticky-scroll-for-codemirror-6-vs-code-monaco-style-pinned-scope-lines/9860)

<div class="topic-metadata">

**Author:** [@fazelllyyy](https://discuss.codemirror.net/u/fazelllyyy)\
**Replies:** 1\
**Last updated:** [August 11, 2026, 6:41pm UTC](https://discuss.codemirror.net/t/plugin-sticky-scroll-for-codemirror-6-vs-code-monaco-style-pinned-scope-lines/9860 "2026-08-11T18:41:32Z")

</div>

Hi everyone! :waving\_hand: I’ve just published a new extension that brings VS Code / Monaco-style sticky scroll to CodeMirror 6: :package: @fazelstudio/codemirror-stickyscroll GitHub: GitHub - fazelllyyy/codemirror-s…

---

## [\`autoCloseTags\` doesn't close a nested tag when an identical outer closing tag already exists](https://discuss.codemirror.net/t/autoclosetags-doesnt-close-a-nested-tag-when-an-identical-outer-closing-tag-already-exists/9831)

<div class="topic-metadata">

**Author:** [@bajrangCoder](https://discuss.codemirror.net/u/bajrangCoder)\
**Replies:** 2\
**Last updated:** [August 3, 2026, 12:59am UTC](https://discuss.codemirror.net/t/autoclosetags-doesnt-close-a-nested-tag-when-an-identical-outer-closing-tag-already-exists/9831 "2026-08-03T00:59:34Z")

</div>

Hi, I’m seeing unexpected behavior from autoCloseTags in @codemirror/lang-html. Starting with: \<div\> \</div\> When I type another \<div\> inside the existing element, the result is: \<div\> \<div\> \</div\> I expected: \<…

---

## [Firefox 153 ignores transparent ::selection styling](https://discuss.codemirror.net/t/firefox-153-ignores-transparent-selection-styling/9838)

<div class="topic-metadata">

**Author:** [@MusikAnimal](https://discuss.codemirror.net/u/MusikAnimal)\
**Replies:** 2\
**Last updated:** [July 30, 2026, 1:45pm UTC](https://discuss.codemirror.net/t/firefox-153-ignores-transparent-selection-styling/9838 "2026-07-30T13:45:47Z")

</div>

The default .cm-line ::selection { background-color: transparent } styling is supposed to make the browser’s selection layer transparent, however this doesn’t seem to have an effect starting in Firefox 153. Instead FF re…

---

## [Is one LSP server per editor intentional in @codemirror/lsp-client? How to extend for multi-server cases](https://discuss.codemirror.net/t/is-one-lsp-server-per-editor-intentional-in-codemirror-lsp-client-how-to-extend-for-multi-server-cases/9833)

<div class="topic-metadata">

**Author:** [@bajrangCoder](https://discuss.codemirror.net/u/bajrangCoder)\
**Replies:** 1\
**Last updated:** [July 28, 2026, 1:28pm UTC](https://discuss.codemirror.net/t/is-one-lsp-server-per-editor-intentional-in-codemirror-lsp-client-how-to-extend-for-multi-server-cases/9833 "2026-07-28T13:28:46Z")

</div>

I’m using @codemirror/lsp-client and ran into a design question around attaching more than one language server to the same editor. In real editors it’s common to run several servers on one buffer, for example: • TypeSc…

---

## [Selection problems](https://discuss.codemirror.net/t/selection-problems/9830)

<div class="topic-metadata">

**Author:** [@feraxhp](https://discuss.codemirror.net/u/feraxhp)\
**Replies:** 2\
**Last updated:** [July 24, 2026, 8:54am UTC](https://discuss.codemirror.net/t/selection-problems/9830 "2026-07-24T08:54:17Z")

</div>

Hi, @marijn , sorry, again me, asking for the selection problems, i have a problem again, with a widget, i have 2 consecutive widgets one with a \<br\> and the other with a simple span with text, is there any way of avoidi…

---

## [Highlighting/data-language not activate for Robomind language](https://discuss.codemirror.net/t/highlighting-data-language-not-activate-for-robomind-language/9832)

<div class="topic-metadata">

**Author:** [@Janvanoorschot](https://discuss.codemirror.net/u/Janvanoorschot)\
**Replies:** 7\
**Last updated:** [July 22, 2026, 1:52pm UTC](https://discuss.codemirror.net/t/highlighting-data-language-not-activate-for-robomind-language/9832 "2026-07-22T13:52:11Z")

</div>

I am the developer of RobomindAcademy, a free site teaching Computational Thinking that has been using CodeMirror for more then 10 years (dank Marijn!). Currently i am preparing a major revamp of the Academy, which incl…

---

## [How can I detect shift key on paste event](https://discuss.codemirror.net/t/how-can-i-detect-shift-key-on-paste-event/9827)

<div class="topic-metadata">

**Author:** [@oscarotero](https://discuss.codemirror.net/u/oscarotero)\
**Replies:** 2\
**Last updated:** [July 20, 2026, 5:18pm UTC](https://discuss.codemirror.net/t/how-can-i-detect-shift-key-on-paste-event/9827 "2026-07-20T17:18:21Z")

</div>

Hi, thanks for this awesome editor! I have a event handler to transform the content on paste before inserting it. But don’t want to transform the content if the user has the shift key pressed (i.e. ctrl/cmd + shift + v)…

---

## [site appears to be down, can't post bugfix](https://discuss.codemirror.net/t/site-appears-to-be-down-cant-post-bugfix/9821)

<div class="topic-metadata">

**Author:** [@StoneCypher](https://discuss.codemirror.net/u/StoneCypher)\
**Replies:** 13\
**Last updated:** [July 6, 2026, 2:46pm UTC](https://discuss.codemirror.net/t/site-appears-to-be-down-cant-post-bugfix/9821 "2026-07-06T14:46:21Z")

</div>

so, there’s a bug in the most recent two minors. a patch went up but it’s incomplete. i wanted to post a pr, but … oh, you’re off of github. the forgejo website is down anyway, i think i have a pr to fix a tree corru…

---

## [IME input may break when cursor is adjacent to widget due to cm-widgetBuffer reconstruction](https://discuss.codemirror.net/t/ime-input-may-break-when-cursor-is-adjacent-to-widget-due-to-cm-widgetbuffer-reconstruction/9799)

<div class="topic-metadata">

**Author:** [@somebody](https://discuss.codemirror.net/u/somebody)\
**Replies:** 5\
**Last updated:** [July 2, 2026, 2:19pm UTC](https://discuss.codemirror.net/t/ime-input-may-break-when-cursor-is-adjacent-to-widget-due-to-cm-widgetbuffer-reconstruction/9799 "2026-07-02T14:19:26Z")

</div>

Description In Safari, when the cursor is positioned on either side of a widget, IME input may behave unexpectedly. Even when the widget itself does not change, an IME composition can trigger reconstruction of cm-widget…

---

## [The unusual scrolls on Android Webview](https://discuss.codemirror.net/t/the-unusual-scrolls-on-android-webview/9807)

<div class="topic-metadata">

**Author:** [@bajrangCoder](https://discuss.codemirror.net/u/bajrangCoder)\
**Replies:** 2\
**Last updated:** [June 24, 2026, 3:53am UTC](https://discuss.codemirror.net/t/the-unusual-scrolls-on-android-webview/9807 "2026-06-24T03:53:52Z")

</div>

From the docs and other resources, I learned how CodeMirror works, and it felt like a pretty good choice for migrating my old project from Ace. I did some research and really liked CodeMirror 6’s modular design, especia…

---

## [Codemirror 5 Themes](https://discuss.codemirror.net/t/codemirror-5-themes/9760)

<div class="topic-metadata">

**Author:** [@5e-Cleric](https://discuss.codemirror.net/u/5e-Cleric)\
**Replies:** 2\
**Last updated:** [June 23, 2026, 1:46pm UTC](https://discuss.codemirror.net/t/codemirror-5-themes/9760 "2026-06-23T13:46:08Z")

</div>

I’ve written an npm library that brings back the CodeMirror 5 themes with the new syntax for CodeMirror 6 themes. We had so many users complain when we made the update to v6 that i went and brought them all back. You c…

[Next page](https://discuss.codemirror.net/c/v6/7.md?page=1)
