Commit Graph
31 Commits
Author SHA1 Message Date
1grzyb1 6650aef408 VIM-4370 Undo one IdeaVim command at a time in Rider split mode
Rider has no speculative undo, so the undo stack is on the backend. The
backend applies the frontend's changes as undo-transparent patches,
merges all of them into one undo step, and undoes all transparent steps
on top of the stack at once. So one `u` undid every change IdeaVim made
since the backend's own last command, e.g. both deletions after `x x`.

Before each command that follows a change, the frontend now asks the
backend to end the undo step. If the step has only the frontend's
changes, the backend merges a no-op non-transparent action into it first,
so it's undone on its own.

It relies on how the platform merges undo steps, so it's a workaround
until RIDER-145069 is fixed.
2026-11-09 10:59:04 +01:00
1grzyb1 42bb2392df VIM-4370 Undo an Insert mode change with one u in Rider split mode
Rider and CLion have no speculative undo, so the undo stack is on the
backend and `u` on the frontend ran `$Undo` there. With caret movement
not undo-transparent, the platform spends the first undo of a group only
on restoring the caret when it moved after the change. Leaving Insert
mode moves the caret back by one, so the first `u` did nothing.

Run undo/redo on the backend through ChangeRemoteApi with
`ide.undo.transparent.caret.movement` on, as the monolith does. Frontends
with speculative undo keep using `$Undo`.
2026-11-09 10:59:04 +01:00
1grzyb1 fc7140c247 VIM-2524 Indent the line emptied by cc in Rider
The indent was only worked out where the language has a formatter. Rider has
no formatter for C# on the frontend (formatting lives in the ReSharper
backend), so cc and S left the line with its old indent.

Rider's frontend has a LineIndentProvider that works out the C# indent, but
also a dummy one answering DO_NOT_ADJUST, and CodeStyle.getLineIndent only
asks the first provider of a language. Ask all of them and take the first
indent, and fall back to the formatter only if none of them answers.
2026-11-03 10:04:35 +01:00
1grzyb1 39e065bb1f VIM-4351 Bring back the diff editor after Go to Declaration of the IDE
Cmd+B and Ctrl+Click run the IDE's Go to Declaration, which IdeaVim doesn't
see, so only the IDE's navigation history records them, mirrored into the
jump list by 'ideaunifyjumps'. The history knows a diff tab only as a
whole, without a caret, so JumpsListener dropped such places.

For a place in an open diff tab, JumpsListener now asks the tab for its
caret on the side the user works in. Navigating away to another file
leaves that caret where it was, so it is the place the IDE recorded.
JumpInfo carries the diff source over RPC. JumpsListener runs on the
backend, where diff tabs live in split mode too.

A removal is not mirrored for a diff tab: its caret says nothing about the
older place the IDE drops.

The tests wait before navigating like the IDE: for a short while after any
jump, the jump list ignores the IDE's navigation, which would otherwise
mirror IdeaVim's own jumps a second time. That window also drops the IDE's
places mirrored from its history, which is left as it is here. The
split-mode test project gets a module with `src` as a source root, so that
Java resolves the declaration.
2026-11-02 10:56:07 +01:00
1grzyb1 e3c95eb14b Fix(VIM-4351): Bring back the diff editor with <C-O> in split mode
In split mode the diff tab lives on the backend: the frontend only shows
it, with editors that mirror the backend's ones. IdeaVim runs on the
frontend, so it found no diff tab and fell back to the plain file.

- The diff code moved to ideavim-common, so it runs on both sides, and
  uses only the platform: the backend has no IdeaVim injector. The
  frontend looks for a local diff tab first (monolith), and otherwise
  asks the backend through JumpRemoteApi. The mirrored editors share the
  backend editors' EditorId, so the backend finds the real diff editor.
- On the backend, split mode keeps a diff tab in its own file editor
  (DiffRequestDirectTransferEditor), which exposes the diff only as a
  `processor` property. There is no public API for it, so it is read by
  reflection, with the old behaviour as the fallback.
- A write action can't wait for the backend, so a jump recorded during
  one stays a plain file jump, as before.
- The left side of a diff from version control has a document with a
  LightVirtualFile, so it counted as "in the file": such a jump was saved
  across restarts and came back as the plain file at the wrong line.
  Only a file on disk counts now. The tests use such a left side too.

Two jump bugs showed up on the way, not specific to diffs:

- <C-O> could stay where the caret already was, when the IDE had already
  recorded that place as the newest jump (e.g. after clicking another
  file in the Commit tool window). Leaving the newest end of the jump
  list now adds the place of the caret first, which replaces the older
  jump to it, and then goes back, as Vim does.
- In split mode, jumping to a file that wasn't open didn't place the
  caret: selectEditor looked for the frontend editor right after the RPC,
  before the frontend has it, so the file opened wherever it was last
  left. The backend now opens the file at the position, for jumps, marks,
  the tag stack, the change list and quickfix.
2026-11-02 10:56:07 +01:00
1grzyb1 37cac8d930 VIM-2342 Don't open Ggrep matches twice in symlinked repositories
git rev-parse --show-toplevel resolves symlinks, so in /tmp on macOS matches pointed to /private/tmp and opened a second tab for files that were already open
2026-10-26 09:41:18 +01:00
1grzyb1 94dc275719 VIM-2342 Allow cancelling a slow Ggrep
Ggrep shows a titled progress dialog, and cancelling it kills the git process instead of leaving it running
2026-10-26 09:41:18 +01:00
1grzyb1 97ae43ee55 VIM-2342 Add copen command
Shows the quickfix list in a read-only window that follows the current item. Enter on a line jumps to that item in the window copen was run from
2026-10-26 09:41:18 +01:00
1grzyb1 38926e7a3f VIM-2342 Remove unnecessary git version process call 2026-10-26 09:41:18 +01:00
1grzyb1 78b82c395f VIM-2342 Add fugitive extension with grep command 2026-10-26 09:41:18 +01:00
1grzyb1andClaude Opus 5.5 27befce788 Drop dependencies on the removed Rhizome kernel modules
IJPL-257728 removed intellij.platform.kernel, kernel.impl and kernel.backend
from the platform. On builds from master, IdeaVIM.ideavim-backend and both
bookmark backend modules declared a dependency on intellij.platform.kernel.backend,
so the platform skipped them silently. None of the remoteApiProvider extensions
got registered, and Commentary, Format and the other RPC calls failed with
"No remote API found".

IdeaVim doesn't use any class from these modules. The backend-only loading in
split mode is still provided by the dependency on intellij.platform.backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:11:46 +02:00
1grzyb1 1e3c671c0c VIM-2524 calculate indent after cc
set proper indent after performing cc. previously we were just using that was already set not from code style
2026-10-09 09:49:32 +02:00
1grzyb1 6f48fd9903 Complete action command ideavimrc file 2026-10-05 12:04:26 +02:00
Grzybek 5bc0344547 VIM-4333 Fix auto-indent handling in clion (#2090)
use directly formatter for clion to indent lines otherwise it was formatting whole file
2026-09-30 08:38:08 +00:00
1grzyb1 fafc5d25a4 Add idea prefix to custom options
To not confuse our internal options with vim ones we've added idea prefix to all of them
Old names will still work as deprecated names
2026-09-03 09:03:23 +02:00
1grzyb1 5ee595aac4 VIM-3058 alternate file name register 2026-08-27 09:19:18 +02:00
1grzyb1 b7219ff413 VIM-1266 file name from percent register
Implement % register that returns current file name
2026-08-21 08:49:52 +02:00
1grzyb1 c2967fa78b VIM-1180 Pass eof to external command
Without that commands like `!sort` would never finish as they waited for user input. This is same way as neovim does. We also don;t support interactive commands
2026-08-20 10:08:27 +02:00
grzybek 71f7e2d3ea VIM-4272 Don't update systemSelection during indent
when we selected text during indentation after paste it selected part of text which in combination with unnamed resulted in duplicated/broken paste
2026-08-12 10:01:52 +02:00
1grzyb1 61e98f9381 Fix opening what's new in split mode
In split mode resources are loaded from backend
2026-08-04 10:12:42 +02:00
claude[bot]andClaude Opus 4.8 0c29b00250 Introduce VimFile.LAST_FILE_SENTINEL for selectFile "last file" marker
The `selectFile(count)` API uses the magic number 99 as a sentinel meaning
"select the last open file". This value was duplicated as a bare literal in
both implementations (IjFileGroup and FileRemoteApiImpl), with nothing tying
it to the callers that must produce it. Name it once on the VimFile companion
and reference it from both implementations so the value can no longer drift.

No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 11:17:29 +02:00
1grzyb1 5d51c71a68 VIM-989 Implement write command with file argument
Now when argument is passed to `:w {arg}` content will be saved to newly created file
2026-07-16 08:30:23 +02:00
1grzyb1 ef4f29ebc0 Run tests for EAP on java 25 2026-07-09 11:57:53 +02:00
1grzyb1 e13c5d1ae8 uple bookmark RPC from the backend module for cross-version support
Split the bookmark backend RPC into optional, self-gating content modules so JumpRemoteApi (and the rest of the backend RPC) no longer breaks when the intellij.platform.bookmarks module is absent, while bookmark sync still works whether bookmarks lives in platform core (≤2026.1) or in the separate plugin module
  (2026.2+).
2026-07-08 11:55:04 +02:00
Matt Ellis 863c131be5 Use transferTo method instead of own copy method 2026-06-22 09:51:19 +02:00
Matt Ellis b0f721ffc2 Refresh VFS after executing shell command
Fixes VIM-4240
2026-06-22 09:51:19 +02:00
1grzyb1 38c0d87a70 VIM-4245 wrap undo mark into executecCommand
Otherwise there was exception thrown that undable is allowed only in commands
2026-06-18 10:08:15 +02:00
1grzyb1 95128f407b VIM-4235 use native saveFile action in :w
using FilerometeApi didn't trigger reformat on save action in splitmode/rider so I chagned it to native action execution in on save
2026-05-22 08:42:52 +00:00
1grzyb1 5d6622b77e Use only jbr cache repository 2026-05-13 09:48:47 +00:00
1grzyb1 2b4a4eeff4 Add jbr cache repo per module 2026-05-13 08:45:11 +00:00
1grzyb1 7bf2c9196d Align content module names with plugin.xml so 2026.1 finds them 2026-05-12 08:06:28 +00:00