Skip to content

A simple plugin for encrypting/decrypting files from your favorite editor

Notifications You must be signed in to change notification settings

moliva/private.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

private.nvim

A simple plugin for encrypting/decrypting files from your favorite editor, originally based on ccryptor.nvim.

Features

  • Encrypt/decrypt files using an existing encryption algorithm
  • Automatically open/edit encrypted files from Neovim based on their file extensions
  • [WIP] Introduce new encryption modules

Requirements

  • Plenary
  • The encryption tool of your liking (currently supported ccrypt and base64) installed in your machine

Installation

return {
    "moliva/private.nvim",
    dependencies = { "nvim-lua/plenary.nvim" },
    event = { "BufReadPost", "BufWritePost" },
    config = function()
      require("private").setup()
    end,
    keys = {
      { '<leader>iep', function() require('private.predef_actions').encrypt_path() end,         desc = "encrypt file by path" },
      { '<leader>iec', function() require('private.predef_actions').encrypt_current_file() end, desc = "encrypt current file" },
      { '<leader>idp', function() require('private.predef_actions').decrypt_path() end,         desc = "decrypt file by path" },
      { '<leader>idc', function() require('private.predef_actions').decrypt_current_file() end, desc = "decrypt current file" },
    }

Configuration

Default setup opts.

{
  encryption_strategy = require('private.strategies.ccrypt'), -- use ccrypt as default
  setup_bindings = true, -- sets up autocommands for all known modules to be decrypted on open and encrypted on save
}

About

A simple plugin for encrypting/decrypting files from your favorite editor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages