This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |