harpoon/HARPOON2.md

1.8 KiB

Features

  • select how to generate the list key

was

list_key = [cwd [+ git branch]]

  • files
  • terminals
  • tmux

is

list_key = [key] + [list_name]

nil = default false = turn off

listA = { listLine({ ... }) { ... } { ... } { ... } }

harpoon.setup({

settings = {
    jumpToFileLocation: boolean => defaults true
}

default = {
    // defaults to json.parse
    encode = function(obj) => string
    decode = function(string) => object
    key = function() ... end
    display = function(listLine) => string
    select = function(listLine) => void
    equals = function(list_line_a, list_line_b) => boolean

    # question mark: what does it take to support custom things in here?
    # potentially subject to change
    add = function() HarpoonListItem
}

frecency = {
    ... a file list that is generated by harpoon ...
    ... can be opened via viewer ...
}

events = {
    on_change = function(operation, list, value)
}

project = {
    //key = vim.loop.cwd
    key = git origin?
}

specifics = {
    key = vim.loop.cwd + git_branch
}

list_name = {
    key = function() ... end
}

})

Functionality

select by index prev/next addToBack addToFront checking for deleted files?

  • perhaps this could be part of the default select operation and use error select
  • default file select should come with options so you can open split/tab as well

harpoon.current = "default" harpoon.current = "listName"

harpoon.set_current(list_name)

LATER FEATUERS

frecency = later feature likely, but great idea

// i don't understand this one harpoon -> qfix : qfix -> harpoon

harpoon.list("notehu") -> HarpoonList harpoon.list().add()