Skip to content

Commit 197a541

Browse files
committed
Switch default to two spaces
1 parent 0f3b8b3 commit 197a541

File tree

173 files changed

+9786
-9853
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+9786
-9853
lines changed

.oxfmtrc.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,13 @@
1616
"trailingComma": "none",
1717
"insertFinalNewline": true,
1818
"sortPackageJson": true,
19-
"tabWidth": 4,
19+
"tabWidth": 2,
2020
"printWidth": 140,
2121
"overrides": [
2222
{
2323
"files": ["*.json"],
2424
"options": {
25-
"printWidth": 80,
26-
"tabWidth": 2
27-
}
28-
},
29-
{
30-
"files": ["*.yml", "*.yaml", "*.md"],
31-
"options": {
32-
"tabWidth": 2
33-
}
34-
},
35-
{
36-
"files": ["*.ts"],
37-
"options": {
38-
"insertFinalNewline": true
25+
"printWidth": 80
3926
}
4027
}
4128
]

index.html

Lines changed: 81 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,96 @@
11
<!doctype html>
22
<html>
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>monaco-languageclient Examples</title>
7-
<link rel="stylesheet" href="packages/examples/style.css" />
8-
</head>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>monaco-languageclient Examples</title>
7+
<link rel="stylesheet" href="packages/examples/style.css" />
8+
</head>
99

10-
<body>
11-
<div style="padding: 5px">
12-
<h2>Examples</h2>
10+
<body>
11+
<div style="padding: 5px">
12+
<h2>Examples</h2>
1313

14-
Please run <b><code>npm run build</code></b> first.
14+
Please run <b><code>npm run build</code></b> first.
1515

16-
<h3>Langium</h3>
16+
<h3>Langium</h3>
1717

18-
Langium Grammar DSL (Language Server in Worker): [ <a href="./packages/examples/langium_extended.html">Example Page</a> ]
19-
<br />
20-
Langium Statemachine (Language Server in Worker): [ <a href="./packages/examples/statemachine.html">Example Page</a> |
21-
<a href="./packages/examples/react_statemachine.html">React Example Page</a> ]
22-
<br />
23-
&nbsp;&nbsp;->&nbsp;&nbsp;Localized Versions: [
24-
<a href="./packages/examples/statemachine.html?locale=cs">cs</a> -
25-
<a href="./packages/examples/statemachine.html?locale=de">de</a> -
26-
<a href="./packages/examples/statemachine.html?locale=es">es</a> -
27-
<a href="./packages/examples/statemachine.html?locale=fr">fr</a> -
28-
<a href="./packages/examples/statemachine.html?locale=it">it</a> -
29-
<a href="./packages/examples/statemachine.html?locale=ja">ja</a> -
30-
<a href="./packages/examples/statemachine.html?locale=ko">ko</a> -
31-
<a href="./packages/examples/statemachine.html?locale=pl">pl</a> -
32-
<a href="./packages/examples/statemachine.html?locale=pt-br">pt-br</a> -
33-
<a href="./packages/examples/statemachine.html?locale=qps-ploc">qps-ploc</a> -
34-
<a href="./packages/examples/statemachine.html?locale=ru">ru</a> -
35-
<a href="./packages/examples/statemachine.html?locale=tr">tr</a> -
36-
<a href="./packages/examples/statemachine.html?locale=zh-hans">zh-hans</a> -
37-
<a href="./packages/examples/statemachine.html?locale=zh-hant">zh-hant</a> ]
18+
Langium Grammar DSL (Language Server in Worker): [ <a href="./packages/examples/langium_extended.html">Example Page</a> ]
19+
<br />
20+
Langium Statemachine (Language Server in Worker): [ <a href="./packages/examples/statemachine.html">Example Page</a> |
21+
<a href="./packages/examples/react_statemachine.html">React Example Page</a> ]
22+
<br />
23+
&nbsp;&nbsp;->&nbsp;&nbsp;Localized Versions: [
24+
<a href="./packages/examples/statemachine.html?locale=cs">cs</a> - <a href="./packages/examples/statemachine.html?locale=de">de</a> -
25+
<a href="./packages/examples/statemachine.html?locale=es">es</a> - <a href="./packages/examples/statemachine.html?locale=fr">fr</a> -
26+
<a href="./packages/examples/statemachine.html?locale=it">it</a> - <a href="./packages/examples/statemachine.html?locale=ja">ja</a> -
27+
<a href="./packages/examples/statemachine.html?locale=ko">ko</a> - <a href="./packages/examples/statemachine.html?locale=pl">pl</a> -
28+
<a href="./packages/examples/statemachine.html?locale=pt-br">pt-br</a> -
29+
<a href="./packages/examples/statemachine.html?locale=qps-ploc">qps-ploc</a> -
30+
<a href="./packages/examples/statemachine.html?locale=ru">ru</a> - <a href="./packages/examples/statemachine.html?locale=tr">tr</a> -
31+
<a href="./packages/examples/statemachine.html?locale=zh-hans">zh-hans</a> -
32+
<a href="./packages/examples/statemachine.html?locale=zh-hant">zh-hant</a> ]
3833

39-
<h3>JSON</h3>
34+
<h3>JSON</h3>
4035

41-
Beforehand, start Language Server with: <b><code>npm run start:example:server:json</code></b>
42-
<br />
43-
Extended (Language Server via Web Socket): [ <a href="./packages/examples/json.html">Example Page</a> ]
44-
<br />
45-
Classic (Language Server via Web Socket): [ <a href="./packages/examples/json_classic.html">Example Page</a> ]
46-
<br />
47-
Pure Browser Implementation: [ <a href="./packages/examples/browser.html">Example Page</a> ]
36+
Beforehand, start Language Server with: <b><code>npm run start:example:server:json</code></b>
37+
<br />
38+
Extended (Language Server via Web Socket): [ <a href="./packages/examples/json.html">Example Page</a> ]
39+
<br />
40+
Classic (Language Server via Web Socket): [ <a href="./packages/examples/json_classic.html">Example Page</a> ]
41+
<br />
42+
Pure Browser Implementation: [ <a href="./packages/examples/browser.html">Example Page</a> ]
4843

49-
<h3>Python</h3>
50-
Beforehand, start Language Server with: <b><code>npm run start:example:server:python</code></b
51-
><br />
52-
Debugger runs in container. Beforehand, start it with:
53-
<b><code>docker compose -f ./packages/examples/resources/debugger/docker-compose.yml up -d</code></b
54-
><br />
55-
Python (Language Server via Web Socket): [ <a href="./packages/examples/python.html">Example Page</a> |
56-
<a href="./packages/examples/react_python.html">React Example Page</a> ]
44+
<h3>Python</h3>
45+
Beforehand, start Language Server with: <b><code>npm run start:example:server:python</code></b
46+
><br />
47+
Debugger runs in container. Beforehand, start it with:
48+
<b><code>docker compose -f ./packages/examples/resources/debugger/docker-compose.yml up -d</code></b
49+
><br />
50+
Python (Language Server via Web Socket): [ <a href="./packages/examples/python.html">Example Page</a> |
51+
<a href="./packages/examples/react_python.html">React Example Page</a> ]
5752

58-
<h3>Java / Eclipse JDT LS</h3>
59-
Language Server runs in container. Beforehand, start it with:
60-
<b><code>docker compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml up -d</code></b
61-
><br />
62-
Java (Language Server via Web Socket): [ <a href="./packages/examples/eclipse.jdt.ls.html">Example Page</a> ]
53+
<h3>Java / Eclipse JDT LS</h3>
54+
Language Server runs in container. Beforehand, start it with:
55+
<b><code>docker compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml up -d</code></b
56+
><br />
57+
Java (Language Server via Web Socket): [ <a href="./packages/examples/eclipse.jdt.ls.html">Example Page</a> ]
6358

64-
<h3>Groovy</h3>
65-
Language Server runs in container. Beforehand, start it with:
66-
<b><code>docker compose -f ./packages/examples/resources/groovy/docker-compose.yml up -d</code></b
67-
><br />
68-
Groovy (Language Server via Web Socket): [ <a href="./packages/examples/groovy.html">Example Page</a> ]
59+
<h3>Groovy</h3>
60+
Language Server runs in container. Beforehand, start it with:
61+
<b><code>docker compose -f ./packages/examples/resources/groovy/docker-compose.yml up -d</code></b
62+
><br />
63+
Groovy (Language Server via Web Socket): [ <a href="./packages/examples/groovy.html">Example Page</a> ]
6964

70-
<h3>Cpp / Clangd</h3>
71-
Cpp (Language Server in Worker/Wasm): [ <a href="./packages/examples/clangd.html">Example Page</a> ]
65+
<h3>Cpp / Clangd</h3>
66+
Cpp (Language Server in Worker/Wasm): [ <a href="./packages/examples/clangd.html">Example Page</a> ]
7267

73-
<h3>Multi-Language Client</h3>
74-
Json & Python Language Clients App: [ <a href="./packages/examples/two_langauge_clients.html">Example Page</a> ] (Requires Json
75-
and Python Language Servers, see above)
76-
<h3>Application Playground</h3>
77-
Application Playground (incl. Open Collaboration Tools): [ <a href="./packages/examples/appPlayground.html">Example Page</a> |
78-
<a href="./packages/examples/react_appPlayground.html">React Example Page</a> ]
79-
<h3>TypeScript</h3>
80-
TypeScript Extension Host Worker: [ <a href="./packages/examples/tsExtHost.html">Example Page</a> ]
68+
<h3>Multi-Language Client</h3>
69+
Json & Python Language Clients App: [ <a href="./packages/examples/two_langauge_clients.html">Example Page</a> ] (Requires Json and
70+
Python Language Servers, see above)
71+
<h3>Application Playground</h3>
72+
Application Playground (incl. Open Collaboration Tools): [ <a href="./packages/examples/appPlayground.html">Example Page</a> |
73+
<a href="./packages/examples/react_appPlayground.html">React Example Page</a> ]
74+
<h3>TypeScript</h3>
75+
TypeScript Extension Host Worker: [ <a href="./packages/examples/tsExtHost.html">Example Page</a> ]
8176

82-
<h2>Tools & Framework Verification Examples</h2>
83-
<h3>Vite</h3>
84-
Beforehand, start: <b><code>cd verify/vite && npm run verify</code></b
85-
><br />
86-
JSON example (vite build): [ <a href="http://localhost:8081">Example Page</a> ]
87-
<h3>Webpack</h3>
88-
Beforehand, start: <b><code>cd verify/webpack && npm run verify</code></b
89-
><br />
90-
JSON example (webpack build): [ <a href="http://localhost:8082">Example Page</a> ]
91-
<h3>Next.js</h3>
92-
Beforehand, start: <b><code>cd verify/next && npm run verify</code></b
93-
><br />
94-
Langium DSL example (Next.js Dev Server): [ <a href="http://localhost:8083">Example Page</a> ]
95-
<h3>Angular</h3>
96-
Beforehand, start: <b><code>cd verify/angular && npm run verify</code></b
97-
><br />
98-
JSON example (Angular/vite build): [ <a href="http://localhost:8084">Example Page</a> ]
99-
</div>
100-
</body>
77+
<h2>Tools & Framework Verification Examples</h2>
78+
<h3>Vite</h3>
79+
Beforehand, start: <b><code>cd verify/vite && npm run verify</code></b
80+
><br />
81+
JSON example (vite build): [ <a href="http://localhost:8081">Example Page</a> ]
82+
<h3>Webpack</h3>
83+
Beforehand, start: <b><code>cd verify/webpack && npm run verify</code></b
84+
><br />
85+
JSON example (webpack build): [ <a href="http://localhost:8082">Example Page</a> ]
86+
<h3>Next.js</h3>
87+
Beforehand, start: <b><code>cd verify/next && npm run verify</code></b
88+
><br />
89+
Langium DSL example (Next.js Dev Server): [ <a href="http://localhost:8083">Example Page</a> ]
90+
<h3>Angular</h3>
91+
Beforehand, start: <b><code>cd verify/angular && npm run verify</code></b
92+
><br />
93+
JSON example (Angular/vite build): [ <a href="http://localhost:8084">Example Page</a> ]
94+
</div>
95+
</body>
10196
</html>

packages/client/src/common/commonTypes.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,60 @@
66
import type { BaseLanguageClient } from 'vscode-languageclient/browser.js';
77

88
export type ConnectionConfigOptions =
9-
| WebSocketConfigOptionsDirect
10-
| WebSocketConfigOptionsParams
11-
| WebSocketConfigOptionsUrl
12-
| WorkerConfigOptionsParams
13-
| WorkerConfigOptionsDirect;
9+
| WebSocketConfigOptionsDirect
10+
| WebSocketConfigOptionsParams
11+
| WebSocketConfigOptionsUrl
12+
| WorkerConfigOptionsParams
13+
| WorkerConfigOptionsDirect;
1414

1515
export interface WebSocketCallOptions {
16-
/** Adds handle on languageClient */
17-
onCall: (languageClient?: BaseLanguageClient) => void;
18-
/** Reports Status Of Language Client */
19-
reportStatus?: boolean;
16+
/** Adds handle on languageClient */
17+
onCall: (languageClient?: BaseLanguageClient) => void;
18+
/** Reports Status Of Language Client */
19+
reportStatus?: boolean;
2020
}
2121

2222
export interface WebSocketConfigOptionsDirect {
23-
$type: 'WebSocketDirect';
24-
webSocket: WebSocket;
25-
startOptions?: WebSocketCallOptions;
26-
stopOptions?: WebSocketCallOptions;
23+
$type: 'WebSocketDirect';
24+
webSocket: WebSocket;
25+
startOptions?: WebSocketCallOptions;
26+
stopOptions?: WebSocketCallOptions;
2727
}
2828

2929
export interface WebSocketUrlParams {
30-
secured: boolean;
31-
host: string;
32-
port?: number;
33-
path?: string;
34-
extraParams?: Record<string, string | number | Array<string | number>>;
30+
secured: boolean;
31+
host: string;
32+
port?: number;
33+
path?: string;
34+
extraParams?: Record<string, string | number | Array<string | number>>;
3535
}
3636

3737
export interface WebSocketConfigOptionsParams extends WebSocketUrlParams {
38-
$type: 'WebSocketParams';
39-
startOptions?: WebSocketCallOptions;
40-
stopOptions?: WebSocketCallOptions;
38+
$type: 'WebSocketParams';
39+
startOptions?: WebSocketCallOptions;
40+
stopOptions?: WebSocketCallOptions;
4141
}
4242

4343
export interface WebSocketUrlString {
44-
url: string;
44+
url: string;
4545
}
4646

4747
export interface WebSocketConfigOptionsUrl extends WebSocketUrlString {
48-
$type: 'WebSocketUrl';
49-
startOptions?: WebSocketCallOptions;
50-
stopOptions?: WebSocketCallOptions;
48+
$type: 'WebSocketUrl';
49+
startOptions?: WebSocketCallOptions;
50+
stopOptions?: WebSocketCallOptions;
5151
}
5252

5353
export interface WorkerConfigOptionsParams {
54-
$type: 'WorkerConfig';
55-
url: URL;
56-
type: 'classic' | 'module';
57-
messagePort?: MessagePort;
58-
workerName?: string;
54+
$type: 'WorkerConfig';
55+
url: URL;
56+
type: 'classic' | 'module';
57+
messagePort?: MessagePort;
58+
workerName?: string;
5959
}
6060

6161
export interface WorkerConfigOptionsDirect {
62-
$type: 'WorkerDirect';
63-
worker: Worker;
64-
messagePort?: MessagePort;
62+
$type: 'WorkerDirect';
63+
worker: Worker;
64+
messagePort?: MessagePort;
6565
}

0 commit comments

Comments
 (0)