mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
Run code cleanup applied one source.fixAll action, so in TypeScript files vtsls's won and ESLint's was dropped; fix-all now runs once per server that offers it, each asked again after the previous edit. ESLint rejected every fix-all request because the built-in settings lacked codeActionOnSave; all language files attaching eslint now send { mode = "all", rules = [] }. Failed save actions are logged.
Fixes #2927
Fixes #2928
86 lines
3.2 KiB
TOML
86 lines
3.2 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"
|
||
|
||
# Rename renames the symbol everywhere: no `import { a as b }` alias in the file renamed from.
|
||
[language-servers.initialization-options.typescript.preferences]
|
||
useAliasesForRenames = false
|
||
|
||
[language-servers.initialization-options.javascript.preferences]
|
||
useAliasesForRenames = false
|
||
|
||
# Moving a file: the IDE asks for the import updates up front (preview, undo); the server
|
||
# doesn't prompt after the move.
|
||
[language-servers.initialization-options.typescript.updateImportsOnFileMove]
|
||
enabled = "never"
|
||
|
||
[language-servers.initialization-options.javascript.updateImportsOnFileMove]
|
||
enabled = "never"
|
||
|
||
[[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"
|
||
|
||
# Rename renames the symbol everywhere: no `import { a as b }` alias in the file renamed from.
|
||
[language-servers.initialization-options.preferences]
|
||
providePrefixAndSuffixTextForRename = false
|
||
|
||
[[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"
|
||
|
||
# ESLint: only below a project's ESLint configuration; the server runs the project's own eslint.
|
||
[[language-servers]]
|
||
name = "eslint"
|
||
command = "vscode-eslint-language-server"
|
||
args = ["--stdio"]
|
||
root-markers = ["eslint.config.js", "eslint.config.mjs", "eslint.config.cjs", "eslint.config.ts", "eslint.config.mts", "eslint.config.cts", ".eslintrc", ".eslintrc.js", ".eslintrc.cjs", ".eslintrc.json", ".eslintrc.yml", ".eslintrc.yaml", "package.json#eslintConfig"]
|
||
require-root-marker = true
|
||
install-hint = "npm i -g vscode-langservers-extracted"
|
||
|
||
[language-servers.settings]
|
||
# Read by every request (`experimental.useFlatConfig`); ESLint picks flat or legacy config itself.
|
||
experimental = {}
|
||
validate = "on"
|
||
run = "onType"
|
||
quiet = false
|
||
onIgnoredFiles = "off"
|
||
rulesCustomizations = []
|
||
nodePath = ""
|
||
problems = { shortenToSingleLine = false }
|
||
workingDirectory = { mode = "auto" }
|
||
codeAction = { disableRuleComment = { enable = true, location = "separateLine" }, showDocumentation = { enable = true } }
|
||
# vscode-eslint reads it for every source.fixAll request (Actions on Save, Code Cleanup).
|
||
codeActionOnSave = { mode = "all", rules = [] }
|
||
|
||
[debugger]
|
||
adapter = "js-debug"
|
||
command = "js-debug-adapter"
|
||
args = ["${port}", "127.0.0.1"]
|
||
transport = "tcp"
|
||
install-hint = "Install JavaScript Debugger (vscode-js-debug) in Settings › Languages & Frameworks › Language Servers"
|