Skip to content

Conversation

@NobbZ
Copy link
Owner

@NobbZ NobbZ commented May 26, 2025

Summary by CodeRabbit

  • New Features

    • Added integration and configuration for the "flash" plugin, including key mappings for enhanced navigation.
    • Introduced a new key mapping to toggle the display of virtual diagnostic lines.
  • Removals

    • Removed support and configuration for the "leap" and "precognition" plugins.
  • Updates

    • Upgraded the "nvim-augment" plugin to a newer version.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 26, 2025

Walkthrough

This update replaces the "leap" and "precognition" plugins with the "flash" plugin, updating configuration and key mappings accordingly. The "nvim-augment" plugin is upgraded to v0.31.0. Related configuration files and Lua modules are added, removed, or modified to reflect these plugin changes and to introduce a new diagnostic toggle feature.

Changes

Files/Paths Change Summary
npins/sources.json Upgraded "nvim-augment" to v0.31.0, added "nvim-flash", removed "nvim-leap" and "nvim-precognition" entries.
plugins/default.nix Removed "precognition", replaced "leap" with "flash" in optional plugins list.
plugins/nobbz/lua/nobbz/flash.lua Added configuration and key mappings for the "flash" plugin with lazy-loading.
plugins/nobbz/lua/nobbz/init.lua Switched required submodules: removed "leap" and "precognition", added "flash".
plugins/nobbz/lua/nobbz/leap.lua, plugins/nobbz/lua/nobbz/precognition.lua Removed configuration modules for "leap" and "precognition" plugins.
plugins/nobbz/lua/nobbz/trouble.lua Added a toggle for virtual diagnostic lines with a new function and key mapping.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Neovim
    participant FlashPlugin
    participant TroubleModule

    User->>Neovim: Press "s" or "S" (normal mode)
    Neovim->>FlashPlugin: Load and setup flash.nvim
    FlashPlugin->>Neovim: Provide jump/treesitter navigation

    User->>Neovim: Press <leader>xc
    Neovim->>TroubleModule: Call toggle_virtual_lines()
    TroubleModule->>Neovim: Enable/disable virtual diagnostic lines
Loading

Possibly related PRs

  • update augment #36: Updates the pinned version of "nvim-augment" (from v0.26.0 to v0.27.0), similar to this PR's update to v0.31.0.
  • update 2025-05-19 #65: Also modifies the pinned version of "nvim-augment" and other plugins, showing a pattern of plugin version maintenance.
  • augment #34: Introduces initial support and configuration for the "augment" plugin, related by plugin integration and setup.

Poem

Hopping through code with a flash of delight,
Old leaps and predictions now out of sight.
A toggle for lines, a jump to new heights,
Plugins refreshed for smoother nights.
With every update, this bunny’s heart sings—
Here’s to the joy that new features bring!
🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db91926 and fedef72.

📒 Files selected for processing (1)
  • plugins/nobbz/lua/nobbz/trouble.lua (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/nobbz/lua/nobbz/trouble.lua
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@NobbZ NobbZ requested a review from Copilot May 26, 2025 20:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR streamlines the plugin configuration by replacing the deprecated precognition and leap plugins with a new flash module and introduces a convenience function to toggle virtual diagnostic lines in Trouble. Key changes include:

  • Adding a toggle function for virtual diagnostic lines in Trouble.
  • Removing the precognition and leap plugins.
  • Introducing the flash module and updating corresponding configuration files (init.lua, default.nix, and npins/sources.json).

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugins/nobbz/lua/nobbz/trouble.lua New toggle function for virtual diagnostic lines added.
plugins/nobbz/lua/nobbz/precognition.lua Removal of the precognition plugin code.
plugins/nobbz/lua/nobbz/leap.lua Removal of the leap plugin code.
plugins/nobbz/lua/nobbz/init.lua Updated module list to remove deprecated plugins and add flash.
plugins/nobbz/lua/nobbz/flash.lua New flash plugin configuration with related keybindings.
plugins/default.nix Configuration updated to disable removed plugins and enable flash.
npins/sources.json Updated source information for relevant plugins.

@@ -1,10 +1,18 @@
local virtual_lines = false

function toggle_virtual_lines()
Copy link

Copilot AI May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a brief inline comment above this function to explain its purpose and behavior for future maintainability.

Copilot uses AI. Check for mistakes.
after = function()
local flash = require("flash")

flash.setup({})
Copy link

Copilot AI May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider documenting the rationale for using an empty configuration object here, or add comments explaining how users can extend the flash setup if needed.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (2)
plugins/nobbz/lua/nobbz/init.lua (2)

3-3: 🛠️ Refactor suggestion

Use local for variable declarations per coding guidelines.

The WK variable should be declared as local to follow the coding guidelines requirement.

-WK = require("which-key")
+local WK = require("which-key")

5-12: 🛠️ Refactor suggestion

Use local for variable declarations per coding guidelines.

The LSP_CAPAS variable should be declared as local to follow the coding guidelines requirement.

-LSP_CAPAS = require("blink.cmp").get_lsp_capabilities({
+local LSP_CAPAS = require("blink.cmp").get_lsp_capabilities({
🧹 Nitpick comments (1)
plugins/nobbz/lua/nobbz/trouble.lua (1)

1-6: Consider making the toggle function more robust.

The virtual lines toggle function could be improved by checking the current diagnostic configuration state instead of maintaining a separate boolean variable.

-local virtual_lines = false
-
-local function toggle_virtual_lines()
-  virtual_lines = not virtual_lines
-  vim.diagnostic.config({ virtual_lines = virtual_lines, })
-end
+local function toggle_virtual_lines()
+  local current_config = vim.diagnostic.config()
+  local new_state = not current_config.virtual_lines
+  vim.diagnostic.config({ virtual_lines = new_state })
+end
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1da5f6 and db91926.

📒 Files selected for processing (7)
  • npins/sources.json (2 hunks)
  • plugins/default.nix (1 hunks)
  • plugins/nobbz/lua/nobbz/flash.lua (1 hunks)
  • plugins/nobbz/lua/nobbz/init.lua (1 hunks)
  • plugins/nobbz/lua/nobbz/leap.lua (0 hunks)
  • plugins/nobbz/lua/nobbz/precognition.lua (0 hunks)
  • plugins/nobbz/lua/nobbz/trouble.lua (1 hunks)
💤 Files with no reviewable changes (2)
  • plugins/nobbz/lua/nobbz/precognition.lua
  • plugins/nobbz/lua/nobbz/leap.lua
🧰 Additional context used
📓 Path-based instructions (2)
`plugins/default.nix`: Please ensure all of the following: - Plugins are sorted alphabetically - there will be no further plugins added to the first section in the `optionalPlugins...

plugins/default.nix: Please ensure all of the following:

  • Plugins are sorted alphabetically
  • there will be no further plugins added to the first section in the optionalPlugins set
  • plugins/default.nix
`plugins/**/*.lua`: Please ensure all of the following: - Plugins are lazyloaded if possible through `nobbz.lazy` - `local` has to be used - coding follows the [luarocks styleguide...

plugins/**/*.lua: Please ensure all of the following:

  • Plugins are lazyloaded if possible through nobbz.lazy
  • local has to be used
  • coding follows the luarocks styleguide, but with 2 spaces indentation
  • plugins/nobbz/lua/nobbz/init.lua
  • plugins/nobbz/lua/nobbz/trouble.lua
  • plugins/nobbz/lua/nobbz/flash.lua
🔇 Additional comments (6)
plugins/nobbz/lua/nobbz/init.lua (1)

34-55: LGTM! Plugin module loading correctly updated.

The replacement of "leap" with "flash" and removal of "precognition" aligns with the plugin changes. The module requires are properly organized and use the correct relative require helper function.

plugins/default.nix (1)

41-41: LGTM! Plugin configuration correctly updated and maintains alphabetical order.

The flash plugin is properly positioned in alphabetical order within the optional plugins section, following the coding guidelines.

plugins/nobbz/lua/nobbz/trouble.lua (1)

15-15: LGTM! Key mapping properly configured.

The key mapping for the virtual lines toggle is correctly configured with a descriptive label.

plugins/nobbz/lua/nobbz/flash.lua (1)

1-17: LGTM! Flash plugin correctly configured with lazy loading.

The plugin configuration follows all coding guidelines:

  • Properly uses nobbz.lazy for lazy loading
  • Uses local keyword for variable declarations
  • Follows 2-space indentation
  • Correctly configures key mappings with descriptive labels
  • Plugin loads only when the mapped keys are pressed
npins/sources.json (2)

53-57: Approve version bump for nvim-augment
Upgrading nvim-augment to v0.31.0 with updated revision, url, and hash aligns with the plugin upgrade in your Lua modules. Ensure any breaking changes in v0.31.0 are reflected in the plugin’s configuration or usage.


97-109: Verify new pin for nvim-flash
The nvim-flash entry is added correctly. Before merging, please confirm that:

  1. The revision matches the commit referenced in your Lua setup (plugins/nobbz/lua/nobbz/flash.lua).
  2. The url and hash correspond to that exact tarball to prevent fetch errors in Nix.

@NobbZ NobbZ requested a review from Copilot May 26, 2025 20:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors plugin configurations by removing deprecated "leap" and "precognition" support, adds a new flash-based motion plugin, and introduces a key mapping to toggle virtual diagnostic lines.

  • Add flash plugin spec with key mappings for jump and treesitter navigation.
  • Introduce toggle_virtual_lines() in trouble.lua and map it to <leader>xc.
  • Remove leap and precognition plugin configs and bump augment.vim to v0.31.0.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugins/nobbz/lua/nobbz/trouble.lua Add toggle_virtual_lines function and map <leader>xc.
plugins/nobbz/lua/nobbz/precognition.lua Remove precognition plugin file.
plugins/nobbz/lua/nobbz/leap.lua Remove leap plugin file.
plugins/nobbz/lua/nobbz/init.lua Update startup calls: add flash, remove leap/precognition.
plugins/nobbz/lua/nobbz/flash.lua Add flash plugin spec and WhichKey mappings.
plugins/default.nix Enable flash, disable precognition.
npins/sources.json Bump augment.vim, add nvim-flash, remove leap/precognition.

@NobbZ NobbZ merged commit 104fb5d into main May 26, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants