From 8a860b25cf88ddcc5953c2d36e97eaef4ae975e0 Mon Sep 17 00:00:00 2001 From: bain Date: Mon, 18 Sep 2023 15:25:25 +0200 Subject: [PATCH] update nvim configuration --- nvim/.config/nvim/init.lua | 20 +++++++++++++++++++- nvim/.config/nvim/lazy-lock.json | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 677edf1..9312056 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -97,6 +97,10 @@ require("lazy").setup({ mapping = { [''] = cmp_action.luasnip_supertab(), [''] = cmp_action.luasnip_shift_supertab(), + -- Requires the terminal to send proper keycodes (put this in .Xresources): + -- URxvt.keysym.S-Return: \033[13;2u + -- URxvt.keysym.C-Return: \033[13;5u + [''] = cmp.mapping.confirm({ select = true }), }, window = { completion = { @@ -198,7 +202,11 @@ require("lazy").setup({ api.toggle.blockwise(vim.fn.visualmode()) end) end, - } + }, + { + 'jamessan/vim-gnupg', + -- ft = { ".gpg", ".pgp", ".asc" }, + }, }) -- }}} -- {{{ Keymap @@ -262,3 +270,13 @@ if os.getenv("NVIM_IDE_MODE") == "1" then vim.cmd [[IDE]] end -- }}} + +vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { + pattern = { "*.eml", "*.mail" }, + callback = function(_) + vim.cmd("setl tw=80") + vim.cmd("setl fo=awq") + vim.cmd("setl comments+=nb:>") + vim.cmd([[match ErrorMsg '\s\+$']]) + end +}) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 88bb17b..a6675ae 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -16,5 +16,6 @@ "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "tokyodark.nvim": { "branch": "master", "commit": "4bfb42924274abc5de9f5f4779075b77c6112c85" }, "vim-fugitive": { "branch": "master", "commit": "572c8510123cbde02e8a1dafcd376c98e1e13f43" }, + "vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" }, "vim-tmux-navigator": { "branch": "master", "commit": "addb64a772cb4a3ae1f1363583012b2cada2cd66" } } \ No newline at end of file