Home

Awesome

omen.nvim

Omen is a password manager like plugin for Neovim

pick.gif

Why?

I am using pass to manage my passwords. I have been using this plugin in my config for months and I really loved picking my passwords with telescope. So, I want to create a new plugin.

Features

Requirements

Omen needs some external components to work:

Installation

With packer:

use {
  "nacro90/omen.nvim",
  requires = {
    "nvim-lua/telescope.nvim",
    "nvim-lua/plenary.nvim",
  },
  config = function()
    require("omen").setup()
  end
},

Config

setup gets a options table that defaults to:

{
  picker = "telescope", --- Picker type
  title = "Omen", --- Title to be displayed on the picker
  store = vim.env.HOME .. "/.password-store/", --- Password store directory
  passphrase_prompt = "Passphrase: ", --- Prompt when asking the passphrase
  register = "+", --- Which register to fill after decoding a password
  retention = 45, --- How much seconds the life of the decoded passwords in the register
  ignored = { --- Ignored directories or files that are not to be listed in picker
    ".git",
    ".gitattributes",
    ".gpg-id",
    ".stversions",
    "Recycle Bin",
  },
  use_default_keymaps = true, --- Whether display info messages or not
}

Pickers

Omen uses a telescope picker implementation by default. You can change it to vim.ui.select to use it with your favourite picker.

require("omen").setup{
  picker = "select"
}

You can load plugin as a telescope extension using:

require("telescope").load_extension "omen"

Call it as following:

:Telescope omen pick

Keymaps

Omen sets default keymaps by default.

vim.keymap.set("n", "<leader>p", omen.pick)

You can disable that using:

require("omen").setup{
  use_default_keymaps = false,
}

You can access the pick function using:

require("omen").pick()

TODO

Testing

make test

or with justfile:

just test