mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
Adds Biome as a language server (lint diagnostics and code actions) and as a formatter for CSS, GraphQL, JavaScript, TypeScript (and JSX), JSON and JSONC, with a Languages & Frameworks > Biome settings page (path, provider, run on save, enabled languages). Biome formats instead of Prettier and oxfmt below a biome.json / biome.jsonc or a Biome installation, unless the nearest configuration sets formatter.enabled to false, in which case Prettier keeps formatting. Resolved conflicts with the Tailwind CSS language server: both servers are listed in the language definitions, registry tests and docs. Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com>
74 lines
2.8 KiB
TOML
74 lines
2.8 KiB
TOML
id = "jsonc"
|
||
name = "JSON with Comments"
|
||
formatter = { tool = "prettier", parser = "jsonc", range = true }
|
||
extensions = ["jsonc", "code-workspace", "code-snippets"]
|
||
filenames = ["tsconfig.json", "jsconfig.json", "tsconfig.*.json", "jsconfig.*.json", ".eslintrc", ".eslintrc.json", ".jshintrc", ".babelrc", ".swcrc", "devcontainer.json", ".devcontainer.json", "launch.json", "tasks.json", "settings.json", "extensions.json", "keybindings.json", "tslint.json", "api-extractor.json", "typedoc.json", "deno.json", "biome.json", "turbo.json", "language-configuration.json"]
|
||
line-comment = "//"
|
||
block-comment = ["/*", "*/"]
|
||
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"
|
||
|
||
# Biome: lint diagnostics, quick fixes and fix-all below a Biome configuration or installation,
|
||
# from the project's own biome. Formatting is Reformat Code's (Settings › Biome).
|
||
[[language-servers]]
|
||
name = "biome"
|
||
command = "biome"
|
||
args = ["lsp-proxy"]
|
||
root-markers = ["biome.json", "biome.jsonc", "node_modules/@biomejs/biome"]
|
||
require-root-marker = true
|
||
features = ["code-action", "diagnostics"]
|
||
install-hint = "npm i -D @biomejs/biome"
|