A Neovim plugin that displays the current code context (function, class, etc.) at the top of the window using Tree-sitter.
nvim-treesitter-context is a Neovim plugin that displays the current code context (such as function or class definitions) in a floating window at the top of the editor. It uses Tree-sitter for accurate syntax parsing to show relevant scope information, helping developers stay oriented while navigating large code files.
Neovim users who work with multiple programming languages and need better visibility of code structure, especially when dealing with long files or complex nested scopes.
It provides a lightweight, language-agnostic way to see code context without switching buffers or scrolling, improving productivity and reducing cognitive load during development.
Show code context
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with over 100 programming languages via Tree-sitter parsers, including popular ones like Python and JavaScript, as listed in the README, making it versatile for multi-language projects.
Offers configurable colors, line numbers, separators, and window size, allowing users to match their editor theme and preferences, detailed in the Configuration and Appearance sections.
Designed as a minimal alternative to context.vim, focusing on simplicity and avoiding bloat, which aligns with its stated philosophy of being non-intrusive.
Includes a mapping to jump upwards to parent context, enhancing code navigation without excessive scrolling, as shown in the README's jump-to-context example.
Relies on Tree-sitter parsers that are community-maintained; the README explicitly warns that support for specific languages can break as parsers update, leading to inconsistent functionality.
Requires nvim-treesitter for non-default language parsers, adding an extra installation step and potential configuration complexity, which might deter users seeking plug-and-play solutions.
Only works with Neovim (version >= 0.9.0), excluding users of Vim or other editors, and even within Neovim, older versions need a compatibility tag, fragmenting support.
nvim-treesitter-context is an open-source alternative to the following products: