[fix] linewrap

This commit is contained in:
Andy Bunce 2025-08-29 16:01:52 +01:00
parent 83c80a4b8f
commit e81d9ac6f2
6 changed files with 9 additions and 7 deletions

View file

@ -7,7 +7,7 @@ import { lineNumbers, highlightActiveLineGutter, highlightSpecialChars,
import { openSearchPanel, highlightSelectionMatches, searchKeymap } from '@codemirror/search'; import { openSearchPanel, highlightSelectionMatches, searchKeymap } from '@codemirror/search';
import { openLintPanel, lintGutter, lintKeymap, linter, setDiagnostics, } from "@codemirror/lint" import { openLintPanel, lintGutter, lintKeymap, linter} from "@codemirror/lint"
import { indentWithTab, history, defaultKeymap, historyKeymap } from '@codemirror/commands'; import { indentWithTab, history, defaultKeymap, historyKeymap } from '@codemirror/commands';
@ -54,6 +54,7 @@ const baseExts = [
drawSelection(), drawSelection(),
dropCursor(), dropCursor(),
EditorState.allowMultipleSelections.of(true), EditorState.allowMultipleSelections.of(true),
EditorView.lineWrapping,
indentOnInput(), indentOnInput(),
syntaxHighlighting(defaultHighlightStyle, { fallback: true }), syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
bracketMatching(), bracketMatching(),

View file

@ -23,8 +23,8 @@
}, },
"scripts": { "scripts": {
"build": "rollup src/index.js -m true -f iife -o dist/cm6.bundle.js -p node-resolve,tla --output.name cm6", "build": "rollup src/index.js -m true -f iife -o dist/cm6.bundle.js -p node-resolve,tla --output.name cm6",
"build-cm": "rollup bundles/src/lsp.js -m true -f iife -o webapp/static/clients/codemirror/lsp.bundle.js -p node-resolve,tla --output.name lsp", "lsp-build": "rollup bundles/src/lsp.js -m true -f iife -o webapp/static/clients/codemirror/lsp.bundle.js -p node-resolve,tla --output.name lsp",
"min-cm": "cd webapp/static/clients/codemirror && npx minify lsp.bundle.js > lsp.bundle.min.js ", "lsp-min": "cd webapp/static/clients/codemirror && npx minify lsp.bundle.js > lsp.bundle.min.js ",
"min": "cd dist && npx minify cm6.bundle.js > cm6.bundle.min.js && npx minify lsp.bundle.js > lsp.bundle.min.js", "min": "cd dist && npx minify cm6.bundle.js > cm6.bundle.min.js && npx minify lsp.bundle.js > lsp.bundle.min.js",
"javac": "cd bundles/grammar && javac -cp %BASEX12%\\BaseX.jar -d build xq4.java && cd build && jar cf ../../../webapp/custom/xq4.jar . " "javac": "cd bundles/grammar && javac -cp %BASEX12%\\BaseX.jar -d build xq4.java && cd build && jar cf ../../../webapp/custom/xq4.jar . "
} }

View file

@ -13,7 +13,7 @@
} }
] ]
}, },
"hoverProvider": false, "hoverProvider": {},
"documentSymbolProvider": false, "documentSymbolProvider": false,
"documentRangeFormattingProvider": false, "documentRangeFormattingProvider": false,
"colorProvider": false, "colorProvider": false,

View file

@ -30045,6 +30045,7 @@ ${text}</tr>
drawSelection(), drawSelection(),
dropCursor(), dropCursor(),
EditorState.allowMultipleSelections.of(true), EditorState.allowMultipleSelections.of(true),
EditorView.lineWrapping,
indentOnInput(), indentOnInput(),
syntaxHighlighting(defaultHighlightStyle, { fallback: true }), syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
bracketMatching(), bracketMatching(),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long