Skip to content

Instantly share code, notes, and snippets.

View nickali's full-sized avatar

Nick Ali nickali

View GitHub Profile
local gpgGroup = vim.api.nvim_create_augroup("customGpg", { clear = true })
vim.api.nvim_create_autocmd({ "BufReadPre", "FileReadPre" }, {
pattern = "*.gpg",
group = gpgGroup,
callback = function()
-- Make sure nothing is written to shada file while editing an encrypted file.
vim.opt_local.shada = nil
-- We don't want a swap file, as it writes unencrypted data to disk
vim.opt_local.swapfile = false