дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
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.
Цей коміт міститься в:
1 джерело
4906bcb2a1
коміт
a0dfb1e741
5 files changed
+51
No files matched your search
@@ -17,6 +17,13 @@ args = ["--stdio"]
|
||||
root-markers = ["jsconfig.json", "tsconfig.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 = "typescript-language-server"
|
||||
tsserver-project = true
|
||||
@@ -27,6 +34,10 @@ args = ["--stdio"]
|
||||
root-markers = ["jsconfig.json", "tsconfig.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"
|
||||
|
||||
@@ -16,6 +16,13 @@ args = ["--stdio"]
|
||||
root-markers = ["jsconfig.json", "tsconfig.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 = "typescript-language-server"
|
||||
tsserver-project = true
|
||||
@@ -26,6 +33,10 @@ args = ["--stdio"]
|
||||
root-markers = ["jsconfig.json", "tsconfig.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"
|
||||
|
||||
@@ -16,6 +16,13 @@ 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 = "typescript-language-server"
|
||||
tsserver-project = true
|
||||
@@ -26,6 +33,10 @@ 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
|
||||
|
||||
# Angular projects only: templates inline in components (`template: ...`),
|
||||
# and their usages and renames in templates. Last: TypeScript's own hover,
|
||||
# definition and symbols come first.
|
||||
|
||||
@@ -16,6 +16,13 @@ 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 = "typescript-language-server"
|
||||
tsserver-project = true
|
||||
@@ -26,6 +33,10 @@ 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"
|
||||
|
||||
@@ -23,6 +23,13 @@ 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"
|
||||
|
||||
Reference in new issue
Заблокувати користувача