Графік комітів
916 Коміти
Автор SHA1 Повідомлення Дата
ntbang0901 838cf14845 fix(editor): run IDE editor actions in previews and diff panes instead of CodeMirror's own bindings (#8202)
In the TODO and Find in Files previews (also Search Everywhere, Bookmarks and Show Usages) and on a diff's editable side, shortcuts of editor actions fell through to CodeMirror's defaultKeymap: with the macOS IntelliJ keymap, Option+Up (Extend Selection) moved the line and changed the file, Option+Shift+Up copied it, and Cmd+D ran Show Diff in the TODO preview; on Windows/Linux Alt+Up/Down moved lines.

Previews now publish embeddedEditorFocus while focused, so text actions that need only the view run on them as in a diff pane, and Show Diff no longer takes Cmd+D there. Previews and diff panes use the editor's base keymap, and embeddedEditorKeys drops CodeMirror's own edit for any key the IDE keymap gives to an editor action (history keys included), so where that action needs the file editor the key does nothing. The Find preview's ad-hoc key claim is replaced by the same rule.

Co-authored-by: ntbang0901 <[email protected]>
2026-12-05 18:11:45 +08:00
ntbang0901 df77c18117 fix(editor): re-detect the line separator and read-only state when a file is reloaded from disk (#8186)
Load Changes from Disk and File > Reload from Disk replaced the text but kept the buffer's old line separator, so after another program rewrote a CRLF file as LF the next save converted every line back; only the watcher's reload re-detected it. The read-only state was read once on open, so a file made read-only outside the IDE still accepted edits and autosave wrote it.

The watcher reload, Load Changes from Disk and Reload with Encoding now share take_disk_text, which takes the separator found in the new text (.editorconfig's when set; text without a line break keeps the buffer's) and the file's write permission. The watcher and focus check also follow a permission-only change, and a new IdeEvent::DocReadOnly updates the status bar lock, the read-only banner and the editor (library sources stay read-only).

Co-authored-by: ntbang0901 <[email protected]>
2026-12-05 17:34:13 +08:00
ntbang0901 360c6f1ae1 fix(editor): draw file text in every view with the editor's font and tab size (#8192)
The TODO preview, Problems preview, notebook cells, HTTP response bodies and database text views drew file text in JetBrains Mono 13 px whatever Settings › Editor › Font said, and the Find in Files, Search Everywhere and Bookmarks previews kept the font they were opened with: each CodeMirror view set the editor font on itself, so a view that built its own editor or plain text never got it. The family, size and line height are now set on the root next to the weights, editor themes take ligatures from the root's switch, and those views read them, so all of them follow the setting and its changes. Previews and diff panes draw tabs at the file's tab size (its open document's, else its Code Style) instead of a fixed 4 or 8. In Tools › Terminal, "Use editor font" also disables Size, and disabled font fields show the font actually in use (likewise Agents › Chat's "Use interface font").

Closes #8168

Co-authored-by: ntbang0901 <[email protected]>
2026-12-05 17:26:39 +08:00
ntbang0901 258639c372 fix(editor): keep code valid when joining a line after a comment or moving a JSON entry (#8187)
Join Lines on a line ending in a `//`, `#` or `--` comment turned the next line's code into comment text. Like IntelliJ's JoinLinesHandler, a line comment that code would follow now becomes a block comment (`int a = 1; /* first */ int b = 2;`); where the language has no usable block comment there (Python, Ruby, Lua), the comment moves to the end of the joined line.

Move Statement Up/Down in JSON swapped whole lines with their commas, leaving a missing or trailing comma. Moved members and array elements now take the commas of their new places, also when moving into or out of a nested object or array, and nothing moves out of the top-level value.

Co-authored-by: ntbang0901 <[email protected]>
2026-12-05 17:22:04 +08:00
arookieofc-ai[bot]таarookieofc-ai eecd78aee5 fix(markdown): keep cross-file link destination focused (#8194)
#8172 recorded a cross-file Markdown preview link's origin by moving the source editor's caret before opening the destination. In Split mode that selection pulled focus back into the source editor while the open was still in progress, so the new destination tab was deactivated at once. In Split mode the clicked line is now recorded in navigation history directly, without touching the caret; Preview Only keeps using the hidden editor's caret, which is the reader's position.

Co-authored-by: arookieofc-ai <[email protected]>
2026-12-05 17:19:25 +08:00
arookieofc-ai[bot]таarookieofc-ai b8d0d12142 fix(ci): repair remaining frontend and e2e failures (#8181)
Main's Frontend and E2E jobs failed on stale expectations and one costly selector. The Visual Studio and ReSharper keymap presets (#8106) intentionally bind the caret-selection actions and, on Windows, use Ctrl+Alt+Click to add carets, but the tests still expected every preset to keep the old defaults. `github.issue.refresh` now has a shortcut (#8147), so the menu item's accessible name includes it. `.bannerStack > * + *` (#8167) restyles sibling subtrees on insertion and trips the selector-cost test; `:not(:first-child)` selects the same rows.

Co-authored-by: arookieofc-ai <[email protected]>
2026-12-05 15:57:31 +08:00
Deng Liuтаdengliu 8a301dad86 feat(markdown): record preview clicks in navigation history for Back/Forward (#8172)
Back/Forward now walk through positions in Markdown previews. In Preview Only mode a click records the clicked source line (the preview keeps its scroll) and Back/Forward scroll to the remembered line with a short highlight (none under reduced motion). Same-file #anchor links record their origin and destination in both Preview Only and Split mode; a link to another file records the link line first. In Split mode a plain click in the preview leaves the source editor's caret alone. A clicked position is no longer overwritten by the passive shown-line update, and the Live MDX preview forwards the Back/Forward shortcuts from its iframe.

Co-authored-by: dengliu <[email protected]>
2026-12-05 14:16:46 +08:00
LU XIANGRUIтаwildcatDownstairs 9d5c294218 fix(lsp): send the UI locale in initialize; optional diagnostic source line on hover (#8163)
Language servers always received "locale": "en" in initialize. The UI locale (appearance.locale, mapped to a BCP 47 tag such as zh-CN) is now sent, and running servers restart when it changes, so servers with localized messages follow the UI language.

Adds Settings > Editor > Code Editing > Error Highlighting > "Show diagnostic source and code on hover" (on by default) to hide the source/code line under each problem in editor tooltips; the Problems tool window still shows it.

Closes #8156

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-05 13:37:32 +08:00
waht41 6b94744df3 fix(editor): keep focus put when clicking find arrows; Ctrl/Cmd+Enter focuses the editor (#8157)
Clicking Previous/Next Occurrence in the editor's Find bar moved keyboard focus onto the button, so Ctrl+V did nothing afterwards. The arrow buttons no longer take focus: focus stays in the search field or the editor, whichever had it. Ctrl/Cmd+Enter in the search field now moves focus to the editor with the current match selected (or closes the bar when the query is empty), so a paste replaces that match and the arrows or F3 continue from there.

Refs #8139

Co-authored-by: waht41 <[email protected]>
2026-12-05 13:37:00 +08:00
l0ng-ai c55ee61b71 feat(java): integrate java-analyzer sourceOrigin and attachSources (#8146)
* feat(java): integrate java-analyzer sourceOrigin and attachSources

* fix(java): address sourceOrigin/attachSources review findings
2026-12-05 11:48:35 +08:00
Akbar Husainтаl0ng-ai 853a0304e1 feat(java): use java-analyzer's hierarchy refactor requests (#8120)
* feat(java): use java-analyzer's hierarchy refactor requests

* fix(java): handle null hierarchy refactor answer, prefer first target, and test jdtls fallback

---------

Co-authored-by: l0ng-ai <[email protected]>
2026-12-05 09:12:24 +08:00
Akbar Husainтаl0ng-ai 4fe11aacbd feat(java): use java-analyzer's change signature requests (#8102)
* feat(java): use java-analyzer's change signature requests

* fix(java): handle null changeSignature result, default delegateSupported, and add fallback test

---------

Co-authored-by: l0ng-ai <[email protected]>
2026-12-05 09:09:32 +08:00
l0ng-ai f75b1c0a04 feat(java): copy string concatenation text to the clipboard (#8100)
A Java intention copies the text a string concatenation at the caret builds, with ? for each operand that isn't a literal and a line break where the operands continue on a new line; on a lone string literal or text block it copies the literal's value (escapes interpreted, text block indentation removed). It reads the syntax tree, so it is offered before jdtls is ready.
2026-12-05 01:24:05 +08:00
Akbar Husainтаl0ng-ai 0f0e3e73e7 feat(java): use java-analyzer's extract interface requests (#7987)
* feat(java): use java-analyzer's extract interface requests

* feat(java): match the merged extract interface protocol

* fix(java): handle null extractInterfaceInfo, keep source className, and add protocol tests

---------

Co-authored-by: l0ng-ai <[email protected]>
2026-12-05 00:33:19 +08:00
l0ng-ai 494d1a9bf5 fix(plugins): keep plugin gutter actions and markers coming while navigation indexes (#8087)
Plugin language visuals, plugin colours, server code lenses and plugin line markers restarted a 300-400 ms debounce on every trigger and threw away the request in flight. While a project indexes, plugin navigation notifies about every 250 ms, so the request was never sent or its answer was always dropped: a new editor never got its gutter actions. A shared CoalescedRefresh now runs at the latest after a maximum wait and only drops a result older than one already shown.

Fixes #8056
2026-12-05 00:25:58 +08:00
Markus Hofmann 94653b487d fix(editor): align filled indent steps and keep them under the selection (#8038)
With Fill indent levels on, each stripe started two pixels left of the
indent step it marks: the offset that keeps a 1px guide off the glyph
edge was applied to the step-wide stripes too, so a stripe ended short
of the code and the first one ran into the line's left padding.

The stripes were also painted on the guide layer above the text, which
is right for a thin line but tints a selection and the caret row across
the indentation. As a row background they belong below the selection
layer, where the theme comment already says they are.
2026-12-05 00:03:26 +08:00
l0ng-ai 406cf4e474 fix(debugger): keep the editor still while stepping when the execution line is on screen (#8076)
Each stop selected the top frame through openFile with a selection, which always scrolled the line to the centre of the editor, so stepping through visible code moved the text on every step. OpenOptions gains scroll: "visible" (leave an on-screen selection where it is, centre an off-screen one); the debugger uses it for the top frame on each stop and for Show Execution Point. Selecting another frame and Jump to Source still centre the line.

Fixes #7963
2026-12-04 23:39:41 +08:00
Vadim LazukтаInf1mum 55c9787996 feat(color-scheme): C# interface, enum, struct, type parameter and predefined type colours (#8063)
csharp-ls sends interface, enum, struct and typeParameter as their own semantic token types, but the generic mapping folded them all into the class-name colour, and predefined types (int, string, bool…) also showed in the class colour. The C# Colour Scheme page gains Interface name, Enum name, Struct name and Type parameter (inheriting Class name) and Predefined type (inheriting Keyword); a new C# semantic module tags the tokens, recognising predefined types by their text. The preview shows each new attribute.

Co-authored-by: Inf1mum <[email protected]>
2026-12-04 23:33:19 +08:00
Vadim LazukтаInf1mum 54ce7ac6f8 fix(editor): re-ask semantic tokens when a server settles after a slow project load (#8060)
A file opened while csharp-ls was still loading the solution never got semantic colours: its only semantic tokens request timed out (a protocol error the plugin ignores), and csharp-ls sends no workspace/semanticTokens/refresh when the load ends. The semantic plugin now also re-requests when a server's long busy spell settles, the recovery signal inlay hints and code lens already use. Server-initiated refreshes and the unavailable backoff are unchanged.

Closes #8052

Co-authored-by: Inf1mum <[email protected]>
2026-12-04 23:02:47 +08:00
LU XIANGRUIтаwildcatDownstairs 059dca5b34 fix(editor): isolate ParseContext skipped ranges across state updates (#8035)
ParseContext.changes() in @codemirror/language handed the parent context's skipped array to the child whenever there was nothing to remap, so a speculative state.update() (paste reindent, Shift+Enter, Move Line, Complete Statement) let StreamLanguage's skipUntilInView push a range past the live document's end into the live state's array. Applying the real transaction then threw RangeError in ChangeSet.mapPos and broke the editor for .properties and other StreamLanguage files longer than the viewport. The patch gives every child context its own skipped array.

Closes #7989

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-04 21:51:46 +08:00
Vadim LazukтаInf1mum a6e9c79c96 feat(editor): fill indent levels under rainbow indent guides (opt-in) (#8018)
Adds Editor > General > Appearance > Rainbow indent guides > Fill indent levels (off by default). With it on, each indent level's whitespace is tinted in its rainbow colour at low strength, including code lens rows and blank lines; the caret's and matched-brace levels are highlighted the same way. The setting is declared in the backend settings schema so it can be saved.

Closes #7883

Co-authored-by: Inf1mum <[email protected]>
2026-12-04 21:25:24 +08:00
l0ng-ai f2b602a48e fix(editor): keep the current find match readable, show more Search Everywhere results (#8007)
Find selects the current match, and the selection is repainted inside the match's own mark. The selected text kept the match's foreground, meant for the yellow match fill, so on a dark theme the current match was dark text on the blue selection. Selected text inside a find match now takes the scheme's selection foreground, or the editor's when the scheme sets none.

The All tab of Search Everywhere showed 6 results per group before "more"; it now shows 15, as many as each "more" adds.

Fixes #7972
2026-12-04 17:39:59 +08:00
Mollo-i 25d0294947 fix(editor): keep the caret in place on screen when reformatting (#7971)
Reformat applied its edits with scrollIntoView: false and CodeMirror kept scrollTop, so when the formatter added or removed lines above the caret, the caret slid up or down on screen. The edit now measures the caret's viewport row before the transaction and compensates scrollTop after it, falling back to the caret's line block when its row is no longer drawn. Explicit Reformat Code, format on save and the external formatters all go through this path.

Co-authored-by: Greenker <[email protected]>
2026-12-04 16:39:05 +08:00
Ivan 5d26e44c0e fix(diff): navigate from the working-copy pane with the keyboard (#7961)
Go to Implementation(s), Go to Declaration or Usages, Go to Type Declaration and Super Method required an active text editor tab, so they did nothing while a diff had focus. They now run on the focused diff pane when it shows a file's document; revision panes have no document and keep them disabled. Option+Command-click focuses the clicked pane before checking whether the action is enabled.

Closes #7960

Co-authored-by: Pecnikas <[email protected]>
2026-12-04 16:29:18 +08:00
l0ng-ai ed57059cad fix(editor): parameter info for a nested call whose arguments start on the next line (#7943)
Right after the `(` of a call followed by blanks or a line break, jdtls answers signature help for the enclosing call, so `outer(inner(⏎ args))` showed outer's signatures. The request now asks past those blanks.

Parameter info rows show the parameter list alone, without the method name and return type, and `<no parameters>` for an overload without any.

Fixes #7927
2026-12-04 13:24:33 +08:00
l0ng-ai 31e7b420ae feat(vcs): close a committed file's local changes diff after the commit (#7942)
When a commit leaves a file with no local changes, its HEAD/index vs working copy diff tab closes. Pinned tabs, files with changes left after a partial commit, and other diffs (Log, Compare with Branch) stay open.

Closes #7914
2026-12-04 13:04:44 +08:00
l0ng-ai 3a31ec25aa feat(editor): rearrange code from Reformat File and on save (#7934)
Reformat File gains a Rearrange entries option (Python, TypeScript, JavaScript; whole-file scope only, remembered with the other options), and Tools > Actions on Save gains Rearrange code (actionsOnSave.rearrange, off by default), run after Optimize imports and before cleanup and reformatting. Rearranging from either place is quiet when nothing moves.

Refs #7783
2026-12-04 12:05:17 +08:00
l0ng-ai d55f116add feat(editor): style Java static, constant and final fields separately (#7930)
Java fields get their own colour scheme attributes under Java > Class Fields: instance field, instance final field, static field and constant (static final field), each falling back through the field kind it refines to Language Defaults > Identifiers > Static field / Instance field. Interface fields count as constants. The resolver and settings preview follow the whole inherit chain; .icls import maps the matching attributes.

Fixes #7643
2026-12-04 11:17:26 +08:00
sonnartliao 7992063ef2 feat(editor): make inactive preprocessor dimming optional (#7913)
clangd reports inactive #if/#ifdef branches as comment semantic tokens, which the editor greys out. Projects without a compilation database (such as U-Boot without a board .config) end up with most of a file grey. A new editor.dimInactiveCode setting (default on, so existing settings keep the grey) adds a Dim inactive preprocessor code checkbox under Settings > Editor > Color Scheme > Language Defaults; turning it off keeps the syntax colours of inactive regions and re-decorates open editors immediately.

Co-authored-by: sonnartliao <[email protected]>
2026-12-04 10:47:35 +08:00
l0ng-ai 5ec05b3aca feat(keymap): rebound caret keys also move lists, popups and text fields (#7909)
Move Caret Up / Down / Left / Right / to Line Start / to Line End and their With Selection variants only acted in text editors. Where no text editor takes such a key, it now acts as the arrow / Home / End key on the focused list, tree, popup or text field, ahead of other actions on the same key; with the completion popup open, Move Caret Up / Down move its selection. Presets are unchanged.

Closes #7714
2026-12-04 09:42:18 +08:00
l0ng-ai 26688a79f7 feat(php): colour variables by name without server semantic tokens (#7905)
Semantic highlighting coloured locals only from server tokens, and Intelephense sends none, so PHP variables kept one colour with the option on. PHP now colours variables and parameters from the parse tree with the same name-to-colour rule; property declarations, static property access, $this and the superglobals are left out, and server tokens still win where they arrive.

Closes #7884
2026-12-04 09:27:27 +08:00
l0ng-ai 9e3077753d feat(window): Select Next / Previous Tab cycle a focused tool window's tabs (#7904)
In a focused tool window, Select Next Tab and Select Previous Tab select its next or previous content tab (terminal sessions, Run and Find tabs), wrapping around; with fewer than two tabs the key is left to the component. The terminal lets these actions through except on Alt+Left / Alt+Right, which a shell uses to move by a word.

Closes #7890
2026-12-04 09:22:46 +08:00
l0ng-ai 377e900e84 fix(java): go to the methods of a call whose arguments fit none (#7885)
jdtls resolves nothing for a Java call whose arguments fit no method (an argument being typed, a stray comma), so Go to Declaration reported no declaration. An unqualified call now goes to the current file's method of that name, or offers its overloads; a qualified call still needs its receiver's type and is left alone. The Cmd-hover link probe follows the same rule.

Fixes #7803
2026-12-04 04:48:40 +08:00
l0ng-ai 7fd5ad50b8 fix(ui): unify tool window icons as monochrome and fix dark-mode icon contrast (#7842)
Tool windows that borrowed coloured file, status, action or vendor icons (Documentation, Find Usages, GitHub Actions, Logcat, Python Console, NuGet, Python Packages, Jupyter Variables, Ports, the Flutter DevTools windows, Coverage) get dedicated monochrome icons at 16 and 20 px; the coloured originals stay where trees, badges and VCS use them. Database Consoles and Query Workspace get a console icon instead of the table grid, and data source entries use the database cylinder.

Icons in the project view, trees, tabs, menus and several popups take --fg-icon instead of --fg-muted / --fg-subtle, so monochrome icons have the same contrast in dark themes.
2026-12-04 01:52:52 +08:00
Muuтаmuutot f1876f1260 feat(editor): highlighting level of the current file's editor (#7805)
Add Configure Current File Analysis… (editor.highlightingLevel, IDEA's PopupHector, Cmd+Alt+Shift+H / Ctrl+Alt+Shift+H) with the three levels None, Syntax and All Problems:

- All Problems (default): everything as before.
- Syntax: syntax and semantic colouring stay; diagnostics and their scrollbar marks leave the editor (Problems still lists them).
- None: plain text; the lezer highlighter is reconfigured out and semantic tokens are dropped.

The level lives in the editor state next to the other per-editor display overrides (cm/localAppearance.ts) and is not saved.

Co-authored-by: muutot <[email protected]>
2026-12-04 01:41:21 +08:00
Muuтаmuutot 16def0187c feat(editor): Move Caret to Text Start/End actions (#7836)
Add editor.textStart / editor.textEnd and their With Selection variants, mapped to EditorTextStart / EditorTextEnd / EditorTextStartWithSelection / EditorTextEndWithSelection for IdeaVim and imported keymaps.

The plain moves leave a single caret at the document boundary; the With Selection variants extend each selection from its anchor. The actions stay unbound in the default keymaps like the other plain caret moves, so the editor's own Ctrl+Home/End (Cmd+Home/End, Cmd+Up/Down on macOS) keep handling the keys and Navigation Bar, Jump to Source and Move Statement keep their macOS shortcuts.

Co-authored-by: muutot <[email protected]>
2026-12-04 01:31:14 +08:00
ntbang0901 3edc7ee1a0 fix(debugger): keep breakpoints when their file is renamed or moved (#7857)
After a file or folder was renamed or moved in the IDE, its breakpoints stayed stored under the old path and disappeared from the editor; nothing in the debugger listened to the IDE's file moves. Line breakpoints now follow with their id, properties and status, as do the source lines of method breakpoints and field watchpoints and an open properties popover; Undo moves them back. Where the new path already had a breakpoint on the same line, the moved file's stays. movedPath moves to platform/fileOps so the debugger can use it without importing the editor.

Co-authored-by: ntbang0901 <[email protected]>
2026-12-04 01:06:00 +08:00
LU XIANGRUIтаwildcatDownstairs e666bb2e33 fix(workbench): main toolbar, tool window stripe and status bar metrics (#7829)
Main toolbar items get a 10px pitch and the dropdowns 10/6px insets with a 16px chevron; stripe buttons get 5px padding on both sides; the status bar is 34px with 4px widget hover insets, its breadcrumbs lifted 5px, and the islands keep a 3px inset above it. Language Services moves after the caret position in the status bar. Compact mode keeps its previous metrics.

Fixed-viewport e2e layouts (commit checks, project tree second click, main toolbar label compression next to the New Agent Task button) get room for the wider gaps and the taller status bar.

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-04 00:29:29 +08:00
Orca 22db3ab9c3 fix(editor): mark problems that have no text to underline (#7812)
A problem whose range is empty (an error at the end of a file ending in a blank line) or covers only a line break was listed in Problems and on the marker bar but not drawn in the editor, because the theme hid CodeMirror's lint point. It now draws one column of the severity's usual underline as a zero-width inline block, so WebKit paints it on empty lines too; hints stay hidden and the reported range is unchanged.

Closes #7784

Co-authored-by: og-orca <[email protected]>
2026-12-03 22:07:32 +08:00
Vadim LazukтаInf1mum 856fc3009e fix(editor): navigate package.json dependencies to the installed package (#7800)
Go to Declaration / Cmd-click on a dependency entry of package.json had nothing to answer it. The reference fallback now resolves dependency entries of dependencies, devDependencies, peerDependencies and optionalDependencies: a name opens the installed package's package.json, a version reveals the package folder in the Project view, and an uninstalled package reports a missing reference. node_modules is looked up from the manifest upwards (hoisted installs, scoped packages); alias, workspace, path and URL ranges are skipped.

Closes #7665
Closes #7734

Co-authored-by: Inf1mum <[email protected]>
2026-12-03 21:17:00 +08:00
audichuang 954180beb0 feat(java): Spring bean gutter icons between beans and injection points (#7589)
Java files in Spring projects get gutter icons between beans and the places they are injected: an injection point (field, constructor or @Bean method parameter) navigates to the beans it receives, and a bean declaration to its injection points. One target jumps straight there; several open the inheritance chooser, with candidates marked. The editor asks once per file for a server-independent SpringBeanMarker shape, cancels stale requests and asks again after edits, when the server reports changed markers, or when a server settles or stops. java-analyzer is the first source (java-analyzer/springBeanMarkers, declared in its experimental capabilities); without such a server nothing is requested. Icons follow Gutter Icons, excluded folders and the server's features.

Refs #7140

Co-authored-by: audichuang <[email protected]>
2026-12-03 19:51:27 +08:00
l0ng-ai d41bccc50c fix(editor): show no read-only banner above library sources (#7788)
Library sources opened from a language server or from the External Libraries showed a "Library source (read-only)" banner above the editor. They now open read-only without a notice, as the status bar's lock already shows the state; the banner stays for decompiled classes, Git revisions, generated C# sources and whenever there is something to act on (sources to download or choose).

Fixes #7735
2026-12-03 18:47:06 +08:00
Orca 66a765664c fix(editor): move a statement up past a function, method or class (#7785)
Move Statement Up did nothing when the line above ended a function, method or class: the lookup of the statement ending on that line stopped at the closing brace, and the guard against moving code into a function refused the move. Where a function or class body ends, the lookup now takes the whole declaration; if, for and try blocks are unchanged, so Up still moves a statement into them.

Closes #7765

Co-authored-by: og-orca <[email protected]>
2026-12-03 18:39:31 +08:00
ntbang0901 72e1d6afc1 fix(project-tree): never lose an existing file to a copy or paste (#7772)
Copy or Save As of an open file onto a taken name in a folder the tree had not loaded replaced that file without asking, because the Copy dialog only knew loaded folders and copy_as overwrote its target. The dialog now reads the folder, and copy_as refuses any existing target. Pasting a file from the OS clipboard into its own folder (or dropping it there through another path) and choosing Overwrite trashed the source itself; such a file now gets a copy next to it, checked with a new fs_same_file command, and an overwrite whose import fails or is cancelled restores the old file.

Co-authored-by: ntbang0901 <[email protected]>
2026-12-03 18:32:44 +08:00
ntbang0901 8ffd6c9e2c fix(search): read $1_new in a regex replacement as group 1 and report unknown groups (#7771)
With Regex on, Replace in Files read $1_new as a group named 1_new, which does not exist, so matches were replaced with nothing in every file. $1 now takes further digits only while the pattern has that group, and a template naming a group the pattern lacks is reported at the replacement field and changes no file. The editor's Replace now expands the same template, so $0, ${1}, $name and \$1 work there too and an optional group that did not match no longer writes undefined.

Co-authored-by: ntbang0901 <[email protected]>
2026-12-03 18:27:33 +08:00
Ignacy Szreter c1b45b037d fix(csharp): colour Roslyn's record, delegate, extension method, field and constant tokens (#7756)
Roslyn sends records, delegates, extension methods, fields and constants with its own semantic token types (recordClass, recordStruct, delegate, extensionMethod, field, constant), which had no highlight class, so they showed as plain text. Each now maps to the standard type it extends.

Closes #7749

Co-authored-by: ignacyszreter <[email protected]>
2026-12-03 18:06:10 +08:00
LU XIANGRUIтаwildcatDownstairs fc60719d4b feat(python): move top-level functions, classes and variables to another module (#7680)
Refactor > Move (F6) in a .py file moves top-level functions, classes and variables to another module. The dialog has From file, To file (a .py path in the project, new or existing) and Elements to Move. An embedded ast-based helper, run with the pylsp-rope environment's Python, moves the code with its decorators and attached comments, places it by import-time dependencies, writes the imports both modules need and rewrites module.name uses; from ... import statements across the project go through the existing module-move rewriter. Unsaved buffers are read, a file changed meanwhile is refused, and every changed file is parsed again before the edit is returned. A name already defined at the destination is refused; risky cases are confirmed first. The tests needing pylsp are ignored by default.

Refs #901

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-03 17:41:54 +08:00
LU XIANGRUIтаwildcatDownstairs e35ba7d805 feat(python): Change Signature through rope (#7622)
Refactor > Change Signature works on Python functions, methods and classes (their __init__). pylsp-rope has no such command, so the IDE runs an embedded helper with the pylsp-rope environment's Python: rope finds the function, its overrides and calls and renames parameters scope-aware; the parameter list and arguments are rewritten from the ast so annotations, defaults, the * and / markers and keyword arguments survive. Unsaved buffers are read through an overlay, calls rope can't resolve come from the type checker's references, and calls that can't be rewritten or likely mistakes are listed in a confirmation first. The result is a normal workspace edit (Preview, Refactor, one undo). The dialog is the Java one reduced to Name and Default value. The rope tests are ignored by default.

Refs #901

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-03 17:36:01 +08:00
LU XIANGRUIтаwildcatDownstairs fa0783ab03 feat(python): search in comments and strings when renaming a symbol (#7679)
The Python Rename dialog offers Search in comments and strings (off by default, remembered; in-place rename follows it). Whole-word, case-sensitive matches in comments and string text are merged into the language server's workspace edit, so they preview, apply and undo with it; a rename that gains text matches is always previewed with the matches under Non-code usages, and applying fails if a matched file changed after the preview. Locals and parameters are searched in their function, other symbols in the project's .py / .pyi files including unsaved buffers; symlinks leading out of the project are skipped.

Refs #4968

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-03 17:23:45 +08:00
LU XIANGRUIтаwildcatDownstairs 5338a34008 feat(languages): Jinja2 templates in Flask projects, with template name completion and navigation (#7657)
.html files under a templates folder open as Jinja2 HTML when the nearest folder above that declares anything declares flask, quart, fastapi, starlette or jinja2 (pyproject.toml, requirements*.txt, Pipfile, setup.cfg, setup.py). A Django project (django declared or manage.py), package.json, angular.json, .git and the home folder end the search; File Types associations and Override File Type win; .htm is untouched; dependency files edited in place are detected again. Template names complete and navigate in extends / include / import / from and in render_template, stream_template, get_template, select_template and TemplateResponse.

Closes #7656

Co-authored-by: wildcatDownstairs <[email protected]>
2026-12-03 17:15:32 +08:00