-
Notifications
You must be signed in to change notification settings - Fork 4
some convinience things #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis 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
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
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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. |
plugins/nobbz/lua/nobbz/trouble.lua
Outdated
| @@ -1,10 +1,18 @@ | |||
| local virtual_lines = false | |||
|
|
|||
| function toggle_virtual_lines() | |||
Copilot
AI
May 26, 2025
There was a problem hiding this comment.
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.
| after = function() | ||
| local flash = require("flash") | ||
|
|
||
| flash.setup({}) |
Copilot
AI
May 26, 2025
There was a problem hiding this comment.
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.
There was a problem hiding this 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 suggestionUse
localfor variable declarations per coding guidelines.The
WKvariable should be declared aslocalto follow the coding guidelines requirement.-WK = require("which-key") +local WK = require("which-key")
5-12: 🛠️ Refactor suggestionUse
localfor variable declarations per coding guidelines.The
LSP_CAPASvariable should be declared aslocalto 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
📒 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
optionalPluginsset
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.lazylocalhas to be used- coding follows the luarocks styleguide, but with 2 spaces indentation
plugins/nobbz/lua/nobbz/init.luaplugins/nobbz/lua/nobbz/trouble.luaplugins/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
flashplugin 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.lazyfor lazy loading- Uses
localkeyword 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
Upgradingnvim-augmentto v0.31.0 with updatedrevision,url, andhashaligns 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
Thenvim-flashentry is added correctly. Before merging, please confirm that:
- The
revisionmatches the commit referenced in your Lua setup (plugins/nobbz/lua/nobbz/flash.lua).- The
urlandhashcorrespond to that exact tarball to prevent fetch errors in Nix.
There was a problem hiding this 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
flashplugin spec with key mappings for jump and treesitter navigation. - Introduce
toggle_virtual_lines()introuble.luaand map it to<leader>xc. - Remove
leapandprecognitionplugin configs and bumpaugment.vimto 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. |
Summary by CodeRabbit
New Features
Removals
Updates