mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
Below an oxfmt configuration (.oxfmtrc.json/.jsonc, oxfmt.config.ts/.mts) Reformat Code runs oxfmt instead of Prettier, with the same external-formatter settings; oxfmt formats whole files, so a selection formats the file with a notice. oxlint --lsp serves JS/TS/React/Vue/Svelte files below an oxlint config. Both are managed npm tools; a missing oxfmt gets the same Install prompt and error handling as Prettier, and formatter messages are translated for either tool. Co-authored-by: d0whc3r <1378986+d0whc3r@users.noreply.github.com>
43 lines
1.3 KiB
TOML
43 lines
1.3 KiB
TOML
id = "typescriptreact"
|
|
name = "TypeScript JSX"
|
|
formatter = { tool = "prettier", parser = "typescript", range = true }
|
|
extensions = ["tsx"]
|
|
line-comment = "//"
|
|
block-comment = ["/*", "*/"]
|
|
indent = { tab-size = 2, insert-spaces = true }
|
|
ui-mode = "TSX"
|
|
tree-sitter = "tsx"
|
|
|
|
[[language-servers]]
|
|
name = "vtsls"
|
|
tsserver-project = true
|
|
command = "vtsls"
|
|
args = ["--stdio"]
|
|
root-markers = ["tsconfig.json", "jsconfig.json", "package.json"]
|
|
install-hint = "npm i -g @vtsls/language-server"
|
|
|
|
[[language-servers]]
|
|
name = "typescript-language-server"
|
|
tsserver-project = true
|
|
# Alternative: used only when the server above is not installed.
|
|
fallback = true
|
|
command = "typescript-language-server"
|
|
args = ["--stdio"]
|
|
root-markers = ["tsconfig.json", "jsconfig.json", "package.json"]
|
|
install-hint = "npm i -g typescript@6 typescript-language-server"
|
|
|
|
[[language-servers]]
|
|
name = "oxlint"
|
|
command = "oxlint"
|
|
args = ["--lsp"]
|
|
root-markers = [".oxlintrc.json", ".oxlintrc.jsonc", "oxlint.config.ts", "oxlint.config.mts"]
|
|
require-root-marker = true
|
|
install-hint = "npm i -D oxlint"
|
|
|
|
[debugger]
|
|
adapter = "js-debug"
|
|
command = "js-debug-adapter"
|
|
args = ["${port}", "127.0.0.1"]
|
|
transport = "tcp"
|
|
install-hint = "Install vscode-js-debug's DAP server (js-debug-dap-*.tar.gz from https://github.com/microsoft/vscode-js-debug/releases) as `js-debug-adapter`"
|