Skip to content

qrikko/pin.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pin.nvim

A plugin for pinning visual selection or tree-sitter nodes. Pins are kept visible so that you can still view them while comparing one part of a file to another for example. Editing within a pin is seemless and integrated as portals to the main buffer giving a good flow.

image

📌 Features

  • ✓ Customizable icons, foreground color and background color for the states:
    • locked 🔒
    • unlocked 🔓
    • pinned 📌
  • ✓ Customizable keybindings for:
    • 🌳 Pin tree sitter node
    • 👀 Pin visual selection
    • 🖈 Remove current pin
    • 🗑 Remove all pins
    • 🔢 Remove pin interactively
    • ⎘ Jump to next pin
    • ⎗ Jump to previous pin
    • 🔢 Jump to pin interactively
  • ✓ Editible pins and a good flow working with pins

📦 Installation

Install the plugin with your preferred package manager:

lazy.nvim:

{
    "qrikko/pin.nvim",
    config = function()
    end
}

⚙️ Configuration

These are the default config which all should be overridable in your config
{
  winblend = 50,
  border = 'none', -- none, single, double, rounded, solid, shadow
  max_height = 15,
  keymaps = {
      pin_ts              = '<leader>ss',
      pin_visual          = '<leader>ss',
      clear_all_pins      = '<leader>sx',
      pin_pop             = '<leader>sp',
      pin_remove          = '<leader>sd',
      focus_next          = '<leader>sn',
      focus_prev          = '<leader>sp',
      focus_pin           = '<leader>sg'
  },
  symbol = {
      locked = {
          bg = "#11071b",
          fg = "#ff995f",
          sym = "󰌾 ",
          bold = true,
          winhighlight = "Normal:pinvim_window_locked,FloatBorder:pinvim_window_locked",

      },
      unlocked = {
          bg = "#0a0014",
          fg = "#ff995f",
          sym = "󰿆 ",
          bold = true,
          winhighlight = "Normal:pinvim_window_unlocked,FloatBorder:pinvim_window_unlocked"
      },
      pinned = {
          bg = "#2e2439",
          fg = "#ff995f",
          sym = "",
          bold = true,
          winhighlight = "Normal:pinvim_window_pinned,FloatBorder:pinvim_window_pinned"
      },
  },
  backdrop = {
      bg = "#000000",
      alpha = 40
  },
}

About

neovim plugin to temporarily pin visual selection or tree-sitter nodes while comparing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages