feat: Add optional Neovim diagnostics to context#15
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds optional Neovim diagnostics support to pi.nvim's context handling. A new Sequence Diagram(s)sequenceDiagram
participant EditorCmd as :PiAsk / :PiAskSelection
participant get_context as M.get_buffer_context / M.get_visual_context
participant diagnostics_block as diagnostics_block
participant vim_diagnostic as vim.diagnostic
participant parts as prompt_parts
EditorCmd->>get_context: request context (bufnr, selection?)
get_context->>diagnostics_block: call with bufnr, config (and range if visual)
diagnostics_block->>vim_diagnostic: fetch diagnostics for bufnr
diagnostics_block->>diagnostics_block: filter by range, map severity, format block
diagnostics_block->>parts: append diagnostics block (if enabled & non-empty)
get_context->>EditorCmd: return assembled prompt context
Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
- Enable sending LSP/linter diagnostics via config - Filter diagnostics to selection for PiAskSelection - Add validation and documentation for new option
|
great idea! I might introduce a |
Summary by CodeRabbit
New Features
Documentation
Bug Fixes / Validation
Tests