SkillAgentSearch skills...

Lensline.nvim

Modular nvim codelens support with inline references, git blame and more

Install / Use

/learn @oribarilan/Lensline.nvim
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center">

lensline.nvim

A status bar for your functions

Neovim v0.8.3 Neovim stable

<p>

Neovim

<a href="https://github.com/oribarilan/lensline.nvim/releases/latest"> <img alt="Latest release" src="https://img.shields.io/github/v/release/oribarilan/lensline.nvim?style=for-the-badge&logo=rocket&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41&include_prerelease&sort=semver" /> </a> <a href="https://github.com/LazyVim/LazyVim/blob/main/LICENSE"> <img alt="License" src="https://img.shields.io/github/license/oribarilan/lensline.nvim?style=for-the-badge&logo=googledocs&color=ee999f&logoColor=D9E0EE&labelColor=302D41" /> </a> <a href="https://github.com/oribarilan/lensline.nvim"> <img alt="Repo Size" src="https://img.shields.io/github/repo-size/oribarilan/lensline.nvim?color=%23DDB6F2&label=SIZE&logo=hackthebox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41"/> </a> <a href="https://search.nixos.org/packages?channel=25.11&show=vimPlugins.lensline-nvim"> <img alt="Nixpkgs" src="https://img.shields.io/badge/nixpkgs-lensline.nvim-blue?style=for-the-badge&logo=nixos&logoColor=D9E0EE&labelColor=302D41"/> </a> </p> </div>

💡 What is lensline?

A lightweight Neovim plugin that displays customizable, contextual information directly above (or beside) functions, like references and authorship.

<p align="center"> <img alt="lensline demo" src="https://github.com/user-attachments/assets/40235fbf-be12-4f35-ad57-efe49aa244e2" width="50%" /> </p>

🎯 Why use lensline?

  • 🔍 Glanceable insights: Instantly see relevant context such as references, git authorship, and complexity, shown right above the function you’re working on.
  • 🧘 Seamless & distraction-free: Lenses appear automatically as you code, blending into your workflow without stealing focus or requiring interaction.
  • 🧩 Modular & customizable: Lens attributes are independent and configurable. Choose which ones to use, arrange them how you like, and customize their appearance, or define your own.

📦 Install

We recommend using a specific tagged release (tag = '2.0.0') for stability, or the release/2.x branch to receive the latest non-breaking updates.

<a href="https://github.com/oribarilan/lensline.nvim/releases/latest"> <img alt="Latest release" src="https://img.shields.io/github/v/release/oribarilan/lensline.nvim?style=for-the-badge&logo=rocket&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41&include_prerelease&sort=semver" /> </a>

Or

<a href="https://github.com/oribarilan/lensline.nvim/tree/release/2.x"> <img alt="Branch release/2.x" src="https://img.shields.io/static/v1?label=Branch&message=release/2.x&style=for-the-badge&logo=git&color=C9CBFF&labelColor=302D41&logoColor=D9E0EE" /> </a>

Using lazy.nvim:

{
  'oribarilan/lensline.nvim',
  tag = '2.0.0', -- or: branch = 'release/2.x' for latest non-breaking updates
  event = 'LspAttach',
  config = function()
    require("lensline").setup()
  end,
}

Or with any other plugin manager:

<details> <summary><strong>vim-plug</strong></summary>
Plug 'oribarilan/lensline.nvim', { 'tag': '2.0.0' }

or

Plug 'oribarilan/lensline.nvim', { 'branch': 'release/1.x' }
</details> <details> <summary><strong>packer.nvim</strong></summary>
use {
    'oribarilan/lensline.nvim',
    tag = '2.0.0', -- or: branch = 'release/2.x' for latest non-breaking updates
}
</details> <details> <summary><strong>Nix / NixOS</strong></summary>

lensline.nvim is available in nixpkgs as vimPlugins.lensline-nvim.

# In your Neovim configuration
programs.neovim = {
  plugins = [
    pkgs.vimPlugins.lensline-nvim
  ];
};
</details>

⚙️ Configure

lensline.nvim works out of the box with sensible defaults. You can customize it to your liking either with simple configuration or by writing custom providers.

<details> <summary><strong>Default Configuration</strong></summary>

Note: This configuration is for the actively developed release. For v2.x configuration docs, see the v2.x branch documentation.

{
  'oribarilan/lensline.nvim',
  event = 'LspAttach',
  config = function()
    require("lensline").setup({
      -- Profile configuration (first profile used as default)
      -- Note: omitting 'providers' or 'style' in a profile inherits defaults
      -- You can also override just specific properties (e.g., style = { placement = "inline" })
      profiles = {
        {
          name = "default",
          providers = {  -- Array format: order determines display sequence
            {
              name = "usages",
              enabled = true,       -- enable usages provider by default (replaces references)
              include = { "refs" }, -- refs-only setup to match references provider behavior
              breakdown = true,     -- false = aggregate count, true = breakdown by type
              show_zero = true,     -- show zero counts when LSP supports the capability
              labels = {
                refs = "refs",
                impls = "impls",
                defs = "defs",
                usages = "usages",
              },
              icon_for_single = "󰌹 ",  -- icon when only one attribute or aggregate display
              inner_separator = ", ",   -- separator between breakdown items
            },
            {
              name = "last_author",
              enabled = true,         -- enabled by default with caching optimization
              cache_max_files = 50,   -- maximum number of files to cache blame data for (default: 50)
            },
            -- additional built-in or custom providers can be added here
          },
          style = {
            separator = " • ",      -- separator between all lens attributes
            highlight = "Comment",  -- highlight group for lens text
            prefix = "┃ ",         -- prefix before lens content
            placement = "above",    -- "above" | "inline" - where to render lenses (consider prefix = "" for inline)
            use_nerdfont = true,    -- enable nerd font icons in built-in providers
            render = "all",         -- "all" | "focused" (only active window's focused function)
          }
        }
        -- You can define additional profiles here and switch between them at runtime
        -- , {
        --   name = "minimal",
        --   providers = { { name = "diagnostics", enabled = true } },
        --   style = { render = "focused" }
        -- }
      }
      -- global settings (apply to all profiles)
      limits = {
        -- exclude = {
            -- file patterns that lensline will not process for lenses
            -- see config.lua for extensive list of default patterns
        -- },
        exclude_append = {},       -- additional patterns to append to exclude list (empty by default)
        exclude_gitignored = true,  -- respect .gitignore by not processing ignored files
        max_lines = 1000,          -- process only first N lines of large files
        max_lenses = 70,          -- skip rendering if too many lenses generated
      },
      debounce_ms = 500,        -- unified debounce delay for all providers
      focused_debounce_ms = 150, -- debounce delay for focus tracking in focused mode
      silence_lsp = true,       -- suppress noisy LSP log messages (e.g., Pyright reference spam)
      debug_mode = false,       -- enable debug output for development, see CONTRIBUTE.md
    })
  end,
}
</details>

Style Customizations

<details> <summary><strong>Minimalistic</strong> - Inline rendering with focused mode</summary>

For a more subtle, distraction-free experience, try this minimal configuration that renders lenses inline with your code and only shows them for the currently focused function:

<p align="center"> <img alt="lensline minimal style" src="https://github.com/user-attachments/assets/9061c1e6-f43b-4fef-9c59-96376417629a" width="70%" /> </p>
{
  'oribarilan/lensline.nvim',
  branch = 'release/2.x',
  event = 'LspAttach',
  config = function()
    require('lensline').setup {
      profiles = {
        {
          name = 'minimal',
          style = {
            placement = 'inline',
            prefix = '',
            -- render = "focused", optionally render lenses only for focused function
          },
        },
      },
    }
  end,
}
</details>

Lens Attribute Customization

Design Philosophy

<details>

lensline takes an opinionated approach to defaults while prioritizing extensibility over configuration bloat:

  • Opinionated defaults: Built-in providers to commonly-used functionality inspired by popular IDEs (VSCode, JetBrains) - reference counts & git blame info
  • Extension over configuration: Provider expose a minimal set of configs. For customization, lensline encourages writing custom providers

This design keeps the plugin lightweight while enabling unlimited customization. The provider based approach scales better than trying to support everything through configuration.

</details>

Built-in Providers

<details> <summary><strong>usages Provider</strong> - LSP symbol usage</summary>

Provider Name: usages

Events: LspAttach, BufWritePost

What it shows: Information about symbol usage via LSP - references,

Related Skills

View on GitHub
GitHub Stars271
CategoryCustomer
Updated14d ago
Forks2

Languages

Lua

Security Score

100/100

Audited on Mar 12, 2026

No findings