lualine-harpoon.nvim/README.md
2025-05-21 13:27:27 +03:00

1.9 KiB
Raw Blame History

lualine-harpoon.nvim

A tiny Lualine component for ThePrimeagen/harpoon2. Displays your current Harpoon mark as [x/y] in your statusline.

Requirements

Important

Make sure to install harpoon2, not harpoon on master branch.

Installation

Using lazy.nvim

{
  "nvim-lualine/lualine.nvim",
  dependencies = {
    "kristoferssolo/lualine-harpoon.nvim",
    dependencies = {
      { "ThePrimeagen/harpoon", branch = "harpoon2" }
      "nvim-lua/plenary.nvim",
    },
  },
}

Basic Usage

Once installed, simply add "harpoon" to your lualine.setup sections.
Lualine will auto-load lua/lualine/components/harpoon.lua for you:

require("lualine").setup({
  sections = {
    lualine_c = {
      "harpoon",
    },
  },
})

When you have Harpoon marks, youll see an indicator like [2/5] in your statusline.

Default Options

You can pass options directly in your Lualine sections:

require("lualine").setup({
  sections = {
    lualine_c = {
      {
        "harpoon",
        symbol = {
          open = "[",
          close = "]",
          separator = "/",
          unknown = "?",
        },
        icon = "󰀱",
      },
    },
  },
})

Acknowledgments and alternatives

This plugin was inspired by and serves as an alternative to letieu/harpoon-lualine.

License

This project is licensed under the MIT License - see the LICENSE file for details.