Improve code editor text selection and clean up lint enablement (#37474)

1. Make the content area stretch the box, enabling text selection to
start over empty space.
2. Disable linter for markdown, it can never produce lint errors, this
hides the unnecessary lint gutter on markdown files.
3. Verified all languages linter enablement, all accurate.
4. Refactor `getLinterExtension` to not rely on file extensions.
5. Include jsonc/json5 extensions in regex.

---
This PR was written with the help of Claude Opus 4.7

---------

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
silverwind
2026-05-01 19:41:31 +02:00
committed by GitHub
parent deb31d3f30
commit 31cee60cc7
2 changed files with 22 additions and 17 deletions

View File

@@ -24,6 +24,8 @@
font-family: var(--fonts-monospace);
font-size: 12px;
max-height: 90vh;
flex: 1;
min-height: 0;
}
.code-editor-container .cm-editor,
@@ -31,24 +33,22 @@
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.code-editor-container .cm-content,
.code-editor-container .cm-gutter {
min-height: 200px;
}
.code-editor-container .cm-scroller {
overflow: auto;
line-height: var(--line-height-code);
flex: 1;
min-height: 0;
}
.code-editor-container .cm-content {
align-self: stretch;
padding: 0;
}
.code-editor-container .cm-content * {
caret-color: inherit;
}
.code-editor-container .cm-content {
padding: 0;
}
.code-editor-container .cm-cursor,
.code-editor-container .cm-dropCursor {
border-left-color: var(--color-caret);
@@ -341,6 +341,8 @@
.code-editor-container {
position: relative;
min-height: 90vh;
display: flex;
flex-direction: column;
}
.cm-command-palette {