mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
vtsls has no workspace/willRenameFiles: after didRenameFiles it updates imports itself, behind a prompt sent as window/showMessageRequest. The IDE shows that request as a message without choices, so moving a TypeScript or JavaScript file never updated the imports of the files that use it. For a tsserver-backed server without willRename filters, the IDE now asks tsserver for the edits up front (getEditsForFileRename through typescript.tsserverRequest). The edits join the move's preview and undo like any server's. The server's own update is turned off (updateImportsOnFileMove.enabled = "never"), so it no longer prompts.
48 lines
1.7 KiB
TOML
48 lines
1.7 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
|
|
|
|
# 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 = "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"
|