дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
fix(plugins): refuse indexed-only renames of code identifiers the language server can't rename (#2205)
When no language server answers a rename (none running, or no rename support) and the indexed anchor under the caret is a code identifier, prepare and rename now refuse instead of renaming only the plugin's anchors, which left the declaration, imports and file name behind. Anchors in strings, comments, attribute values or files without a grammar keep their indexed rename. Closes #2204
Цей коміт міститься в:
1 джерело
fd82beb309
коміт
02ff61e6a7
3 files changed
+233
-1
No files matched your search
@@ -84,6 +84,12 @@ its indexed anchors from being renamed. Failed reference or name-preparation
|
||||
queries show an incomplete-search warning. A server that owns the same name
|
||||
keeps its rename validation; a rejected native rename changes nothing.
|
||||
|
||||
When no language server can rename there (none is running, or it has no rename
|
||||
support), an anchor on a code identifier, per the file's syntax tree, is not
|
||||
renamed: the anchors would miss the declaration, imports and file name its
|
||||
language owns. Anchors in strings, comments or attribute values, and in files
|
||||
without a syntax grammar, are still renamed from the index alone.
|
||||
|
||||
These features consume the existing graph; no references or rename export is
|
||||
needed. Unindexed names continue through the normal language-server path.
|
||||
|
||||
|
||||
Reference in new issue
Заблокувати користувача