A dynamic and stylized foldtext plugin for Neovim, offering per-window customization and automatic updates.
Foldtext.nvim is a Neovim plugin that enhances how folded code blocks are displayed in the editor. It replaces the default fold text with customizable, stylized representations that can include syntax highlighting, fold sizes, descriptions, and indentation. The plugin solves the problem of bland and uninformative fold displays by offering dynamic, context-aware foldtext that updates automatically and can be tailored per window.
Neovim users who frequently work with folded code and want more informative and visually distinct fold indicators, particularly those who customize their editor extensively with Lua configurations.
Developers choose Foldtext.nvim for its combination of high performance, per-window customization, and modular parts system, allowing deep integration with Neovim's folding mechanics without sacrificing speed or flexibility.
Dynamic & stylized foldtext for Neovim
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Loads in approximately 1ms, minimizing impact on Neovim startup time, as explicitly stated in the README under features.
Allows separate foldtext configurations for different windows, enabling context-aware displays based on filetype or buffer type for tailored visual feedback.
Provides built-in components like bufline and fold_size that can be combined and toggled, offering flexibility in building foldtext without reinventing the wheel.
Updates foldtext automatically when key options like filetype or foldmethod change, ensuring consistency without manual intervention, as highlighted in the README.
Version 2.0.0 introduced significant API changes, requiring migration efforts for existing users, as detailed in the migration section with deprecated parts and option renames.
Setting up custom styles demands writing Lua code and understanding the parts system, which can be steep for users unfamiliar with Neovim's Lua API or modular plugins.
The plugin is designed exclusively for Neovim and does not support Vim or other editors, restricting its use in mixed or legacy editor environments.