mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
vscode-json-language-server validates nothing unless json.validate.enable is set, so even a file's own $schema was ignored. JSON and JSONC now enable validation and map package.json, tsconfig/jsconfig, ESLint, Prettier, Babel, Lerna, Turborepo, SWC and Composer configs to their published schemas.
61 lines
2.1 KiB
TOML
61 lines
2.1 KiB
TOML
id = "json"
|
|
name = "JSON"
|
|
formatter = { tool = "prettier", parser = "json", range = true }
|
|
extensions = ["json", "geojson", "topojson", "webmanifest", "har", "avsc", "jsonl", "ndjson", "json.map"]
|
|
filenames = [".prettierrc", ".watchmanconfig", "composer.lock", ".arcconfig"]
|
|
indent = { tab-size = 2, insert-spaces = true }
|
|
ui-mode = "JSON"
|
|
tree-sitter = "json"
|
|
|
|
[[language-servers]]
|
|
name = "vscode-json-language-server"
|
|
command = "vscode-json-language-server"
|
|
args = ["--stdio"]
|
|
initialization-options = { provideFormatter = true }
|
|
install-hint = "npm i -g vscode-langservers-extracted"
|
|
|
|
# Validation is off in vscode-json-language-server unless enabled. Schemas from SchemaStore for
|
|
# common configuration files; a `$schema` in the file itself still wins.
|
|
[language-servers.settings.json.validate]
|
|
enable = true
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = ["package.json"]
|
|
url = "https://json.schemastore.org/package.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = ["tsconfig.json", "tsconfig.*.json"]
|
|
url = "https://json.schemastore.org/tsconfig.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = ["jsconfig.json", "jsconfig.*.json"]
|
|
url = "https://json.schemastore.org/jsconfig.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = [".eslintrc", ".eslintrc.json"]
|
|
url = "https://json.schemastore.org/eslintrc.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = [".prettierrc", ".prettierrc.json"]
|
|
url = "https://json.schemastore.org/prettierrc.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = [".babelrc", ".babelrc.json", "babel.config.json"]
|
|
url = "https://json.schemastore.org/babelrc.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = ["lerna.json"]
|
|
url = "https://json.schemastore.org/lerna.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = ["turbo.json"]
|
|
url = "https://turbo.build/schema.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = [".swcrc"]
|
|
url = "https://swc.rs/schema.json"
|
|
|
|
[[language-servers.settings.json.schemas]]
|
|
fileMatch = ["composer.json"]
|
|
url = "https://getcomposer.org/schema.json"
|