Ad

debugprint.nvim: Low-tech debugging for NeoVim

debugprint simplifies debugging by letting you print variable values directly in your code. Insert 'print' statements to trace execution and values, ideal for quick debugging without complex setups.
Screenshot of andrewferrier/debugprint.nvim homepage

debugprint enables debugging in NeoVim by allowing users to insert 'print' statements into their code to inspect variable values during execution. Inspired by vim-debugstring, it provides features like line numbers, file names, and variable detection using Treesitter. This approach is suitable when a full-fledged debugger is not required or desired.

debugprint distinguishes itself through its flexible 'print' statement functionality, integrating with Treesitter for variable detection, optional line highlighting with mini.nvim/mini.hipatterns, and versatile keymappings for different modes (normal, insert, visual, operator-pending). It also offers advanced features such as register output, fzf/telescope/snacks integration for finding and managing debug lines, and support for multiple filetypes.

  • Language Support: Supports 40+ filetypes out-of-the-box, with extensibility options for custom languages.
  • Contextual Information: Provides file names, line numbers, and surrounding code snippets for enhanced debugging context.
  • Variable Detection: Detects variable names using Treesitter for automatic variable value output.
  • Keymappings: Offers keymappings for normal, insert, visual, and operator-pending modes with customizable behavior.
  • Integration: Integrates with fzf-lua, telescope.nvim, and snacks.nvim for efficient management and searching of debug print lines.
  • Configuration: Supports optional dependencies like mini.nvim/mini.hipatterns and fzf-lua for extended functionality and customization.
  • Performance: Optimized to minimize performance impact, especially when using optional features.

debugprint is an actively developed plugin with a history of updates and bug fixes. Recent commits indicate ongoing maintenance and feature development. The issue tracker demonstrates responsiveness to user feedback, suggesting a reliable and evolving tool. The comprehensive documentation and clear README facilitate ease of use and contribution.

debugprint is beneficial for NeoVim users seeking a simple and effective debugging solution. It addresses the need for quick and easy inspection of variable values during code execution, particularly well-suited for scripting and prototyping. It offers a lightweight alternative to complex debugging setups, providing clear value for developers who prioritize simplicity and speed.

Summarize:
Share:
Stars
525
Forks
28
Issues
9
Created
3 years ago
Commit
19 days ago
License
MIT
Archived
No
Updated 17 days ago

Similar Repositories