Commit Graph
18 Commits
Author SHA1 Message Date
NicolasGB 3c66dc6fdb fix(readme): Rewrite it for clarity and hopefully better highlighting of
what jj.nvim is able to do
2026-02-24 18:18:59 +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