Skip to content

Commit a5fd03a

Browse files
committed
Add vscode extension
1 parent 0da4f8e commit a5fd03a

10 files changed

+3640
-2
lines changed

.eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
"space-in-parens": "error",
109109
"space-infix-ops": "error",
110110
"space-unary-ops": "error",
111-
"strict": "error",
112111
"switch-colon-spacing": "error",
113112
"template-curly-spacing": "error",
114113
"template-tag-spacing": "error",

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
node_modules/
22
coverage/
3+
out/
4+
dist/
5+
.vscode/
36
scratch
47
TODO

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "JSON Schema Language Tools",
55
"type": "module",
66
"scripts": {
7-
"lint": "eslint language-server/src",
7+
"lint": "eslint language-server/src vscode/src",
88
"test": "vitest --watch=false",
99
"coverage": "vitest run --coverage"
1010
},

vscode/.vscodeignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules/
2+
src/
3+
dist/
4+
scratch/
5+
*.swp
6+
*.swo
7+
.vimrc
8+
.gitignore
9+
TODO

vscode/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Jason Desrosiers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

vscode/README.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Hyperjump - JSON Schema VSCode Extension
2+
3+
A VSCode extension for using the JSON Schema Language Server.
4+
5+
## Disable JSON Language Features
6+
7+
VSCode's built-in "JSON Language Features" extension includes JSON Schema
8+
functionality. That means you could end up getting the same messages twice (once
9+
from the built-in extension and once from this extension) or you might get
10+
incorrect or confusing messaging. For example, JSON Language Features will warn
11+
you against using 2020-12 because it doesn't support dynamic references, but
12+
this extension fully supports 2020-12 and you are encouraged to use it.
13+
14+
If you wish, you can disable the built-in extension. In the "Extensions" tool,
15+
search for `@builtin json language features`. This is the built-in extension
16+
that's causing the conflict. Click "Disable" to disable this extension.
17+
18+
If you do choose to disable the built-in extension, keep in mind that this
19+
extension is not yet a complete replacement and you may end up losing some
20+
functionality you're used to.
21+
22+
## Contributing
23+
24+
### Launch Extension
25+
26+
This is the launcher I use to launch the extension for development. Yours may
27+
vary slightly depending on your environment.
28+
29+
`.vscode/launch.json`
30+
```jsonc
31+
{
32+
// Use IntelliSense to learn about possible attributes.
33+
// Hover to view descriptions of existing attributes.
34+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
35+
"version": "0.2.0",
36+
"configurations": [
37+
{
38+
"args": [
39+
"--extensionDevelopmentPath=${workspaceFolder}/vscode"
40+
],
41+
"name": "Launch Extension",
42+
"outFiles": [
43+
"${workspaceFolder}/vscode/out/**/*.js"
44+
],
45+
"preLaunchTask": "npm: build - vscode",
46+
"request": "launch",
47+
"type": "extensionHost"
48+
}
49+
]
50+
}
51+
```
52+
53+
`.vscode/tasks.json`
54+
```json
55+
{
56+
"version": "2.0.0",
57+
"tasks": [
58+
{
59+
"type": "npm",
60+
"script": "build",
61+
"path": "vscode",
62+
"group": "build",
63+
"problemMatcher": [],
64+
"label": "npm: build - vscode",
65+
"detail": "npm run build-client -- --sourcemap && npm run build-server -- --sourcemap"
66+
}
67+
]
68+
}
69+
```

vscode/dist/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)