mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 08:52:12 +00:00
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.
40 lines
1.4 KiB
TOML
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"
|