Wed, 28 Aug 2024 04:44:05 -0500
add assign types gopls hint too
local util = require("config.util") local safe_filter_file = util.safe_filter_file local g = vim.api.nvim_create_augroup("encrypted", { clear = true }) local filepattern = { "*.gpg", "*.gpg.*" } local function autocmd(event, opts) util.autocmd(g, event, filepattern, opts) end autocmd({ "BufReadPre", "FileReadPre" }, [[ setl noswapfile noundofile nobackup shada= ]]) autocmd("BufReadPost", function(_) safe_filter_file("gpg -d") end) autocmd("BufWritePre", function(_) safe_filter_file("gpg -se -a --default-recipient-self") end) autocmd("BufWritePost", [[ silent undo ]])