30 Commits
Author SHA1 Message Date
Nicolas GBandGitHub 3d10ae14be fix(status): Make restoring files available in visual mode (#144) 2026-07-24 17:47:24 +02:00
Björn SteinbrinkandGitHub b5fe23351a fix(picker): status picker crash on renamed files (#139) 2026-07-10 12:45:57 +02:00
Nicolas GBandGitHub b7c17af6d2 fix(cmd): Parse default commands through a json template to avoid manual parsing through regex (#137) 2026-07-10 09:06:28 +02:00
Nicolas GBandGitHub 7f2786ff16 refactor!: Migrate runners cmd from string to argv (#134)
Migrate command execution to structured argv lists across the plugin, replacing shell-string command construction with `vim.system` argv execution. The runner API now exposes argv-based execution as the default path:

   - `runner.execute_command` -> `runner.execute`
   - `runner.execute_command_async` -> `runner.execute_async`
   - `runner.execute_command_raw` -> `runner.execute_raw`
   - `runner.execute_command_raw_async` -> `runner.execute_raw_async`
   - `runner.execute_command_sync` was removed; use `runner.execute` and handle the result directly

BREAKING CHANGES:
   - `cmd.new({ args = ... })` now requires `args` as `string[]` argv tokens, not a single string.
   - `cmd.log({ ... })` now uses `raw_flags` as `string[]` for raw passthrough flags; `raw = "..."` is no longer supported.
   - Direct users of `jj.core.runner` must migrate from the old `execute_command*` string helpers to the new argv-based `execute*` helpers.
2026-07-07 18:25:30 +02:00
Björn SteinbrinkandGitHub f217b16699 feat(picker): Add picker to navigate conflict sections (#131) 2026-06-23 09:59:42 +02:00
ca6d751de6 fix(file): show files added since the diffed revision as empty instead of erroring (#130)
Co-authored-by: Roman Konoval <roman@jiko.io>
2026-06-23 09:52:02 +02:00
Nicolas GBandGitHub 7fc91fe6d2 feat(resolve): add resolve command and log integration (#125)
Add first-class conflict resolution support to jj.nvim.

   - add `jj.cmd.resolve` to run `jj resolve` in a floating terminal or via an
     external tool
   - add `:J resolve` with support for `-r/--revision`, `--tool`,
     `--external/--ext`, and positional filesets
   - integrate resolve into the log buffer with the `gr` mapping and optional
     `resolve_strategies` picker
   - add `utils.is_change_conflicted()` and avoid opening resolve when the
     selected revision has no conflicts
   - document resolve usage, config, and keymaps in the README
   - add tests for resolve arg parsing and conflict detection helpers
2026-06-16 19:06:33 +02:00
Lars HansenandGitHub 6409ab0a66 fix(encoding): preserve UTF-16/32 content in jj file reads and diffs (#122)
Use raw command output for jj file reads, add encoding-aware decode/encode
handling, preserve buffer encoding settings across revision buffers, and add
tests for BOMs, endianness, and roundtrip behavior.
2026-06-16 18:35:27 +02:00
NicolasGB 71f640be45 feat(status,highlights): Handle renamed files in restore and picker flows
- Improve status-line parsing to support top-level and nested rename 
        syntaxes, so actions no longer include trailing braces in paths.
    - Update the Snacks status picker integration to pass structured 
        rename/status metadata and use git_status formatting, preserving 
        icons/highlighting while showing rename pairs correctly.
    - Also tighten renamed-line highlighting in the editor buffer for consistent jjRenamed behavior.
2026-05-19 18:05:17 +02:00
Nicolas GBandGitHub 5558c22471 feat(editor): Add the possibility to configure a window for the editor like in the terminal allowing for "hsplit"/"vsplit"/"tab"/"floating" (#114) 2026-05-19 18:04:44 +02:00
53a3196210 Feat: Add file module with Jread, Jedit, Jsplit , Jvsplit and Jtabedit similar to fugitive's (#105)
Co-authored-by: NicolasGB <ngou0210@gmail.com>
2026-04-26 09:50:26 -07:00
Jonas ElhsandGitHub 46141a282e feat!(terminal): unify terminal window behavior and centralize sizing config (#102)
- add terminal.window.type support (hsplit, vsplit, floating, tab)
- add terminal.window.split_size for split-based layouts
- rename floating size options to terminal.window.floating_width/floating_height
- validate terminal window ratios during setup
- make terminal.run/run_floating merge default keymaps internally
- remove cmd.split width/height sizing in favor of terminal.window config
- improve floating/log buffer state handling and refresh behavior
- update README examples and configuration docs

BREAKING CHANGE: terminal sizing/config moved to terminal.window.*.
Removed cmd.split.width/cmd.split.height.
Renamed terminal.window.width/height to terminal.window.floating_width/floating_height
2026-04-07 10:31:12 +02:00
Nicolas GBandGitHub 1c3d38a626 feat(diff): Add the diff_history command (#97)
This new command is natively implemented by both the `codediff` and `diffview` backends allowing to easily navigate the changes between two revsets while diffing the. 

It also gives a new `:J diff_hisotyr` command that optionally takes a range of revsets formatted `<rev1>..<rev2>` otherwise it prompts the user for the range.
2026-03-12 18:03:23 +01:00
NicolasGB bbba4051c8 feat(fetch_pr): Introdue the fetch_pr command that allows to pick open
Pull requests from github and import them locally
2026-02-24 18:18:59 +01:00
Wonung KimandGitHub 69679f2e15 feat: use sync describe when the log buffer should be re-opened (#91) 2026-02-23 11:26:13 +01:00
Roman KonovalandNicolas GB d483544483 Fixes default command parsing 2026-02-18 09:22:30 +01:00
NicolasGB 3115a0b3f0 fix(parser): use / instead of \ as divergent change separator
jj uses / (e.g., rs/1) for divergent changes, not \. Update the parser
to match revsets with /N suffix and update all related tests.
2026-02-13 10:13:30 +01:00
NicolasGB 463fd0876a fix(parser): support for divergent changes 2026-01-25 19:15:06 +01:00
NicolasGB a23997d3bc fix(parser): Fix some edge cases where false positives where getting
parsed as change-lines.

    - Added some tests to avoid these false positives
    - Forced the parser to ensure there is at least a symbol in the
      change line allowed_prefixes before finding out the change
2026-01-07 12:52:42 +01:00
NicolasGB ba48ed08b5 feat(log): add immutable-ignoring rebase keymaps
Changes add support for rebasing while ignoring immutability constraints with new keymaps (<S-CR>, <S-o>, <S-a>, <S-b>) and update documentation. Refactors rebase handler to accept optional ignore_immut parameter and includes minor comment improvements in buffer and command modules.
2026-01-06 13:20:19 +01:00
Nicolas GBandGitHub 12e91e547d feat: Rebase on log buffer (#62)
Now it is possible to rebase interactively from the log buffer with visual feedback. You can rebase one or many visually selected changes.

Supported target modes are: `-o` / `-A` / `-B`.

Limitation:
	- As of now you cannot rebase a whole branch (-b) from the log view.

Bonus from this pr:
	- Now keymaps support different modes
2026-01-02 18:41:59 +01:00
Nicolas GBandGitHub 6eb41f631e Feat: Annotation by file and line (#55) 2025-12-29 11:46:35 -08:00
NicolasGB 5dc6fbafa7 fix(runner): use sh -c wrapper for safe command execution 2025-12-19 16:57:38 +10:00
Nicolas GBandGitHub d63761e1bf feat(bookmark): add bookmark management from log buffer and bookmark_move API (#51) 2025-11-27 22:07:22 +01:00
NicolasGB e22bf5ec4e feat: Add fetch/push commands and log keybinds, make long-running operations non-blocking
Convert blocking jj commands to async using vim.fn.jobstart() to prevent UI
freezing during fetch, push, rebase, squash, and other heavy operations.

Changes:
- Implement execute_command_async() in runner with proper error handling
  - Captures stdout from job and passes to success callback
  - Supports stdin input for commands that require it
  - Includes silent flag to suppress error notifications
  - Replicates sync version's error handling behavior

- Convert blocking operations to async:
  - handle_log_fetch, handle_log_push_all, handle_log_new
  - handle_log_edit, handle_log_abandon, handle_log_describe
  - describe.execute_describe, all init.lua commands

- Add push/fetch as public commands with CLI support:
  - M.fetch() - fetch from remote
  - M.push(opts) - push all changes or specific bookmark
  - CLI: :J push, :J push <bookmark>, :J fetch

- Implement handle_log_push_bookmark() for revision under cursor:
  - Retrieves and strips modified bookmark indicator (*)
  - Pushes specific bookmark to remote
  - Keybind: Shift+p in log buffer

- Update README with new keybinds:
  - a: abandon revision under cursor
  - f: fetch from remote
  - p: push all changes
  - Shift+p: push revision's bookmark

- Add Lua API docs for push command options
2025-11-27 20:58:34 +01:00
Nicolas GBandGitHub 39de3c6bc9 fix: Improve the parser and add test to handle edge cases (#42) 2025-11-26 09:42:45 +01:00
NicolasGB 7329e89a85 feat(terminal): add configurable cursor render delay for terminal buffers
Add cursor position restoration with configurable timing to handle terminal
     buffer rendering asynchronously. This fixes cursor column being reset to 0
     when refreshing jj log commands.

     Changes:
     - Add `terminal.cursor_render_delay` configuration option (default: 10ms)
     - Add buffer.get_cursor() and buffer.set_cursor() helpers in core/buffer
       * buffer.set_cursor() uses defer_fn with configurable delay for terminal buffers
       * Automatic position validation with clamping to buffer bounds
       * Line number clamped to [1, line_count]
       * Column clamped to [0, line_length] based on actual line content
       * Validation happens inside deferred callback to check against final rendered content
     - Extract clamp_cursor_position() helper to eliminate code duplication
     - Refactor terminal module to use new buffer cursor helpers
     - Store and restore cursor position when cycling through log commands
     - Update README with terminal configuration section and example usage

     The delay is necessary because nvim_open_term() + nvim_chan_send() have
     asynchronous rendering in the terminal emulator layer. Setting the cursor
     before rendering completes results in the column being reset to 0. Users
     experiencing issues can increase the delay value if needed.
2025-11-25 09:10:12 +01:00
NicolasGB b34e08d815 fix: describe command reopening log buffer without flicker
- Close terminal buffer before opening describe editor
  - Capture log state before closing to detect if we should reopen
  - Add on_unload callback to editor to handle log reopening
  - Suppress redraws during buffer transitions with lazyredraw
  - Remove duplicate hardcoded status keymaps from terminal.lua (were referencing undefined functions)
  - Fix resolve_keymaps_from_specs to validate handlers exist before creating keymaps
2025-11-23 16:34:42 +01:00
NicolasGB f0cfb459bd refactor: create a new buffer module to centralize buffer operation logic 2025-11-23 16:34:42 +01:00
NicolasGB e545d02ceb refactor: restructure the whole plugin following a better separation of concers 2025-11-23 16:34:42 +01:00