A Neovim plugin that highlights function argument definitions and usages using Treesitter, with optional highlighting for unused arguments.
hlargs.nvim is a Neovim plugin that highlights function argument definitions and their usages within code. It uses Treesitter to parse and visually distinguish arguments, improving code readability by making scopes and references clearer. It also offers optional highlighting for unused arguments to help identify dead code.
Neovim users who write code in multiple programming languages and want enhanced visual cues for function arguments without relying solely on LSP servers.
Developers choose hlargs.nvim for its fast, Treesitter-based highlighting that works in languages without LSP support, its low performance overhead, and its ability to complement existing LSP semantic tokens.
Highlight arguments' definitions and usages, using Treesitter
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Treesitter for incremental parsing with configurable debouncing, enabling real-time highlighting with minimal CPU impact, as detailed in the performance settings for partial and slow tasks.
Supports over 20 languages including Python, JavaScript, Rust, and Go, making it versatile for polyglot projects without relying on LSP servers.
Optionally highlights arguments that are defined but never used via the 'unused_args' extra, aiding in code cleanup without additional tools.
Can complement or substitute LSP semantic tokens where they are unavailable or insufficient, ensuring highlighting in languages lacking LSP support, as explained in the hlargs vs LSP section.
Partial parsing tasks may occasionally miss argument usages in complex scenarios, as admitted in the performance documentation, requiring slower background tasks for consistency.
Requires manual installation of Treesitter parsers for each supported language using :TSInstall, adding setup steps and potential maintenance burden.
Only compatible with Neovim 0.7+, excluding Vim users and other editor environments, limiting its adoption in mixed-editor teams.
Focuses solely on function argument highlighting, not providing broader semantic token support for other code elements like variables or control structures.