Files
openidea/languages/vue.toml
l0ng-ai a0dfb1e741 fix(lsp): rename TypeScript symbols everywhere instead of aliasing the import (#1302)
Renaming an imported function at a call site renamed only the local binding,
leaving `import { formatMoney as formatPrice }` and the declaration as it
was: both TypeScript servers default to aliases on rename. vtsls gets
`typescript.preferences.useAliasesForRenames = false` (and the JavaScript
one), typescript-language-server `providePrefixAndSuffixTextForRename = false`,
in every language that starts them.
2026-11-04 23:32:58 +08:00

40 lines
1.4 KiB
TOML

id = "vue"
name = "Vue"
formatter = { tool = "prettier", parser = "vue", range = true }
extensions = ["vue"]
block-comment = ["<!--", "-->"]
indent = { tab-size = 2, insert-spaces = true }
ui-mode = "Vue"
[[language-servers]]
name = "vue-language-server"
command = "vue-language-server"
args = ["--stdio"]
root-markers = ["package.json", "vite.config.ts", "vite.config.js", "nuxt.config.ts", "tsconfig.json"]
install-hint = "npm i -g @vue/language-server typescript@6"
# Hybrid mode: TypeScript in `.vue` files comes from tsserver with
# `@vue/typescript-plugin` (configured by the settings hook); vue-language-server
# reaches it through `tsserver/request`, which the client forwards to vtsls.
[[language-servers]]
name = "vtsls"
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
[[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"