⌘⇧↵ after `struct S` (C) or `class A` (C++) produced `struct S {` / `|` / `}`: a type definition without its terminating `;`, which does not compile.
`completeStatementSpec` now closes the body with `};` in C, C++, Objective-C and Objective-C++ when the header is a type definition: `struct` / `class` / `union` / `enum` / `enum class`, optionally with `typedef`, `template <…>`, `final` and base classes. `typedef struct Node`, `union U` and `template <typename T> class Box` are now recognised as block heads too. Namespaces and control flow keep a plain `}`.
Typing `public:` on a member line of a C++ class left it at member indentation (` public:`) instead of lining it up with the class, as CLion's default code style does. The Lezer C++ indentation has no rule for access specifiers, and its `indentOnInput` only reindents `case`, `default:` and braces.
For C++ (`EXTRA_SUPPORT` in `languages.ts`), an indent service puts a `public:` / `protected:` / `private:` line at the indentation of the line opening its class body (`FieldDeclarationList`), and an `indentOnInput` pattern reindents the line when the colon is typed. Members after it keep the member indentation; `std::` is unaffected.
Enter after an 8-space `case 1:` (or `default:`) in C, C++ or PHP put the caret at 8 spaces, aligned with the label, instead of 12 for the branch body: the Lezer C++ and PHP grammars indent a `case` body from the switch body, not from the label.
`caseBodyIndent`, an indent service added for C, C++ and PHP in `EXTRA_SUPPORT`, puts the new line one level deeper than a `case …:` / `default:` line when nothing follows the caret. Other lines, including a C++ `std::`, are unchanged.
Use compact rows and content-based widths in navigation bar child lists. The default row height is 18 px and the text stays at 13 px. The wide desktop fixture shows 20 complete rows, up from 14. The two-folder list in the narrow fixture uses 95 px of width, down from 199 px.
src/editor/api.ts re-exports navigationProviders and relatedProviders, which the frontend smoke loads. Add both files to the Language smoke workflow paths and to the Changes step's smoke pattern, so scripts/smoke-paths.test.ts passes again and a change to either file runs every language.
Closes#5073
Show the affected-changes toggle on the changed-files toolbar when Git Log has a path filter. This makes it possible to narrow the selected commit's file list in one click. Group the Diff preview toggle and its location under Layout in View Options. Let the toolbar wrap when the pane is narrow.
Two problems with the `/**` + Enter stub:
- **PHP**: `/**` + Enter right after `<?php` gave `/**` / caret, with no `*/`, so the function below ended up inside an open comment. With an unclosed `/**` directly after `<?php`, Lezer PHP parses the text as the surrounding HTML: `languageDataAt("commentTokens")` there returns only `<!-- -->` (checked with the real PHP language), and `enterInDocComment` stood back. In PHP documents it no longer requires `/* */` tokens at the caret, so the stub is closed and lists `@param` / `@return` as elsewhere in PHP.
- **C / C++**: the stub had no tags. New `cDocTags` lists `@param` per named parameter (defaults and array suffixes dropped, `void` / `...` skipped) and `@return` unless the function returns `void` or is a constructor or destructor. It handles specifiers, pointers and references, `template <…>`, qualified names (`Box<T>::take`), trailing `const` / `noexcept` / `override` and initializer lists; types, calls and statements get no tags.
With bracket pairing on, `<` after `#include ` (C, C++) and after `std::vector` (C++) stayed single: `smartAngleBrackets` had no rule for C or C++.
- C and Objective-C: `#include <` (and `#include_next`, `#import`) pairs.
- C++ and Objective-C++: the same, plus `template <`, a standard template or cast written against its `<` (`std::vector<`, `std::make_unique<`, `static_cast<`…) and a capitalized name (`Box<`).
- Lowercase values (`a <`, `i<`), `std::cout <`, all-caps macros (`MAX<`) and `operator<` stay single.
`inLiteral` treated any node whose name contains "template" as a template literal, which made Lezer C++'s `TemplateFunction` (`std::make_unique`) look like a string; C++ template nodes are now excluded.
Project's Options menu groups its settings under Behavior, Appearance, and Sort By. Sort By includes the folder ordering toggle alongside the sort choices. The first level now has seven items, so the window controls stay visible in a short window.
⌥⌘V on `value * value` in C or C++ said "Selected block should represent an expression", while ⌥↵ on the same selection offered **Extract subexpression to variable** and it worked. clangd gives every tweak the kind `refactor`, and `refactor` is not contained in `refactor.extract`, so the shortcut's request returned nothing. Checked with a small LSP script against the installed clangd: `only: ["refactor"]` → `Extract subexpression to variable` (`refactor`); `only: ["refactor.extract"]` → none.
`requestKind` now asks for `refactor` in C, C++, Objective-C and Objective-C++ too (as it already does for typescript-language-server); `classifyAction` already maps a generic `refactor` action by its title.
Keep the Close button next to More in the editor's Find and Replace toolbar. The two fields share a column that scales with the editor pane. In narrow panes, the controls wrap below the query and the fields use the space freed by moving Close.
Add `pnpm dogfood:build` / `pnpm dogfood:install` (and matching mise tasks) to build a fast local release app named openidea_dogfood with a grey icon. It keeps the release identifier, so it shares settings and data with the installed app.
The dogfood config clears the updater endpoints so a release never replaces the dogfood bundle, the bundle is read from Cargo's target directory, and the install output and setup docs note that the two apps share one instance and settings and that the dogfood app never updates itself.
Copy Path/Reference… gets "Absolute Path with line number" right below "Absolute Path": the absolute file path with the caret line, or the selected line range (`/abs/path/File.java:12`, `/abs/path/File.java:12-18`), like the existing relative "Path with line number". It is also an action (`editor.copyAbsolutePathWithLineNumber`) reachable from Find Action. Like the relative variant, the chooser copies the value it previewed, even if the caret moved after it opened.
Co-authored-by: clevertension <346723+clevertension@users.noreply.github.com>
Two pairing gaps in Kotlin:
- **`"${`** stayed `"${|"`: `closeBrackets()` pairs `{` only before whitespace or a closer, and here the auto-inserted closing quote follows. `templateBrace` pairs a `{` typed right after `$` inside an open string into `${|}`, in Kotlin, Groovy, Dart, Scala, JavaScript and TypeScript (template literals). Outside a string nothing changes.
- **`mutableListOf<`** got no `>`: the Kotlin rule only treats capitalized names as types. A generic factory call written directly against its `<` — `…Of` (`listOf`, `mutableMapOf`, `setOf`…), `empty…`, `arrayOfNulls`, `enumValues`, `enumValueOf`, `typeOf` — now pairs. Other lowercase names, and any name followed by a space, stay comparisons.
The desktop window keeps native drag and drop on for files dropped onto it, so HTML5 drop events never reach the page and CodeMirror's built-in text drag never landed: dragged text stayed where it was.
Text drag now runs on mouse events. Dragging the selection shows a drop caret, scrolls the editor near its edges, and drops the text at the caret on release, into the same or another editor. Option (macOS) or Ctrl held at release copies instead of moving; Escape cancels; a click on the selection without dragging places the caret. "Enable drag-and-drop functionality in editor" still turns it off.
Closes#5117
The Search Everywhere query field now sits directly on the popup surface. A single inset divider shows focus for the query and its history button. The shorter query row gives results more room in short windows.
Fixes the remaining Phase 1 gaps of the Agent Skills hub:
- `/` completion drops skills that are off or `user-invocable: false`, de-duplicates Codex's prefixed names, keeps `argument-hint`, defaults `disable-model-invocation: true` skills to slash-only, and refreshes when session or draft overrides change.
- Discovery scans workspace member folders, monorepo packages up to two levels down, `<category>/<skill>/SKILL.md` folders and Copilot CLI's two-level `installed-plugins` layout (skipping disabled plugins). Codex disable rules point at `<skill>/SKILL.md`, and roots each CLI already scans are treated as native so skills aren't staged twice.
- A skill that is off globally or for the workspace can be turned on for one session; untrusted workspace skills stay locked. Settings › Agents › Skills shows the other folders a symlinked skill is linked from.
Closes#3897
Co-authored-by: dengliu <5108773+dengliu@users.noreply.github.com>
Move Statement (⌘⇧↓/↑) on a branch header:
- **Go** `case 1:`: `structural_ranges` climbed past the branch to the whole `switch` (a `case` keyword's ancestors are not direct children of a block until the switch). With no sibling, the line-based fallback ran and moved `println("one")` above every label, breaking the switch.
- **Kotlin** `1 -> …` in a `when`: the statement was the whole `when`, so nothing moved.
`LangKinds` gains `clauses` (Go `expression_case`, `default_case`, `type_case`, `communication_case`; Kotlin `when_entry`). In `structural_ranges`, a branch reached from its header is the statement, and its neighbours are only other branches (never the switch subject `x`). Statements inside a branch are unchanged. On the frontend, `planMoveStatement` trims the line breaks a node may end with: Go branch ranges run to the next line's start, which made `ownsLines` reject them and fall back again.
Installing a .NET tool (csharp-ls, FsAutoComplete) on a machine whose newest SDK is older than the one the tool targets failed with dotnet's generic "NuGet feed cannot be accessed" hint.
Before installing, the IDE reads the newest SDK from `dotnet --list-sdks` and the target framework of the package's releases from the nuget.org catalog. If the latest release needs a newer SDK, it installs the newest stable release that runs on the installed one and logs why; if none of the 20 newest does, it fails naming the SDK version required. When nuget.org can't be reached it installs as before, and a failed install now quotes dotnet's `error NUxxxx` lines.
Co-authored-by: EjaYF <9842286+EjaYF@users.noreply.github.com>
The Run Anything command field now sits directly on the popup surface. A single inset divider shows keyboard focus. The command row is 14 px shorter, giving the scrollable results the extra space in short windows.
⌥⌘V on `1 + 2` in `println(1 + 2)` (Go) answered "Selected block should represent an expression". gopls 0.24 offers only **Extract constant** (`refactor.extract.constant`) for a constant expression — checked with a small LSP script against the installed gopls: both `only: ["refactor"]` and `["refactor.extract"]` return just that action. No action mapped to Introduce Variable, and the syntax-based fallback deliberately stands back when a running server answers nothing (`reason: "empty"`).
When the server's answer contains another introduce-kind extraction for the selection, the server evidently takes it for an expression, so `runRefactoring` now calls the fallback with a new reason `otherKind`, which builds the variable from the syntax tree (`value := 1 + 2`, as GoLand does). An empty answer otherwise still means no fallback.
In Kotlin, Enter after `1 ->` in a `when` (with the body still to come) or after `val answer =` kept the line's indentation (8 and 4 spaces) instead of continuing one level deeper (12 and 8), as IDEA does. Kotlin uses CodeMirror's legacy C-like mode, whose indentation does not know either construct.
An indent service for the Kotlin mode (`EXTRA_SUPPORT` in `languages.ts`) adds one level after a line ending in `->` or in an assignment `=` (not `==`, `!=`, `<=`, `>=`), with nothing after the caret and no bracket left open.
Enter after `/// Summary` above a Rust function gave a blank line: `enterInLineComment` only splits a comment when text follows the caret, so at the end of the line nothing continued the documentation. RustRover (and Rider for C#) continue documentation line comments.
`enterAfterDocLineComment` handles Enter at the end of a `///` line (Rust, C#, Dart, Swift, F#) or a Rust `//!` line: the next line gets the same indentation and prefix, caret after `/// `. Plain `//` comments and `////` banners are unchanged, as is Enter in the middle of a comment (still split by `enterInLineComment`).
Two caret problems with the comment commands, seen in Go, Rust and Kotlin:
- **⌘/, Undo, Redo**: the comment came back but the caret went to the line above (L2 instead of L3). As with Delete Line and Move Statement, CodeMirror's history maps the pre-command caret through the change on Redo unless a selection was recorded after it; `commentLine` now records its resulting caret (and keeps its repeated-⌘/ detection on the state after that).
- **⌥⌘/ on a blank line without a selection** inserted `/* */` with the caret before it. It now inserts the language's empty block comment with the caret between the delimiters (`/* | */`); lines with code keep the existing behaviour.
With quote pairing on, typing `'a` between `<>` in `fn borrow<>() {}` gave `fn borrow<'a'>() {}`, and `&'a` got a stray quote too: `closeBrackets()` pairs `'` wherever no word character precedes it, and Rust's apostrophe also starts lifetimes.
`rustLifetimeQuote` (an input handler for Rust, under the Insert pair quote option) inserts a single `'` where a lifetime goes: after `<`, `&` or `+`, and after `,` or `:` inside angle brackets (`<'a, 'b>`, `<T: 'static>`). Lifetimes earlier on the line are ignored when counting brackets. A char literal (`let c = '`, `f('a', '`) still pairs.
Complete Current Statement (⌘⇧↵) after `func f` (Go), `fn f` (Rust) or `fun f` (Kotlin) produced `func f {` / `|` / `}`: a body without a parameter list, which does not compile. A header that names a function (after any modifiers such as `pub async`, `private suspend`, and optional type parameters) but has no `(` yet now gets `()` before the body; the caret goes into the body as before. `pub async fn …` is now recognised as a block head too.
Git Log now uses the editor's configured font, size, and weights for commit subjects and descriptions. Authors, dates, branches, and signatures use smaller UI text and tighter spacing. Long metadata can wrap inside the details pane.
Plugin API 1.15 adds a caret-moved event through the existing events.other channel (no WIT interface or signature change): {path, line, col, settled} with 0-based UTF-16 positions for the focused editor. The frontend batches caret moves after 120 ms (only the latest position per file) and sends one settled event 600 ms after the caret rests; queued and delayed events are dropped when the editor, document, path or project changes. editor-focused now carries the focused editor (path, language, selections) through an optional argument on plugin_set_active_file, which the remote adapter forwards. Requires the events capability; components and fixtures are rebuilt for 1.15.
Co-authored-by: charli117 <24435100+charli117@users.noreply.github.com>
The Debug tool window puts the call stack above Variables when docked on either side, giving both panes the full dock width; in the bottom dock the panes sit side by side. Each orientation remembers its divider position.
In a side dock, Problems puts the severity and navigation toolbar above the list and the source preview below it, both at the full dock width; in the bottom dock the list and preview sit side by side. Each orientation remembers its divider position.
The docked Structure tree starts directly below the tool window header, gaining 32 px of vertical space. The header's View Options menu groups sorting and member filters, and the existing Options menu holds Expand All, Collapse All and the two source-following commands.
Run session tabs fit the available space in the tool window header. Long names shorten to keep the close or pin button visible, and hovering shows the full name and, for completed runs, the duration and exit code.
Search Everywhere shortens long directory paths before the last folder in Files and Classes, so same-named results stay distinguishable; hovering shows the full directory. File names keep their extensions visible when the name fits on the row.
Compact Mode reduced tree row height and the island gap, but the tree's horizontal inset stayed at 6px, leaving compact trees 2px wider on each side than JetBrains' compact Tree.border (2,8,2,8). The --tree-inset token now steps 6px → 4px in Compact Mode, so island gap plus inset is 12px normally and 8px compact.
Co-authored-by: muutot <92625353+muutot@users.noreply.github.com>
The single-file diff toolbar keeps the comparison status beside Settings and the other viewer tools, in a group that can wrap to a second row so longer comparison messages stay readable. At toolbar widths of 520 px and below, the viewer layout, collapse and synchronized scrolling commands are available from Settings.
The debugger variable menu groups Set Value with Copy Value and Copy Name, and watch creation and field watchpoints get their own group when available. The watch menu puts Remove Watch and Remove All Watches first, above value and source commands.
The Commit changes menu leads with Commit, Rollback and Move to Another Changelist in the change-list workflow, and with Stage and Unstage in staging mode. Diff, source and path-copy commands are grouped together, and the two patch commands sit next to each other.
The terminal output menu puts Find and session commands first, then groups Copy, Paste and Select All above Clear Buffer and the split commands. Find opens the search bar with the selected text as the query.
The console search field no longer shares a row with its matching options in a narrow dock: below 224 px the clear and matching controls move below the query. The match count uses the small UI font with tabular digits and sits beside the previous and next buttons.
The main toolbar shares the available text width between labels, so long project and run configuration names give up space before short branch names. At the minimum window width, dropdowns with leading icons show just those icons with their tooltips, while Run, Debug and the window buttons keep their hit targets.
The Git Log commit menu puts revision copying and patch creation at the top, then separates comparison from operations that change the repository. Cherry-pick sits with the other commit operations, parent and child navigation sit together, and both bookmark actions share a group.
The Project view puts Rename beside Refactor and Delete, with a separate group for Reformat Code and Optimize Imports. Jump to Source follows the clipboard actions; Local History, Git and Reload from Disk share a group, and comparison is separated from directory roles and file colors.
The editor tab context menu puts Close All Tabs beside Close Other Tabs, followed by the more specific close commands. Copy Path/Reference gets its own group above the splits, each split sits beside its split-and-move action, and pinning, opening a new window and configuring tabs share a group.
WebKitGTK pastes the primary selection on a middle-button release into the focused editable, wherever the release lands, so closing a tab with a middle click pasted into the active editor (and a middle click on a tree, tool window or the terminal did the same). Middle-button releases outside editable content now cancel that paste; a middle click in the editor or a text field still pastes.
Fixes#5079
The editor context menu keeps Cut, Copy, Paste and Copy / Paste Special together, with clipboard shortcut labels that follow the host platform. With a selection, Find in Files sits with the other search and navigation actions, and Split Right sits next to Open In, above Local History and Git.
When the global settings.toml is missing, OpenIDEA now saves the OS's preferred UI language (NSLocale on macOS, GetUserPreferredUILanguages on Windows, LC_ALL/LC_MESSAGES/LANG elsewhere) as appearance.locale, mapped to one of the shipped UI languages with English as the fallback, and loads that catalog before the workbench renders. An existing settings file keeps its saved language. The mapping lives in ide-workspace next to the settings store, and a test keeps its locale list in step with the frontend's.
Co-authored-by: laot7490 <70145288+laot7490@users.noreply.github.com>
The Expressions chooser uses one compact column for both the refactoring action and the syntax fallback. Multiline candidates show their first source line followed by an ellipsis, while selecting a row still highlights and uses the full expression; the highlight clears when filtering leaves no active row.
With no desktop session (WSLg, a bare compositor) GTK reports its built-in decoration layout, close only, so the frameless title bar had no way to minimize or maximize the window. The desktop's gtk-decoration-layout is now used only when a desktop session is running (XDG_CURRENT_DESKTOP, XDG_SESSION_DESKTOP or DESKTOP_SESSION); otherwise the title bar shows minimize, maximize and close.
Fixes#4421
The Unwrap/Remove chooser uses a compact list of action names. The selected action previews the kept and removed code in the editor; switching rows leaves the caret and scroll position in place, and Escape dismisses the chooser and clears the preview.