# Latest

**URL:** https://discuss.codemirror.net/latest.md

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

---

## [Welcome to the CodeMirror discussion forum](https://discuss.codemirror.net/t/welcome-to-the-codemirror-discussion-forum/8)

<div class="topic-metadata">

**Author:** [@system](https://discuss.codemirror.net/u/system)\
**Replies:** 0\
**Last updated:** [October 15, 2014, 12:21pm UTC](https://discuss.codemirror.net/t/welcome-to-the-codemirror-discussion-forum/8 "2014-10-15T12:21:41Z")

</div>

This is a place for discussion and questions around the CodeMirror editor and Lezer parser system. Please be constructive and civil. When asking a question, do your research (look at the docs) first, and formulate your …

---

## [Diagnostic underline styling](https://discuss.codemirror.net/t/diagnostic-underline-styling/9892)

<div class="topic-metadata">

**Author:** [@benniekiss](https://discuss.codemirror.net/u/benniekiss)\
**Replies:** 2\
**Last updated:** [September 23, 2026, 5:33pm UTC](https://discuss.codemirror.net/t/diagnostic-underline-styling/9892 "2026-09-23T17:33:31Z")

</div>

Currently, codemirror diagnostics are styled with a generated svg underline, and I was wondering if there was a reason to do this, rather than using the browser’s native CSS styling. I ask since a Zettlr (markdown texte…

---

## [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…

---

## [Compartment performance question](https://discuss.codemirror.net/t/compartment-performance-question/9891)

<div class="topic-metadata">

**Author:** [@feraxhp](https://discuss.codemirror.net/u/feraxhp)\
**Replies:** 1\
**Last updated:** [September 22, 2026, 5:28am UTC](https://discuss.codemirror.net/t/compartment-performance-question/9891 "2026-09-22T05:28:59Z")

</div>

HI, i have a question on what is actually better for a dynamic theme to be configured. I have a set of specs that are based on css variables. that means that the theme specs will never change. But the current behavior of…

---

## [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…

---

## [posAtCoords throws "Cannot read properties of undefined (reading 'top')" when content has no client rects](https://discuss.codemirror.net/t/posatcoords-throws-cannot-read-properties-of-undefined-reading-top-when-content-has-no-client-rects/9790)

<div class="topic-metadata">

**Author:** [@stefan-boghean](https://discuss.codemirror.net/u/stefan-boghean)\
**Replies:** 3\
**Last updated:** [September 3, 2026, 12:43pm UTC](https://discuss.codemirror.net/t/posatcoords-throws-cannot-read-properties-of-undefined-reading-top-when-content-has-no-client-rects/9790 "2026-09-03T12:43:21Z")

</div>

EditorView.posAtCoords can throw TypeError: Cannot read properties of undefined (reading 'top') when the editor content reports \*\*no client rects\*\* for the queried position (e.g. the editor, or an ancestor, is \`display:n…

---

## [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…

---

## [Ignoring document portion during parsing](https://discuss.codemirror.net/t/ignoring-document-portion-during-parsing/9864)

<div class="topic-metadata">

**Author:** [@hrjakobsen](https://discuss.codemirror.net/u/hrjakobsen)\
**Replies:** 1\
**Last updated:** [August 14, 2026, 11:06am UTC](https://discuss.codemirror.net/t/ignoring-document-portion-during-parsing/9864 "2026-08-14T11:06:46Z")

</div>

Hi! We have a document that contains inline suggested-deletions. Something like “foo̶b̶a̶r̶baz”. In our editor we hide the deleted range completely, so it just looks like “foobaz”. This avoids awkward position mapping f…

---

## [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…

---

## [ChordPro Environment grammar question](https://discuss.codemirror.net/t/chordpro-environment-grammar-question/9851)

<div class="topic-metadata">

**Author:** [@OTheNonE](https://discuss.codemirror.net/u/OTheNonE)\
**Replies:** 2\
**Last updated:** [August 6, 2026, 1:49pm UTC](https://discuss.codemirror.net/t/chordpro-environment-grammar-question/9851 "2026-08-06T13:49:58Z")

</div>

I am creating a lezer grammar for the ChordPro format. I am currently working on the Environment Directive. A start to an environment with label can be described in the following two ways: {start\_of\_verse: Verse 1} // …

---

## [Ambiguity problem in ChordPro (new question created)](https://discuss.codemirror.net/t/ambiguity-problem-in-chordpro-new-question-created/9850)

<div class="topic-metadata">

**Author:** [@OTheNonE](https://discuss.codemirror.net/u/OTheNonE)\
**Replies:** 0\
**Last updated:** [August 5, 2026, 11:49am UTC](https://discuss.codemirror.net/t/ambiguity-problem-in-chordpro-new-question-created/9850 "2026-08-05T11:49:54Z")

</div>

Ops! I created a new question as this was poorly described, and i described it way better in the new question. I am trying to create a parser for the ChordPro format. Currently i am struggling with ambiguity with envir…

---

## [\`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: \<…

---

## [nonTightList behavior in lang-markdown](https://discuss.codemirror.net/t/nontightlist-behavior-in-lang-markdown/9840)

<div class="topic-metadata">

**Author:** [@GnohzGniy](https://discuss.codemirror.net/u/GnohzGniy)\
**Replies:** 1\
**Last updated:** [August 1, 2026, 7:32pm UTC](https://discuss.codemirror.net/t/nontightlist-behavior-in-lang-markdown/9840 "2026-08-01T19:32:10Z")

</div>

It looks we have a parameter to disable “non tight lists” in Markdown: /// By default, when pressing enter in a blank second item in a /// tight (no blank lines between items) list, the command will /// insert a blank l…

---

## [Horizontal scroll on blockwrappers](https://discuss.codemirror.net/t/horizontal-scroll-on-blockwrappers/9839)

<div class="topic-metadata">

**Author:** [@feraxhp](https://discuss.codemirror.net/u/feraxhp)\
**Replies:** 6\
**Last updated:** [July 31, 2026, 12:22am UTC](https://discuss.codemirror.net/t/horizontal-scroll-on-blockwrappers/9839 "2026-07-31T00:22:48Z")

</div>

Hi, i was wondering if there is some way of forcing a horizontal scroll within a block-wrapper scroll only the block-wrapper instead of all of the .cm-scroller? i have prepared this try to demonstrate, what do i want to…

---

## [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…

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