@bhsd/codemirror-mediawiki 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codemirror.js +2 -7
- package/dist/main.min.js +10 -10
- package/dist/mw.min.js +11 -11
- package/dist/wiki.min.js +4 -4
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +6 -7
- package/dist/lsp.d.ts +0 -3
- package/dist/lsp.js +0 -34
package/dist/codemirror.js
CHANGED
|
@@ -27,7 +27,6 @@ import toolKeymap from './keymap';
|
|
|
27
27
|
import statusBar from './statusBar';
|
|
28
28
|
import { detectIndent } from './indent';
|
|
29
29
|
import bracketMatching from './matchBrackets';
|
|
30
|
-
import wikitextLSP from './lsp';
|
|
31
30
|
import javascript from './javascript';
|
|
32
31
|
import css from './css';
|
|
33
32
|
import lua from './lua';
|
|
@@ -323,15 +322,11 @@ export class CodeMirror6 {
|
|
|
323
322
|
* @param lang language
|
|
324
323
|
* @param config language configuration
|
|
325
324
|
*/
|
|
325
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
326
326
|
async setLanguage(lang = 'plain', config) {
|
|
327
327
|
this.#lang = lang;
|
|
328
328
|
if (this.#view) {
|
|
329
|
-
|
|
330
|
-
ws: { // eslint-disable-line no-unused-labels
|
|
331
|
-
if (lang === 'mediawiki') {
|
|
332
|
-
ext = [ext, await wikitextLSP()];
|
|
333
|
-
}
|
|
334
|
-
}
|
|
329
|
+
const ext = (languages[lang] ?? plain)(config);
|
|
335
330
|
this.#effects([
|
|
336
331
|
this.#language.reconfigure(ext),
|
|
337
332
|
this.#linter.reconfigure(linters[lang] ?? []),
|