Skip to content

Commit 1c58e39

Browse files
committed
Initial commit (WIP)
0 parents  commit 1c58e39

30 files changed

+6697
-0
lines changed

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/**
2+
client/node_modules/**
3+
client/out/**
4+
server/node_modules/**
5+
server/out/**

.eslintrc.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**@type {import('eslint').Linter.Config} */
2+
// eslint-disable-next-line no-undef
3+
module.exports = {
4+
root: true,
5+
parser: '@typescript-eslint/parser',
6+
plugins: [
7+
'@typescript-eslint',
8+
],
9+
extends: [
10+
'eslint:recommended',
11+
'plugin:@typescript-eslint/recommended',
12+
],
13+
rules: {
14+
'semi': [2, "always"],
15+
'@typescript-eslint/no-unused-vars': 0,
16+
'@typescript-eslint/no-explicit-any': 0,
17+
'@typescript-eslint/explicit-module-boundary-types': 0,
18+
'@typescript-eslint/no-non-null-assertion': 0,
19+
}
20+
};

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out
2+
node_modules
3+
client/server
4+
.vscode-test
5+
*.vsix

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": [
7+
]
8+
}

.vscode/launch.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
{
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"name": "Launch Client",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11+
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
12+
"preLaunchTask": {
13+
"type": "npm",
14+
"script": "watch"
15+
}
16+
},
17+
{
18+
"type": "node",
19+
"request": "attach",
20+
"name": "Attach to Server",
21+
"port": 6009,
22+
"restart": true,
23+
"outFiles": ["${workspaceRoot}/server/out/**/*.js"]
24+
},
25+
{
26+
"name": "Language Server E2E Test",
27+
"type": "extensionHost",
28+
"request": "launch",
29+
"runtimeExecutable": "${execPath}",
30+
"args": [
31+
"--extensionDevelopmentPath=${workspaceRoot}",
32+
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
33+
"${workspaceRoot}/client/testFixture"
34+
],
35+
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
36+
}
37+
],
38+
"compounds": [
39+
{
40+
"name": "Client + Server",
41+
"configurations": ["Launch Client", "Attach to Server"]
42+
}
43+
]
44+
}

.vscode/settings.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"editor.insertSpaces": false,
3+
"tslint.enable": true,
4+
"typescript.tsc.autoDetect": "off",
5+
"typescript.preferences.quoteStyle": "single",
6+
"editor.codeActionsOnSave": {
7+
"source.fixAll.eslint": true
8+
}
9+
}

.vscode/tasks.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "compile",
7+
"group": "build",
8+
"presentation": {
9+
"panel": "dedicated",
10+
"reveal": "never"
11+
},
12+
"problemMatcher": [
13+
"$tsc"
14+
]
15+
},
16+
{
17+
"type": "npm",
18+
"script": "watch",
19+
"isBackground": true,
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
},
24+
"presentation": {
25+
"panel": "dedicated",
26+
"reveal": "never"
27+
},
28+
"problemMatcher": [
29+
"$tsc-watch"
30+
]
31+
}
32+
]
33+
}

.vscodeignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.vscode/**
2+
**/*.ts
3+
**/*.map
4+
.gitignore
5+
**/tsconfig.json
6+
**/tsconfig.base.json
7+
contributing.md
8+
.travis.yml
9+
client/node_modules/**
10+
!client/node_modules/vscode-jsonrpc/**
11+
!client/node_modules/vscode-languageclient/**
12+
!client/node_modules/vscode-languageserver-protocol/**
13+
!client/node_modules/vscode-languageserver-types/**
14+
!client/node_modules/semver/**

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# WIDL VS Code extension
2+
3+
Preview for editing waPC Interface Defintion Language (WIDL) documents inside VS Code.
4+
5+
## Functionality
6+
7+
This Language Server works for plain text file. It has the following language features:
8+
- Completions
9+
- Diagnostics regenerated on each file change or configuration change
10+
11+
## Running the Project
12+
13+
- Run `npm install` in this folder. This installs all necessary npm modules in both the client and server folder
14+
- Open VS Code on this folder.
15+
- Press Ctrl+Shift+B to compile the client and server.
16+
- Switch to the Debug viewlet.
17+
- Select `Launch Client` from the drop down.
18+
- Run the launch config.
19+
- If you want to debug the server as well use the launch configuration `Attach to Server`
20+
- In the [Extension Development Host] instance of VSCode, open a document in 'WIDL' language mode.
21+
22+
## Packaging & Installing
23+
24+
- Run `vsce package` to generate `widl-vscode-extension-{semver}.vsix`.
25+
- Install the `.vsix` file in VS Code using the `Install from VSIX...` option under the `Extensions` view (three dots dropdown).
26+
- Currently, `vsce` is not including the modules it should in `node_modules`. In a terminal, go to `~/.vscode/extensions/wapc.widl-vscode-extension-{semver}}` and run `npm install`. Then restart VS Code and the language server should start successfully. We are working to resolve this.

assets/images/logo.png

11.4 KB
Loading

0 commit comments

Comments
 (0)