Giter Club home page Giter Club logo

harpoon-lualine's Introduction

Harpoon Lualine Plugin

Screenshot 2024-03-15 at 12 47 08 PM

Add a harpoon indicator to your Neovim Lualine!

Features:

Installation:

  • With lazy.nvim
  {
    "letieu/harpoon-lualine",
    dependencies = {
      {
        "ThePrimeagen/harpoon",
        branch = "harpoon2",
      }
    },
  }
  • With packer.nvim
  use {
    'letieu/harpoon-lualine',
    opt = false,
    requires = {{'ThePrimeagen/harpoon'}}
  }

Usage:

Add this to your Lualine setup:

lualine_c = { "harpoon2" },

Custom config

lualine_c = { 'another_item', {
  "harpoon2",
  icon = '',
  indicators = { "a", "s", "q", "w" },
  active_indicators = { "A", "S", "Q", "W" },
  _separator = " ",
  no_harpoon = "Harpoon not loaded",
},

How I use harpoon 💡

Bind harpoon mark to a, s, q, w and use Ctrl + a, s, q, w to jump to the mark.

vim.keymap.set("n", "<C-a>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<C-q>", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<C-w>", function() harpoon:list():select(4) end)

View current marks with lualine

lualine_c = { 
  '%=', -- make the indicator center
  {
    "harpoon2",
    indicators = { "a", "s", "q", "w" },
    active_indicators = { "A", "S", "Q", "W" },
    _separator = " ",
  }
}

Enjoy!

Note: Customize indicator characters by editing the configuration.

Note: To center the indicator, add a %=. For example: lualine_c = { "%=", "harpoon2"},

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Taken
Taken

💻
Le Tieu
Le Tieu

🚧 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

harpoon-lualine's People

Contributors

letieu avatar allcontributors[bot] avatar takenmc avatar simachri avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.