Skip to content

Conversation

@NobbZ
Copy link
Owner

@NobbZ NobbZ commented May 25, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Corrected keybinding names for various plugin features to ensure proper recognition and functionality.
    • Improved snippet navigation by allowing fallback to standard tab behavior when no snippet jump is available.
  • Style

    • Standardized keybinding capitalization for better consistency across plugin features.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 25, 2025

Walkthrough

This update modifies key mapping strings in three plugin configuration files. It standardizes capitalization for control and shift keys, updates specific keybindings for Augment and Blink features, and enhances the snippet jump logic to provide fallback behavior when a jump is not possible.

Changes

File(s) Change Summary
plugins/nobbz/lua/nobbz/augment.lua Changed key mapping from "" to "" for Augment completion acceptance.
plugins/nobbz/lua/nobbz/blink.lua Updated key mapping from "" to "" for triggering Blink actions.
plugins/nobbz/lua/nobbz/luasnip.lua Modified stepper to check jumpability before jumping, added fallback key returns, capitalized key names, and set expr = true for relevant mappings.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LuasnipPlugin

    User->>LuasnipPlugin: Press <Tab> or <S-Tab>
    alt Jump is possible
        LuasnipPlugin->>LuasnipPlugin: luasnip.jump(step_size)
    else Jump not possible
        LuasnipPlugin->>User: Return fallback key ("<Tab>" or "<S-Tab>")
    end
Loading

Possibly related PRs

  • augment completion #37: Changes the keybinding string for accepting Augment completions, directly related to the updated key mapping in this PR.
  • hide augment from WK #52: Defines the original "" keybinding for Augment, which is updated in this PR.
  • augment #34: Adds environment variable setup and plugin specification for augment, related to augment.lua configuration and key mappings.

Poem

A hop and a jump, a key remapped,
Control and Shift, now neatly wrapped.
Snippet steps with fallback grace,
Augment and Blink in their right place.
With every press, the mappings sing,
🐇 Hopping through code—let the changes spring!


📜 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 362b4dd and 2c8043d.

📒 Files selected for processing (3)
  • plugins/nobbz/lua/nobbz/augment.lua (1 hunks)
  • plugins/nobbz/lua/nobbz/blink.lua (1 hunks)
  • plugins/nobbz/lua/nobbz/luasnip.lua (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • plugins/nobbz/lua/nobbz/blink.lua
  • plugins/nobbz/lua/nobbz/augment.lua
  • plugins/nobbz/lua/nobbz/luasnip.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 25, 2025 08:54
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 aims to fix the tab key behavior by adjusting snippet navigation and key mapping consistency across various modules.

  • Updated the stepper function in the snippet module to conditionally return a jump or fallback key.
  • Revised key mappings in the blink and augment modules for consistent capitalization.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
plugins/nobbz/lua/nobbz/luasnip.lua Updated stepper function logic and key mapping for tab keys.
plugins/nobbz/lua/nobbz/blink.lua Changed key mapping for documentation toggle to uppercase.
plugins/nobbz/lua/nobbz/augment.lua Updated key mapping capitalization for completion acceptance.

if luasnip.jumpable(step_size) then
luasnip.jump(step_size)
else
return step_size > 0 and "<tab>" or "<s-tab>"
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

The fallback key values in the stepper function are lowercase ('' and '') while the registered key mappings use uppercase ('' and ''). Consider aligning these values for consistency.

Suggested change
return step_size > 0 and "<tab>" or "<s-tab>"
return step_size > 0 and "<Tab>" or "<S-Tab>"

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b57e2f and 362b4dd.

📒 Files selected for processing (3)
  • plugins/nobbz/lua/nobbz/augment.lua (1 hunks)
  • plugins/nobbz/lua/nobbz/blink.lua (1 hunks)
  • plugins/nobbz/lua/nobbz/luasnip.lua (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`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/augment.lua
  • plugins/nobbz/lua/nobbz/blink.lua
  • plugins/nobbz/lua/nobbz/luasnip.lua
🔇 Additional comments (3)
plugins/nobbz/lua/nobbz/augment.lua (1)

37-37: LGTM! Key mapping standardization improves consistency.

The change from "<C-cr>" to "<C-CR>" standardizes the key notation to match Vim's convention where special keys are capitalized. This aligns with similar changes across other plugin files in this PR.

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

44-44: LGTM! Consistent key mapping capitalization.

The change from "<C-space>" to "<C-Space>" follows Vim's standard key notation conventions and maintains consistency with the other key mapping updates in this PR.

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

26-30: LGTM! Key mapping standardization and proper expression handling.

The key mapping updates correctly:

  • Standardize capitalization (<Tab>, <S-Tab>, <C-a>, etc.)
  • Add expr = true for Tab mappings to support the enhanced stepper function's conditional return values
  • Maintain consistent formatting and structure

These changes align perfectly with the standardization effort across the plugin files.

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 fixes Tab key behavior in the Luasnip plugin by falling back to default Tab/S-Tab when no snippet jump is available, and standardizes keybinding capitalization across blink and augment integrations.

  • Added fallback logic in stepper to revert to standard Tab/S-Tab when snippet jumps are unavailable and enabled expr mappings.
  • Updated blink and augment configurations to use consistent capitalized keybinding notation (<C-Space>, <C-CR>).
  • Standardized keymap entries for better consistency across plugins.

Reviewed Changes

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

File Description
plugins/nobbz/lua/nobbz/luasnip.lua Added fallback in stepper, updated keymap entries with expr = true
plugins/nobbz/lua/nobbz/blink.lua Renamed <C-space> to <C-Space> for consistent capitalization
plugins/nobbz/lua/nobbz/augment.lua Standardized <C-cr> to <C-CR> in augment keymap
Comments suppressed due to low confidence (2)

plugins/nobbz/lua/nobbz/luasnip.lua:17

  • The fallback branch for when luasnip.jumpable returns false isn't covered by existing tests. Consider adding tests to ensure that the mapping correctly falls back to the Tab/S-Tab key in those cases.
if luasnip.jumpable(step_size) then

plugins/nobbz/lua/nobbz/blink.lua:44

  • [nitpick] Using uppercase notation for space () may be inconsistent with Neovim keymap conventions; consider using lowercase () or document the choice to maintain consistency across mappings.
["<C-Space>"] = { "show", "show_documentation", "hide_documentation", },

@NobbZ NobbZ merged commit a1da5f6 into main May 25, 2025
3 checks passed
This was referenced Jun 13, 2025
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