# Uncategorized

**URL:** https://discuss.codemirror.net/c/uncategorized/1.md?page=1

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

**Page:** 2

---

## [Cursor issue in drawSelection after font reflow when using a custom font](https://discuss.codemirror.net/t/cursor-issue-in-drawselection-after-font-reflow-when-using-a-custom-font/9649)

<div class="topic-metadata">

**Author:** [@fervor](https://discuss.codemirror.net/u/fervor)\
**Replies:** 5\
**Last updated:** [January 14, 2026, 1:03am UTC](https://discuss.codemirror.net/t/cursor-issue-in-drawselection-after-font-reflow-when-using-a-custom-font/9649 "2026-01-14T01:03:39Z")

</div>

I’m using a custom font (Open Sans) in CodeMirror 6. When the font finishes loading, the page layout is reflowed. After this reflow, the cursor rendered by drawSelection becomes incorrect (misaligned / visually abnormal…

---

## [change blink cursor](https://discuss.codemirror.net/t/change-blink-cursor/9646)

<div class="topic-metadata">

**Author:** [@markzzz](https://discuss.codemirror.net/u/markzzz)\
**Replies:** 3\
**Last updated:** [January 12, 2026, 8:28am UTC](https://discuss.codemirror.net/t/change-blink-cursor/9646 "2026-01-12T08:28:02Z")

</div>

Hi, trying to change the color of the cursor within the area, this way: const theme = EditorView.theme({ "&.cm-editor": { fontFamily: "Arial, sans-serif !important", fontWeight: "bold", background: "#2d3748", …

---

## [Possible bug in commands.insertTab when using indentUnits](https://discuss.codemirror.net/t/possible-bug-in-commands-inserttab-when-using-indentunits/9623)

<div class="topic-metadata">

**Author:** [@Pomax](https://discuss.codemirror.net/u/Pomax)\
**Replies:** 6\
**Last updated:** [January 9, 2026, 6:36pm UTC](https://discuss.codemirror.net/t/possible-bug-in-commands-inserttab-when-using-indentunits/9623 "2026-01-09T18:36:52Z")

</div>

I’m using the insertTab and indentLess commands for block intenting, using keymap code: keymap.of(\[ { key: \`Tab\`, preventDefault: true, run: insertTab, }, { key: \`Sh…

---

## [CodeMirror Editon6 chinese character "；" Bug](https://discuss.codemirror.net/t/codemirror-editon6-chinese-character-bug/9637)

<div class="topic-metadata">

**Author:** [@st-ven200](https://discuss.codemirror.net/u/st-ven200)\
**Replies:** 1\
**Last updated:** [December 30, 2025, 4:51am UTC](https://discuss.codemirror.net/t/codemirror-editon6-chinese-character-bug/9637 "2025-12-30T04:51:54Z")

</div>

For example, enter the following text ；；； In; Creation;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; During the process of construction and destruction, ；；； ；； ；；； ；； ； ；；； \`\`\`ctrl Typing the C…

---

## [Code formatting in code mirror](https://discuss.codemirror.net/t/code-formatting-in-code-mirror/3405)

<div class="topic-metadata">

**Author:** [@ayaankhan98](https://discuss.codemirror.net/u/ayaankhan98)\
**Replies:** 10\
**Last updated:** [December 24, 2025, 3:31pm UTC](https://discuss.codemirror.net/t/code-formatting-in-code-mirror/3405 "2025-12-24T15:31:04Z")

</div>

Unable to find any function in codemirror documentation to format code? Any approach how to do this?

---

## [Extra line being inserted](https://discuss.codemirror.net/t/extra-line-being-inserted/9620)

<div class="topic-metadata">

**Author:** [@lvrpl](https://discuss.codemirror.net/u/lvrpl)\
**Replies:** 4\
**Last updated:** [December 22, 2025, 3:13pm UTC](https://discuss.codemirror.net/t/extra-line-being-inserted/9620 "2025-12-22T15:13:34Z")

</div>

Sorry, I got another for you. I think its related to this one I submitted a few months ago: You can reproduce the problem by going to your demo here on Chrome: Try CodeMirror Then on the either side select all and en…

---

## [Issue with copyLineDown command](https://discuss.codemirror.net/t/issue-with-copylinedown-command/9618)

<div class="topic-metadata">

**Author:** [@lvrpl](https://discuss.codemirror.net/u/lvrpl)\
**Replies:** 2\
**Last updated:** [December 17, 2025, 3:30pm UTC](https://discuss.codemirror.net/t/issue-with-copylinedown-command/9618 "2025-12-17T15:30:36Z")

</div>

If you do the copyLineDown command when the cursor is at the start of a line then it behaves like copyLineUp. Meaning that the line is duplicated but the cursor ends up on the top line instead of the bottom line.

---

## [Convert VSCode Theme → Lezar HighlightStyle?](https://discuss.codemirror.net/t/convert-vscode-theme-lezar-highlightstyle/9587)

<div class="topic-metadata">

**Author:** [@vez](https://discuss.codemirror.net/u/vez)\
**Replies:** 1\
**Last updated:** [November 27, 2025, 2:25pm UTC](https://discuss.codemirror.net/t/convert-vscode-theme-lezar-highlightstyle/9587 "2025-11-27T14:25:01Z")

</div>

I’m working on a custom editor for VSCode using Lezer for syntax highlighting. I have the user’s entire VSCode theme (TextMate language grammar scopes and colors) in memory in the custom editor, and I am trying to define…

---

## [LSP client request: Support for sortText on CompletionItem](https://discuss.codemirror.net/t/lsp-client-request-support-for-sorttext-on-completionitem/9576)

<div class="topic-metadata">

**Author:** [@skovmand](https://discuss.codemirror.net/u/skovmand)\
**Replies:** 6\
**Last updated:** [November 24, 2025, 3:07pm UTC](https://discuss.codemirror.net/t/lsp-client-request-support-for-sorttext-on-completionitem/9576 "2025-11-24T15:07:05Z")

</div>

Currently the Completion type in @codemirror/autocomplete supports the boost field to specify a custom ranking of results. However, in the LSP specification for CompletionItem each item has the sortText field to specify…

---

## [Bug: CodeMirror 6 Snippet Placeholders in Prometheus Web UI — Only First Placeholder Editable, TAB Navigation Broken](https://discuss.codemirror.net/t/bug-codemirror-6-snippet-placeholders-in-prometheus-web-ui-only-first-placeholder-editable-tab-navigation-broken/9575)

<div class="topic-metadata">

**Author:** [@ADITYATIWARI342005](https://discuss.codemirror.net/u/ADITYATIWARI342005)\
**Replies:** 4\
**Last updated:** [November 16, 2025, 3:54pm UTC](https://discuss.codemirror.net/t/bug-codemirror-6-snippet-placeholders-in-prometheus-web-ui-only-first-placeholder-editable-tab-navigation-broken/9575 "2025-11-16T15:54:57Z")

</div>

Hi CodeMirror community, I’m working on the Prometheus web UI (query editor), which uses CodeMirror 6 for PromQL completion and snippet insertion. I’m running into persistent trouble with snippet placeholder navigation:…

---

## [Pandoc div parser help](https://discuss.codemirror.net/t/pandoc-div-parser-help/9558)

<div class="topic-metadata">

**Author:** [@benniekiss](https://discuss.codemirror.net/u/benniekiss)\
**Replies:** 2\
**Last updated:** [November 3, 2025, 11:49am UTC](https://discuss.codemirror.net/t/pandoc-div-parser-help/9558 "2025-11-03T11:49:33Z")

</div>

I’m attempting to write a pandoc div parser/renderer, however, I’m running into one small issue that’s preventing me from finishing it. When the div closing mark, :::, immediately follows a paragraph, i.e. no blank line…

---

## [Are there examples of hideOn for hoverTooltip?](https://discuss.codemirror.net/t/are-there-examples-of-hideon-for-hovertooltip/9498)

<div class="topic-metadata">

**Author:** [@ohshima](https://discuss.codemirror.net/u/ohshima)\
**Replies:** 9\
**Last updated:** [October 3, 2025, 9:26pm UTC](https://discuss.codemirror.net/t/are-there-examples-of-hideon-for-hovertooltip/9498 "2025-10-03T21:26:25Z")

</div>

I am trying to create a tooltip with interactive features. As the first experiment, I defined the hideOn otption as: const testHover = hoverTooltip((view, pos, \_side) =\> { ... dom.className = "cm-tooltip-d…

---

## [How can I set different colors to inline code and code block?](https://discuss.codemirror.net/t/how-can-i-set-different-colors-to-inline-code-and-code-block/9520)

<div class="topic-metadata">

**Author:** [@coke](https://discuss.codemirror.net/u/coke)\
**Replies:** 4\
**Last updated:** [October 2, 2025, 12:20pm UTC](https://discuss.codemirror.net/t/how-can-i-set-different-colors-to-inline-code-and-code-block/9520 "2025-10-02T12:20:17Z")

</div>

Hi guys, I’m using lezer tags to highlight markdown text import { tags } from "@lezer/highlight"; For the code I’m setting color to tags.monospace, it supports both of inline code and codeblock. { tag: tags.monospace…

---

## [Atomic Range: click to select?](https://discuss.codemirror.net/t/atomic-range-click-to-select/9516)

<div class="topic-metadata">

**Author:** [@alaind](https://discuss.codemirror.net/u/alaind)\
**Replies:** 2\
**Last updated:** [September 26, 2025, 2:16pm UTC](https://discuss.codemirror.net/t/atomic-range-click-to-select/9516 "2025-09-26T14:16:31Z")

</div>

We have set some tokens as atomic ranges. Our users have raised the issue that they cannot click to select these atomicRanges. For example, in the official example CodeMirror Decoration Example it is possible to select…

---

## [Integrating my own backend-generated syntax tree](https://discuss.codemirror.net/t/integrating-my-own-backend-generated-syntax-tree/9509)

<div class="topic-metadata">

**Author:** [@misomica](https://discuss.codemirror.net/u/misomica)\
**Replies:** 4\
**Last updated:** [September 18, 2025, 10:49am UTC](https://discuss.codemirror.net/t/integrating-my-own-backend-generated-syntax-tree/9509 "2025-09-18T10:49:51Z")

</div>

Firstly, thank you @marijn and the rest of the team and sponsors for your tenacious and dedicated upkeep of this project over all these years. I found an email exchange I had with @marijn from back in 2011 when I last wo…

---

## [lsp-client: Use label over item.insertText for displayed completion text](https://discuss.codemirror.net/t/lsp-client-use-label-over-item-inserttext-for-displayed-completion-text/9493)

<div class="topic-metadata">

**Author:** [@skovmand](https://discuss.codemirror.net/u/skovmand)\
**Replies:** 5\
**Last updated:** [September 10, 2025, 1:08pm UTC](https://discuss.codemirror.net/t/lsp-client-use-label-over-item-inserttext-for-displayed-completion-text/9493 "2025-09-10T13:08:28Z")

</div>

Hi! Thanks once again for your great editor! I’m receiving completions from an LSP-server that provides tab stops as part of the completion. For instance insertText = “function(${1})” This works as tab stop, but the d…

---

## [Unwanted programmatic scrolling with large widgets](https://discuss.codemirror.net/t/unwanted-programmatic-scrolling-with-large-widgets/9372)

<div class="topic-metadata">

**Author:** [@hendrikerz](https://discuss.codemirror.net/u/hendrikerz)\
**Replies:** 6\
**Last updated:** [September 6, 2025, 10:27am UTC](https://discuss.codemirror.net/t/unwanted-programmatic-scrolling-with-large-widgets/9372 "2025-09-06T10:27:13Z")

</div>

Hej, I have a large widget (a long Markdown table, rendered to HTML) which also allows users to edit parts of the underlying source code (individual table cells) using subviews. While moving the cursor across the widget…

---

## [Cursor movement with replacing decorations](https://discuss.codemirror.net/t/cursor-movement-with-replacing-decorations/9491)

<div class="topic-metadata">

**Author:** [@bjones](https://discuss.codemirror.net/u/bjones)\
**Replies:** 2\
**Last updated:** [September 5, 2025, 2:55pm UTC](https://discuss.codemirror.net/t/cursor-movement-with-replacing-decorations/9491 "2025-09-05T14:55:44Z")

</div>

I use a replacement decoration. In inline mode, cursor movement operations can enter the replacement; I have a View plugin which responds to transactions when the selection is inside the replacement decoration to allow e…

---

## [Missing dependency of @codemirror/lsp-client](https://discuss.codemirror.net/t/missing-dependency-of-codemirror-lsp-client/9417)

<div class="topic-metadata">

**Author:** [@skovmand](https://discuss.codemirror.net/u/skovmand)\
**Replies:** 2\
**Last updated:** [September 2, 2025, 2:10pm UTC](https://discuss.codemirror.net/t/missing-dependency-of-codemirror-lsp-client/9417 "2025-09-02T14:10:12Z")

</div>

Hi! First of all, thank you for the great project! When using @codemirror/lsp-client, the diagnostics.ts file requires @codemirror/lint to be installed at compile-time: import {setDiagnostics} from "@codemirror/lint" …

---

## [Power Fx Language Support](https://discuss.codemirror.net/t/power-fx-language-support/9399)

<div class="topic-metadata">

**Author:** [@Ogre](https://discuss.codemirror.net/u/Ogre)\
**Replies:** 1\
**Last updated:** [August 21, 2025, 6:49pm UTC](https://discuss.codemirror.net/t/power-fx-language-support/9399 "2025-08-21T18:49:57Z")

</div>

It seems with Microsoft’s no-code/low-code solutions, there are a lot of users choosing to create solutions with the Power Fx language. Although other options do exist for syntax highlighting that gets ‘okay’ results, it…

---

## [How to ignore some part of text while typing](https://discuss.codemirror.net/t/how-to-ignore-some-part-of-text-while-typing/9394)

<div class="topic-metadata">

**Author:** [@markzzz](https://discuss.codemirror.net/u/markzzz)\
**Replies:** 0\
**Last updated:** [August 18, 2025, 6:23pm UTC](https://discuss.codemirror.net/t/how-to-ignore-some-part-of-text-while-typing/9394 "2025-08-18T18:23:48Z")

</div>

Hi, I’ve a CodeMirror area, where (when I type every char) it match some patterns, and in some case, add a specific text that I want to hide to user. In the specific case, when there is a {someText}(), it adds a \[{guid…

---

## [basicSetup](https://discuss.codemirror.net/t/basicsetup/9386)

<div class="topic-metadata">

**Author:** [@aha](https://discuss.codemirror.net/u/aha)\
**Replies:** 1\
**Last updated:** [August 15, 2025, 11:10am UTC](https://discuss.codemirror.net/t/basicsetup/9386 "2025-08-15T11:10:55Z")

</div>

I’m writing a demo for local testing. My CodeMirror version is 6.65.7. When I import using import { basicSetup } from "codemirror", why is basicSetup returning undefined?

---

## [CodeMirror 6 compatibility with React 16.14.0 — Syntax highlighting and autocomplete not working](https://discuss.codemirror.net/t/codemirror-6-compatibility-with-react-16-14-0-syntax-highlighting-and-autocomplete-not-working/9389)

<div class="topic-metadata">

**Author:** [@love\_czy](https://discuss.codemirror.net/u/love_czy)\
**Replies:** 2\
**Last updated:** [August 15, 2025, 8:57am UTC](https://discuss.codemirror.net/t/codemirror-6-compatibility-with-react-16-14-0-syntax-highlighting-and-autocomplete-not-working/9389 "2025-08-15T08:57:21Z")

</div>

CodeMirror 6 works fine in React 18.3.1, but in React 16.14.0, features like syntax highlighting and autocomplete fail to work. Is this due to incompatibility with React 16?

---

## [Is dirty flag available in codemirror?](https://discuss.codemirror.net/t/is-dirty-flag-available-in-codemirror/2716)

<div class="topic-metadata">

**Author:** [@shru](https://discuss.codemirror.net/u/shru)\
**Replies:** 7\
**Last updated:** [August 14, 2025, 6:10pm UTC](https://discuss.codemirror.net/t/is-dirty-flag-available-in-codemirror/2716 "2025-08-14T18:10:48Z")

</div>

We are using code mirror version 5.49.2. Does code mirror have an api or a flag to check if the code in the editor is dirty or in other words, if the user has edited the code in the editor? I am not looking at the ‘chang…

---

## [SyntaxHighlight throw error on shadow DOM](https://discuss.codemirror.net/t/syntaxhighlight-throw-error-on-shadow-dom/9365)

<div class="topic-metadata">

**Author:** [@stevesum](https://discuss.codemirror.net/u/stevesum)\
**Replies:** 7\
**Last updated:** [August 4, 2025, 9:20am UTC](https://discuss.codemirror.net/t/syntaxhighlight-throw-error-on-shadow-dom/9365 "2025-08-04T09:20:16Z")

</div>

I try to use the CodeMirror with custom language in a Vaadin Dialog, but I ran into errors. import {EditorView, lineNumbers} from "@codemirror/view"; import {EditorState} from "@codemirror/state"; import {HighlightStyle…

---

## [Caret visibility with drawSelection and readOnly](https://discuss.codemirror.net/t/caret-visibility-with-drawselection-and-readonly/9348)

<div class="topic-metadata">

**Author:** [@pe.affenzeller](https://discuss.codemirror.net/u/pe.affenzeller)\
**Replies:** 2\
**Last updated:** [July 23, 2025, 11:14am UTC](https://discuss.codemirror.net/t/caret-visibility-with-drawselection-and-readonly/9348 "2025-07-23T11:14:17Z")

</div>

hi marijn! we are using the drawSelection extension to draw the cursor and are currently looking into how we can hide the caret in read-only mode. we expected that it’s enough to use EditorState.readOnly.of(false), but…

---

## [Best solution to implement scroller bar error indicator](https://discuss.codemirror.net/t/best-solution-to-implement-scroller-bar-error-indicator/9349)

<div class="topic-metadata">

**Author:** [@Toly](https://discuss.codemirror.net/u/Toly)\
**Replies:** 0\
**Last updated:** [July 23, 2025, 10:22am UTC](https://discuss.codemirror.net/t/best-solution-to-implement-scroller-bar-error-indicator/9349 "2025-07-23T10:22:27Z")

</div>

I want to implement something like this. Show errors/warnings/information in the scrollbar area, which way should be the best practice? For Pannel, I think it’s only for the top and bottom position. For Gutter, I th…

---

## [save the folding state and reapply after reloading](https://discuss.codemirror.net/t/save-the-folding-state-and-reapply-after-reloading/4587)

<div class="topic-metadata">

**Author:** [@mbui0327](https://discuss.codemirror.net/u/mbui0327)\
**Replies:** 8\
**Last updated:** [July 17, 2025, 12:36pm UTC](https://discuss.codemirror.net/t/save-the-folding-state-and-reapply-after-reloading/4587 "2025-07-17T12:36:33Z")

</div>

Hi, what is the best way to save the folding state to disk and reapply it in case we have to reload the page. Thank for great work.

---

## [Decorations.replace({}) and cursor motion](https://discuss.codemirror.net/t/decorations-replace-and-cursor-motion/9330)

<div class="topic-metadata">

**Author:** [@evanhon0110](https://discuss.codemirror.net/u/evanhon0110)\
**Replies:** 2\
**Last updated:** [July 11, 2025, 6:33am UTC](https://discuss.codemirror.net/t/decorations-replace-and-cursor-motion/9330 "2025-07-11T06:33:15Z")

</div>

I use Decorations.replace({}) to hide some text, like ‘###123###’, I set to hide range 2 to 4, the ‘#1’ will be hidden. the text is hidden as expected.But when I move the cursor through the keyboard directional keys, th…

---

## [Is a .d.ts monotype file available?](https://discuss.codemirror.net/t/is-a-d-ts-monotype-file-available/9324)

<div class="topic-metadata">

**Author:** [@RPGillespie6](https://discuss.codemirror.net/u/RPGillespie6)\
**Replies:** 1\
**Last updated:** [July 11, 2025, 6:06am UTC](https://discuss.codemirror.net/t/is-a-d-ts-monotype-file-available/9324 "2025-07-11T06:06:50Z")

</div>

I have a .min.js bundle file which includes some CM6 that I’d like to use in a non-npm TypeScript project. I want to put a .d.ts file in front of it, but the problem is that the CM6 types are fragmented across a ton of d…

[Previous page](https://discuss.codemirror.net/c/uncategorized/1.md)

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