The intention preview had a fixed 420px width beside the list, which pushed the action list away from the caret or got clipped in narrow windows. The preview now opens to the right when there is room, to the left when that keeps the list by the caret, and below the list in narrow windows. Preview code follows the editor's font settings and theme and wraps long lines.
Quick Documentation used a fixed 600px cap and kept its caret anchor after the window shrank, so short documents looked cramped and the actions could end up off screen. The popup now sizes to a 300-500px content width, keeps its actions together in the lower-right corner while the document scrolls, and clamps the anchor to the current viewport.
The lookup reserved a fixed 420px row, so long names pushed the signature and type past the editor edge, and the body-level tooltip ignored temporary editor zoom. It now sizes to its content within the editor's tooltip bounds, truncates each field, applies the label alignment through CodeMirror's own offset so the viewport clamp accounts for it, and follows the editor's current font size.
Typing while a save was pending could leave the editor clean although the newest edit was not written: the save reply cleared the dirty flag even after a dirty event for a newer version, and a delayed clean event for the earlier write could clear it too. DocDirty now carries the document version from under the backend lock; the editor applies a clean transition only when that version is the synced one and no edits are pending, and a save reply only confirms the version it sent.
Co-authored-by: Mr0Bread <[email protected]>
Whenever any diagnostic source published, the editor converted every source's stored line/column ranges against the current text again. So lists published earlier, notably checks of the saved file (build, PHPStan, Kotlin bridge), jumped to the wrong code after typing. Each source's list is now anchored to the text it arrived for, and placed through the edits made since then. The editor-side counterpart of #4482.
Regression tests for formatter responses that arrive after the document changed: format on save stays silent, explicit formatting shows the stale-response hint, a same-length edit is still detected, and an unchanged buffer formats as before.
Co-authored-by: Mr0Bread <[email protected]>
Adds the optional hover-actions export (plugin API 1.14): plugins contribute a host-rendered action at the left edge of an editor line, revealed by hovering the first four columns of any line in its start-line..end-line range and anchored to its declaration line. The host keeps it left of the line's text, out of the intention bulb's row, never takes focus on hover, collapses several actions into an overflow menu, and lists them in the editor context menu for keyboard access. SDK HoverActions, a minimal fixture, API-compat tests, docs and regenerated components.
Review fixes: the button is positioned on its first show (it was left unpositioned until the next mouse move), the styles use theme tokens, the overflow menu is the shared context menu, and the labels go through the text catalog.
Co-authored-by: NeverKnowsTomorrow <[email protected]>
Database console and data editor layout: console tabs show the console name with its data source and database (and the source icon) through new tabTitle/tabIcon file decorations, results tabs, the data source dialog, table editor and schema compare use the spacing scale and fit narrow panes.
Pasting onto a blank line in YAML placed the text at column 0, turning a nested key into a root key, even with Reformat on paste. @lezer/yaml has no indent strategy, so the indent engine reports 0 and the blank target line looked already correct. On a blank target line where the engine gives no indent (null or 0), the paste filter now uses the indentation of the nearest non-empty line above, in both reformat modes.
Closes#4474
Co-authored-by: Inf1mum <[email protected]>
Clicking a fold placeholder while the caret was on another line could do nothing: the mousedown started a selection that moved the caret, the inline blame refresh rebuilt the line's DOM, and the browser dropped the click on the detached chip. The chip now swallows its mousedown, so the caret stays put and the click always expands the fold.
Co-authored-by: muutot <[email protected]>
⌥↵ opened the list only after the language server answered. It now opens after 100 ms with the rows found locally and a spinner ("Computing…" when empty), and fills in when the actions arrive; a faster answer paints once. The caret line's error quick fixes are requested in parallel with the caret's actions, a late answer doesn't reopen a dismissed list, and a stale answer after an edit is dropped.
Co-authored-by: muutot <[email protected]>
Folded block comments, Javadoc, line documentation and docstrings now show their opener, the first summary line, an ellipsis and the closer (/** Summary ...*/), as in IDEA. Backend folds of a comment now start at the comment itself, and the syntax-fold placeholder adapts when CodeMirror leaves /* and */ outside the range.
Co-authored-by: ffgenius <[email protected]>
With soft wrap and "Use original line's indent for wrapped parts", an indented
line carries a negative text-indent. Inline widgets inherited it, so the inline
blame (and other line-end hints drawn in a block box) started that many columns
to the left, over the code. Widgets now reset text-indent.
With autosave off, a modified file whose last tab closed stayed in the document manager across Close Project / project switch, so after Don't Save the reopened project reused the stale model: it showed the discarded text and the close prompt counted it again. A project change now drops every model except untitled buffers.
Split panes of one file shared their Markdown layout because the mode was stored per path. The HTML Built-in Preview toggle and plugin side-by-side editors had the same per-path state. All three are now kept per editor tab; a new Markdown tab still starts in the last layout chosen, and shown tabs keep theirs when another tab switches.
Fixes#4377
Open in New Window on a project file's tab now opens an editor-only window (editor-<parent>-n) instead of a second project workbench. It shares the parent's documents and language servers; unsaved text, caret and selection move with the tab, and the source tab is removed only after the new window reports ready. Files outside the project keep opening a full window.
Review changes: closing the window settles only its own unsaved files (the project window's guard also asked to terminate running processes); Escape no longer closes it; error messages go through the text catalog; the window has its own stylesheet.
Closes#4117
Co-authored-by: GGVidal <[email protected]>
With jdtls disabled and another Java language server (java-analyzer) serving the module, Run and Test failed with "no Java language server (jdtls) is configured". Launches of such modules now build with Maven or Gradle and take the classpath and JDK from the server's java-analyzer/projectClasspath request, falling back to Maven's resolved classpath; JDK selection, command-line shortening and Lombok hints are shared with the jdtls path, which is unchanged. Debugging those modules uses java-analyzer's own debug adapter (`java-analyzer dap`). Java no longer colours JDK symbols (defaultLibrary) differently from library and workspace ones.
Project view and editor tab menus get Open In › Associated Application, and Find Action gets Open in Associated Application: the selected files open in the application the OS associates with them, through the existing fs_open_with_system command (trusted local projects only; hidden in remote windows).
Closes#4352
Co-authored-by: GGVidal <[email protected]>
Text actions that need only the view (Comment Line, Duplicate/Move Line, Join Lines, Toggle Case, Add Selection for Next Occurrence, Clone Caret and the like) also run while a diff or merge editor has focus: editing ones on its editable side, caret and selection ones on either side. They were enabled only by editorTextFocus, which the diff never sets, so their keys did nothing or fell through as typed text. Diff panes now allow several selections and keep the occurrence-search state, and ⌘D duplicates the line there instead of opening Show Diff.
Closes#4343
The JVM file presentation now reports whether a file's primary type is deprecated: annotated @Deprecated (Java and Kotlin), or a Java type whose Javadoc has a @deprecated tag. The Project view and editor tabs strike the name out, and an error marker on the same file still shows.
Closes#4151
Basic Completion no longer auto-inserts a sole suggestion when the caret is inside an identifier; the lookup stays open so Tab replaces the whole identifier (including a Unicode suffix). A sole suggestion at the end of a prefix still inserts at once.
WebKit on macOS 26.2 renders ew-resize/ns-resize as the default arrow, so dividers gave no hover feedback. Dividers (tool window gaps and splits, editor splits, side tabs, diff gutter, column resizers, review handles) and the drag-time cursor lock now use col-resize/row-resize. Window and popup edge handles are unchanged.
Julia used CodeMirror's legacy StreamLanguage mode, which has no tags for function calls, type names or macros. It now uses Pluto's MIT-licensed Lezer grammar (@plutojl/lang-julia), with call targets tagged as function names, and Julia joins the language-scoped Color Scheme settings with a preview sample.
Co-authored-by: Royshare <[email protected]>
In a notebook with Vim enabled, Normal-mode j on a cell's last line and k on its first line now continue into the next or previous cell that shows an editor (code, or Markdown being edited), at the same column; Markdown previews and raw cells are skipped. Counts, operators and registers (3j, dj) stay inside the cell. Notebooks provide the neighbouring editor through a new adjacentEditor facet.
Co-authored-by: pxc1984 <[email protected]>
Untitled tabs were carried when Close Project returned to Welcome, after the leave guard had asked about them, so a draft discarded with Don't Save reopened as an empty focused tab. Closing to Welcome now drops them; in-place switches still carry them. Fixes#4173.
Navigate to Test derived test names from the file name, so with the caret in a second top-level class it offered the file's test instead. For Java, Kotlin, Scala, Groovy and C# it now takes the outermost type around the caret from the document outline, falling back to the file name. Fixes#4171.
The tab limit's closing policy only counted unsaved changes as modified, so a saved file with a Git change closed before clean tabs. It now shares Close Unmodified Tabs' check: unsaved changes or a VCS status. Fixes#4166.
Markdown views (file preview, agent chat, notebook Markdown cells, LSP/GitHub/plugin Markdown) now typeset $...$, $$...$$, \(...\), \[...\] and ```math blocks with KaTeX. The marked extension emits [data-math] placeholders that survive DOMPurify and are typeset after sanitizing (trust: false); inline $ follows Pandoc's rules, so currency like $5 and $10 stays text. The Markdown preview keeps the placeholders in its rendered HTML and typesets them after each render, like Mermaid diagrams, so its per-block sanitize cache is unaffected.
New dependency: katex 0.19.1 (MIT).
Co-authored-by: zzxzz12345 <[email protected]>
An import group whose first statement spans several lines folded from the end of its header line, leaving the first specifier visible. The fold now starts after the import keyword, so the editor shows `import …`, and the gutter finds an imports fold that starts inside its header line. Go and Rust delimiter handling is unchanged.
Co-authored-by: ffgenius <[email protected]>
CodeMirror's fold gutter rebuilds its chevrons only on document, viewport or language changes, but backend folding ranges arrive through setBackendFolds, so a chevron could sit at a stale line and a click did nothing. The placeholder chip resolved its fold through the clicked line block, which can miss a fold starting at a line boundary (a Python docstring, an Allman header). The gutter now rebuilds whenever the backend fold field changes, and the chip resolves the fold at its own position, falling back to CodeMirror's handler.
Closes#4082
Co-authored-by: muutot <[email protected]>
After an external change to a file whose buffer had unsaved edits, the next autosave wrote the buffer over the disk change despite the conflict warning. The document store now remembers the conflict and the new doc_autosave command declines to write such a buffer; an explicit save still overwrites and a reload clears the conflict.
Fixes#4115
With autosave off, closing the only tab of a modified file disposed its document and lost the edits. As in IDEA, DocumentManager.release keeps a dirty (non-untitled) document open without a tab: reopening shows the edits, Save All and the exit check still cover them; also when autosave on close fails.
Fixes#4116
Identifier under caret and Identifier under caret (write) can now set a Foreground, as in IDEA; imported .icls schemes carry it too. The highlight mark wraps the syntax and semantic token spans, so the colour is applied with the inherited -webkit-text-fill-color: unset, the declaration drops and tokens keep their syntax colours; find matches, selection, links, inlay hints and fold placeholders keep their own colours. Multi-line highlights colour only the highlighted text, not the indent.
Closes#4109
Co-authored-by: wildcatDownstairs <[email protected]>
Fold by default > Documentation comments ignored docstrings written as string literals: the folding backend only emitted Comment folds for comment nodes. It now marks a multi-line Python docstring (the first statement of a module, class or function body) and an Elixir @doc / @moduledoc / @typedoc string or sigil as Comment folds. The frontend treats a comment fold as the file header only when it sits at the top of the file and starts with a comment token, so a module docstring follows the documentation toggle.
Co-authored-by: muutot <[email protected]>
softWrapActive coerced an unset softWrap to false, while DEFAULT_SETTINGS.editor.softWrap and the backend EditorSettings default it to true (scoped by softWrapFiles). Editors opened before settings load, or with the field unset, skipped wrapping on *.md / *.txt / *.rst / *.adoc. An unset value now behaves like the default; an explicit false still disables wrapping.
Co-authored-by: dengliu <[email protected]>
Doc comments were found by walking the CodeMirror syntax tree, so languages without a grammar (Zig) never had their /// and //! docs rendered. docComments() now scans the lines when the tree is empty, with the tree walk's markers and rules, limited to languages whose comment tokens are // (line docs) or /* (block docs) so plain text and logs stay untouched.
Co-authored-by: akbar1214 <[email protected]>
Rainbow indent guides used text palettes (semantic highlighting, rainbow brackets) at full strength, which read as heavy lines. Guides now mix each colour 55% with transparent, keeping the hues distinct and matched to their brackets.
Fixes#4022
Editor tabs show the Project view's wavy error underline for files the problems provider marks with errors. The label gets block padding so the ellipsis clip doesn't cut the wave off.
Fixes#4027
Go signatures already linked their type names (#3959). For other languages
the name is looked up near the documented symbol's declaration and the
language server's definition there is the target; parameters, the symbol's
own name, inferred types and names with several definitions don't link.
Names resolve on hover, so only those that lead somewhere look like links,
and only the signature code blocks are considered (leading blocks, or the
one after the last rule for clangd). Plain names a grammar leaves untagged
get a tok-name span so they can be followed.
Refs #3874
Co-authored-by: wildcatDownstairs <[email protected]>
The rectangular drag gestures were hard-coded, and a middle-button press
navigated immediately, which cut off a middle drag. A new keymap action,
Create Rectangular Selection on Mouse Drag (Alt+Left and Middle by default),
now decides the gesture; middle-click navigation fires on release when the
mouse did not move. Linux keeps middle-button paste unless the user binds the
middle button explicitly, and the mouse shortcut recorder accepts modified
middle clicks.
Closes#3713
Co-authored-by: xiaowu0203 <[email protected]>
Typst (.typ) files get syntax colouring for markup, embedded code and math, a file icon, and the tinymist language server (installable from its GitHub releases) for completion, diagnostics, navigation and the outline.
Closes#3924
Enter inside namespace x { … } or extern "C" { … } indented the new line one level, like any brace body. clang-format's built-in styles (LLVM, Google, Chromium, Mozilla, Microsoft, GNU) keep those contents at the level of the braces' line (NamespaceIndentation: None), so the editor now does too; other brace bodies keep their indentation.
Fixes#3993
Copy Path with Line Number (and its entry in Copy Path/Reference…) copies path:12-18 when the selection spans several lines, leaving out a last line the selection only reaches the start of; a caret or single-line selection still copies path:12.
Closes#3962
Adds a TOML stream parser so keys are coloured as keys wherever they stand (table headers, dotted keys, inline tables), with numbers, booleans/dates, strings and valid/invalid escapes told apart, in files, lock files and fenced code blocks.
Co-authored-by: lleviathe <[email protected]>
Adds a properties/.env stream language wrapper so keys use the keyword colour, the first separator the operator colour and values the string colour.
Co-authored-by: lleviathe <[email protected]>
WebViews don't expose macOS momentum phases, so a trackpad scroll still coasting when ⌘ was pressed zoomed the text, and the inertia after a ⌘ swipe kept zooming. Wheel events less than 150 ms apart now count as one gesture: only a gesture that started with ⌘/Ctrl zooms, and once its deltas shrink four events in a row the rest is inertia. All ⌘/Ctrl+wheel font-zoom surfaces use it (editor, terminal, agent chat, Markdown preview, plugin and services log editors).
Co-authored-by: pravdomil <[email protected]>
The HTML base indented every element's children, so Enter in <script setup> indented the new line. Like WebStorm's Vue code style, only the top-level <template>'s children are indented; code in top-level <script> and <style> blocks starts at the margin.
Fixes#3982