@bhsd/codemirror-mediawiki 2.20.3 → 2.21.1

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/README.md CHANGED
@@ -47,6 +47,7 @@
47
47
  - [escape](#escape)
48
48
  - [tagMatching](#tagmatching)
49
49
  - [refHover](#refhover)
50
+ - [hover](#hover)
50
51
  - [openLinks](#openlinks)
51
52
  - [Known issues](#known-issues)
52
53
  - [Syntax Highlighting](#syntax-highlighting)
@@ -554,6 +555,18 @@ Matched or unmatched tags are highlighted in cyan or dark red when the cursor is
554
555
 
555
556
  Show the content of the `<ref>` tag defined elsewhere when hovering.
556
557
 
558
+ ## hover
559
+
560
+ *version added: 2.21.0*
561
+
562
+ Show the help information of a magic word when hovering.
563
+
564
+ ## signatureHelp
565
+
566
+ *version added: 2.21.0*
567
+
568
+ Show the parser function signature when typing.
569
+
557
570
  ## openLinks
558
571
 
559
572
  *version added: 2.19.6*
package/dist/escape.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import type { KeyBinding } from '@codemirror/view';
2
2
  export declare const escapeHTML: (str: string) => string, escapeURI: (str: string) => string;
3
- export declare const escapeKeymap: KeyBinding[];
3
+ declare const _default: KeyBinding[];
4
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import type { Tooltip, EditorView } from '@codemirror/view';
2
+ import type { Text } from '@codemirror/state';
3
+ import type { LanguageServiceBase } from 'wikiparser-node/extensions/typings';
4
+ import type { Position } from 'vscode-languageserver-types';
5
+ /**
6
+ * 获取当前编辑器的语言服务
7
+ * @param view EditorView 实例
8
+ */
9
+ export declare const getLSP: (view: EditorView) => LanguageServiceBase | undefined;
10
+ /**
11
+ * 将索引转换为位置
12
+ * @param doc Text 实例
13
+ * @param index 索引
14
+ */
15
+ export declare const indexToPos: (doc: Text, index: number) => Position;
16
+ /**
17
+ * 将位置转换为索引
18
+ * @param doc Text 实例
19
+ * @param pos 位置
20
+ */
21
+ export declare const posToIndex: (doc: Text, pos: Position) => number;
22
+ declare const _default: import("@codemirror/state").Extension & {
23
+ active: import("@codemirror/state").StateField<readonly Tooltip[]>;
24
+ };
25
+ export default _default;