Skip to content

jake-stewart/vmark.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

vmark.nvim

Descriptive, persistent marks in Neovim with quickfix list capability.

vmark

Example Config (lazy.nvim)

{
    "jake-stewart/vmark.nvim",
    event = "BufRead",
    config = function()
        local vmark = require("vmark")

        vmark.setup({
            format = function(details)
                -- see `:h nvim_buf_set_extmark()` for configuration options
                return {
                    virt_text = {{ "" .. details.text .. " ", "DiagnosticInfo" }},
                    hl_mode = "combine",
                    virt_text_pos = "eol",
                    sign_hl_group = "DiagnosticInfo",
                    sign_text = ">>",
                }
            end
        })

        -- create a new vmark at the cursor position
        vim.keymap.set("n", "ma", vmark.create)

        -- delete the vmark at the cursor position
        vim.keymap.set("n", "md", vmark.removeUnderCursor)

        -- open the quickfix with all marks found recursively from current directory
        vim.keymap.set("n", "mo", vmark.recursiveQuickfix)

        -- print the vmark text at the cursor position
        vim.keymap.set("n", "me", vmark.echoUnderCursor)

        -- jump to the next/prev vmark in the document
        vim.keymap.set({"n", "v", "o"}, "mk", vmark.prev)
        vim.keymap.set({"n", "v", "o"}, "mj", vmark.next)
    end
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages