Commit Graph
35 Commits
Author SHA1 Message Date
NicolasGB 8c6a656810 fix(readme): Update default config following structure changes 2026-01-02 19:00:45 +01:00
NicolasGB 4b8d4130ff readme: Improve readme with a Table of contents 2026-01-02 18:57:35 +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
NicolasGB 0dea8bfd5a readme: update it with annotate info 2025-12-29 20:53:05 +01:00
Nicolas GBandGitHub 6eb41f631e Feat: Annotation by file and line (#55) 2025-12-29 11:46:35 -08:00
NicolasGB be8cacae9d fix(readme): Mention correct default keybind for opening a pr 2025-12-19 17:02:49 +10:00
NicolasGB 1fd8faed4b feat(bookmark): add prefix configuration for bookmark creation
- Add `prefix` option to `bookmark_create()` function for setting default bookmark names
- Add `bookmark.prefix` configuration option for global bookmark prefix defaults
- Update README with bookmark prefix usage examples
2025-12-18 19:43:36 +10:00
NicolasGB ddfd6e0b56 fix(readme): Fix broken identation 2025-11-27 22:11:49 +01: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 8350606dab feat(cmd): add platform-agnostic PR/MR opening functionality 2025-11-27 20:58:34 +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 10c611eaab feat: add close_on_edit config for log buffer (#48)
- Add close_on_edit option to close log buffer after editing a change (default: false)
- Rename handle_log_enter to handle_log_edit with close_on_exit parameter
- Update log keymaps to pass close_on_edit config to handlers
- Update config types and defaults in init.lua
2025-11-26 15:48:56 +01:00
NicolasGB a9f0ca0031 fix: update readme with correct module initialization for the lua api 2025-11-25 18:10:47 +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 e78c35846a BREAKING: Complete restructuring of plugin architecture and configuration. Please check the new readme to update your config if needed. Lua api remains unchanged 2025-11-23 16:37:35 +01:00
NicolasGB be925a9882 Update README with new config structure
- Document describe.editor configuration for type and keymaps
- Document keymaps configuration for log, status, and close keybindings
- Update examples to show the new nested config structure
- Add section on customizing describe editor keymaps
- Preserve multiline descriptions in describe editor buffer
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
fautoreandNicolas GB eb29992d01 fix(README.md): Fix "JJ log all" revisions to "'all()'" to support jj 0.35.0; 2025-11-19 16:23:50 +01:00
SpiegieandGitHub 9446ad8f69 Feat: edit mutable changes in log buffer (#30) 2025-11-19 16:21:37 +01:00
NicolasGB 84ba77a8fc fix(log): Add u/r keymaps for undoing and redoing operations on log buffer. 2025-11-18 14:33:16 +01:00
NicolasGB 10c9a07ad7 Refactor M.j() command dispatch to use handler table
- Replace nested if/elseif chains with dispatch table for cleaner pattern matching
- Store remaining_args_str to avoid repeated table.concat() calls
- Simplify whitespace trimming using vim.trim() instead of gsub patterns
- Add state.buf_cmd tracking to store subcommand on successful execution for conditional UI refreshes
- Clean up state on buffer close and execution failure
- Add conditional log refresh for squash(), undo(), and redo() when log buffer is active
- Fix type annotations for nil handling
2025-11-18 14:04:21 +01:00
NicolasGB fcc0f56fa6 docs: Add new docs for the keymaps in the log buffer 2025-11-18 14:00:34 +01:00
Andrew HalberstadtandGitHub 730f4cd09e docs: reference proper cmd module in example config (#7) 2025-10-28 09:09:07 +01:00
Eric BowerandGitHub 84b53215b3 feat: :J desc short hand for describe (#12) 2025-10-23 09:02:25 +02:00
ea4fa1ff06 Change the :J describe behaviour to open an editable buffer instead of an input box (#6)
Co-authored-by: fautore <fautore@protonmail.com>
2025-10-02 09:43:04 +02:00
NicolasGB b8eb856228 fix: Use show command instead of diff on log panel 2025-07-15 11:13:03 +02:00
NicolasGB 1fa03217f1 feat: Add d keybind in log output to diff a change on a floating window 2025-07-08 18:28:07 +02:00
NicolasGB b6def1df67 feat(picker): Add file history picker 2025-07-03 21:46:24 +02:00
NicolasGB 854ee40ce0 feat(new): Allow passing arguments to through the cli and add better UX flow on lua api 2025-07-02 18:12:26 +02:00
NicolasGB b258574092 feat(picker): Add a snacks picker with jj status command 2025-06-30 17:42:54 +02:00
NicolasGB a5b27fcb1b fix: correctly display video in readme 2025-06-27 19:04:26 +02:00
NicolasGB fd691bf4ed fix: use correct video url for demo 2025-06-27 18:57:39 +02:00
NicolasGB e43c665441 refactor: Expose a j function to allow the user to call custom subcommands through lua api 2025-06-27 18:56:12 +02:00
NicolasGB 82bf613b74 feat(readme): Improve readme 2025-06-27 13:58:52 +02:00
NicolasGB 5df7f4f0e5 feat: Initial commit with basic commands and first functionalities 2025-06-24 17:57:55 +02:00