You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-14Lines changed: 27 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,28 @@
1
-
Codemirror extensions that add on `@codemirror/lang-json`'s and `codemirror-json5`'s grammars to add JSONSchema support!
1
+
Codemirror 6 extensions that provide full [JSON Schema](https://json-schema.org/) support for `@codemirror/lang-json` & `codemirror-json5` language modes
You can start with the [deployed example](https://github.com/acao/cm6-json-schema/blob/main/dev/index.ts) to see a more comprehensive setup.
119
130
@@ -123,20 +134,22 @@ For more information, see the [API Docs](./docs/)
123
134
124
135
## Current Constraints:
125
136
126
-
- only linting & hover is available for `oneOf`, `anyOf`, `allOf` and other [schema combination methods](https://json-schema.org/understanding-json-schema/reference/combining.html)
127
137
- it only works with one json schema instance at a time, and doesn't yet fetch remote schemas. schema service coming soon!
128
138
- currently only tested with standard schemas using json4 spec. results may vary
129
-
- doesn't provide insert text on completion yet
130
-
- currently you can override the rendering of a hover. we plan to add the same for validation errors and autocomplete
139
+
- doesn't place cursor inside known insert text yet
140
+
- currently you can only override the texts and rendering of a hover. we plan to add the same for validation errors and autocomplete
141
+
- json5 properties on autocompletion selection will insert surrounding double quotes, but we plan to make it insert without delimiters
131
142
132
143
## Inspiration
133
144
134
-
`monaco-json` and `monaco-yaml` both provide these features, and I want the nascent codemirror 6 to have them as well!
145
+
`monaco-json` and `monaco-yaml` both provide json schema features for json, cson and yaml, and we want the nascent codemirror 6 to have them as well!
135
146
136
-
also, json5 is slowly growing in usage, and it needs full language support!
147
+
Also, json5 is slowly growing in usage, and it needs full language support for the browser!
137
148
138
149
## Our Goals
139
150
140
151
- working GeoJSON spec linter & completion
141
152
- working variables json mode for `cm6-graphql`, ala `monaco-graphql`
153
+
- json5 support for `graphiql` as a plugin!
154
+
- perhaps use @lezer to make a json5 language service for monaco-editor + json5?
0 commit comments