@codingame/monaco-vscode-emmet-service-override 11.1.1 → 12.0.0
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/index.d.ts +2 -1
- package/index.js +8 -1
- package/package.json +15 -7
- package/vscode/src/vs/workbench/contrib/emmet/browser/actions/expandAbbreviation.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/emmet/browser/actions/expandAbbreviation.js +11 -9
- package/vscode/src/vs/workbench/contrib/emmet/browser/emmetActions.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/emmet/browser/emmetActions.js +2 -1
- package/emmet.js +0 -7
package/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
+
export default function getServiceOverride(): IEditorOverrideServices;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-emmet-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - emmet service-override",
|
|
4
6
|
"keywords": [],
|
|
5
7
|
"author": {
|
|
6
8
|
"name": "CodinGame",
|
|
@@ -12,8 +14,12 @@
|
|
|
12
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
13
15
|
},
|
|
14
16
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@codingame/monaco-vscode-33833ac7-3af3-5e9d-8fb9-11838d852c59-common": "12.0.0",
|
|
19
|
+
"vscode": "npm:@codingame/monaco-vscode-api@12.0.0"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {},
|
|
22
|
+
"peerDependenciesMeta": {},
|
|
17
23
|
"main": "index.js",
|
|
18
24
|
"module": "index.js",
|
|
19
25
|
"types": "index.d.ts",
|
|
@@ -22,10 +28,12 @@
|
|
|
22
28
|
"default": "./index.js"
|
|
23
29
|
},
|
|
24
30
|
"./vscode/*": {
|
|
25
|
-
"default": "./vscode/src/*.js"
|
|
31
|
+
"default": "./vscode/src/*.js",
|
|
32
|
+
"types": "./vscode/src/*.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./*": {
|
|
35
|
+
"default": "./*.js",
|
|
36
|
+
"types": "./*.d.ts"
|
|
26
37
|
}
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.1.1"
|
|
30
38
|
}
|
|
31
39
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { EmmetEditorAction } from '../emmetActions.js';
|
|
3
4
|
import { registerEditorAction } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
4
5
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
6
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
5
7
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
8
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
6
9
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
10
|
|
|
8
11
|
class ExpandAbbreviationAction extends EmmetEditorAction {
|
|
9
12
|
constructor() {
|
|
10
13
|
super({
|
|
11
14
|
id: 'editor.emmet.action.expandAbbreviation',
|
|
12
|
-
label: (
|
|
13
|
-
alias: 'Emmet: Expand Abbreviation',
|
|
15
|
+
label: ( localize2(5718, "Emmet: Expand Abbreviation")),
|
|
14
16
|
precondition: EditorContextKeys.writable,
|
|
15
17
|
actionName: 'expand_abbreviation',
|
|
16
18
|
kbOpts: {
|
|
17
|
-
primary:
|
|
18
|
-
kbExpr: (
|
|
19
|
+
primary: KeyCode.Tab,
|
|
20
|
+
kbExpr: ( ContextKeyExpr.and(
|
|
19
21
|
EditorContextKeys.editorTextFocus,
|
|
20
22
|
EditorContextKeys.tabDoesNotMoveFocus,
|
|
21
|
-
|
|
22
|
-
))
|
|
23
|
-
weight:
|
|
23
|
+
( ContextKeyExpr.has('config.emmet.triggerExpansionOnTab'))
|
|
24
|
+
)),
|
|
25
|
+
weight: KeybindingWeight.EditorContrib
|
|
24
26
|
},
|
|
25
27
|
menuOpts: {
|
|
26
28
|
menuId: MenuId.MenubarEditMenu,
|
|
27
29
|
group: '5_insert',
|
|
28
|
-
title: ( localize(
|
|
30
|
+
title: ( localize(5719, "Emmet: E&&xpand Abbreviation")),
|
|
29
31
|
order: 3
|
|
30
32
|
}
|
|
31
33
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EditorAction, ServicesAccessor, IActionOptions } from "vscode/vscode/vs/editor/browser/editorExtensions";
|
|
2
|
+
import { ICodeEditor } from "vscode/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
export interface IGrammarContributions {
|
|
4
|
+
getGrammar(mode: string): string;
|
|
5
|
+
}
|
|
6
|
+
type IEmmetActionOptions = IActionOptions & {
|
|
7
|
+
actionName: string;
|
|
8
|
+
};
|
|
9
|
+
export declare abstract class EmmetEditorAction extends EditorAction {
|
|
10
|
+
protected emmetActionName: string;
|
|
11
|
+
constructor(opts: IEmmetActionOptions);
|
|
12
|
+
private static readonly emmetSupportedModes;
|
|
13
|
+
private _lastGrammarContributions;
|
|
14
|
+
private _lastExtensionService;
|
|
15
|
+
private _withGrammarContributions;
|
|
16
|
+
run(accessor: ServicesAccessor, editor: ICodeEditor): Promise<void>;
|
|
17
|
+
static getLanguage(editor: ICodeEditor, grammars: IGrammarContributions): {
|
|
18
|
+
language: string;
|
|
19
|
+
parentMode: string;
|
|
20
|
+
} | null;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
|
|
1
2
|
import { EditorAction } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
2
|
-
import { grammarsExtPoint } from 'vscode/vscode/vs/workbench/services/textMate/common/TMGrammars';
|
|
3
|
+
import { grammarsExtPoint } from '@codingame/monaco-vscode-33833ac7-3af3-5e9d-8fb9-11838d852c59-common/vscode/vs/workbench/services/textMate/common/TMGrammars';
|
|
3
4
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
4
5
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
5
6
|
|