Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Neovim
  3. nvim-origami

nvim-origami

MITLua

A Neovim plugin providing elegant folding features with LSP/Treesitter integration, fold decorations, and intuitive keymaps.

GitHubGitHub
521 stars17 forks0 contributors

What is nvim-origami?

nvim-origami is a Neovim plugin that enhances code folding with intelligent features like LSP/Treesitter integration, visual fold decorations, and intuitive keymap overrides. It solves the problem of clunky folding workflows by providing a more elegant and efficient way to navigate folded code sections.

Target Audience

Neovim users who work with large codebases and want improved folding functionality, particularly developers using LSP and Treesitter for code analysis.

Value Proposition

Developers choose nvim-origami because it replaces heavier alternatives like nvim-ufo with a more lightweight solution while adding unique features like search-aware folding and decorative fold text with diagnostics and git integration.

Overview

Fold with relentless elegance. A collection of quality-of-life features related to folding.

Use Cases

Best For

  • Improving code navigation in large Neovim projects
  • Adding visual fold decorations with line counts and diagnostics
  • Replacing traditional fold commands with intuitive movement keymaps
  • Automatically folding comments and imports on file open
  • Maintaining fold state during search operations
  • Integrating LSP and Treesitter for smarter folding ranges

Not Ideal For

  • Users heavily invested in nvim-ufo or other comprehensive folding plugins seeking a drop-in replacement
  • Projects without LSP setup where advanced folding like auto-fold for comments/imports is desired
  • Developers who prefer not to override default movement keys like h and l for folding operations
  • Teams relying on formatting tools that don't preserve folds, as most plugins disrupt fold state

Pros & Cons

Pros

Smart Folding Integration

Prioritizes LSP for folding data with Treesitter fallback, ensuring accurate fold ranges based on code structure rather than just indentation.

Informative Fold Decorations

Enhances folds with line counts, diagnostics, and git changes via gitsigns.nvim, providing visual context without breaking syntax highlighting.

Intuitive Keymap Overrides

Overloads h, l, ^, and $ to fold/unfold recursively, replacing clunky z-commands with natural movements for faster navigation.

Search-Aware Fold Management

Pauses folds during search operations and restores them afterward, preventing folds from staying open unintentionally.

Cons

Plugin Incompatibility

Explicitly incompatible with nvim-ufo, forcing users to choose between folding solutions and potentially migrate existing setups.

LSP Dependency for Key Features

Auto-fold for comments and imports only works with LSP support, limiting functionality in environments without language servers.

Formatting Disruption

Folds are often opened after running most formatters, a known issue that requires specific tools like efm-language-server or conform.nvim to mitigate.

Frequently Asked Questions

Quick Stats

Stars521
Forks17
Contributors0
Open Issues3
Last commit18 days ago
CreatedSince 2023

Tags

#vimscript#treesitter#productivity#plugin-management#neovim-plugin#editor-enhancement#lsp-integration#nvim-plugin#keymaps#code-folding

Built With

N
Neovim
L
Lua

Included in

Neovim20.6k
Auto-fetched 18 hours ago

Related Projects

nvim-ufonvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.

Stars2,939
Forks69
Last commit6 months ago
fold-cycle.nvimfold-cycle.nvim

This neovim plugin allows you to cycle folds open or closed

Stars92
Forks3
Last commit10 months ago
inline-fold.nviminline-fold.nvim

A neovim version of the inline fold plugin

Stars89
Forks2
Last commit2 years ago
commentless.nvimcommentless.nvim

Hide comments, focus on the code flow, and reveal them if needed 🧘

Stars43
Forks2
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub