From ecef6bd5bfcd61232623bc5d0a7bb39e24c49eda Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Fri, 27 May 2022 13:23:01 +0200 Subject: vim: update himalaya config --- .vim/lua/plugins.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to '.vim') diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index f553966..52588d5 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -1206,11 +1206,27 @@ require('packer').startup({function() config = function() end} -- }}} - use {'soywod/himalaya', rtp = 'vim', cmd = {'Himalaya'}, + use {'soywod/himalaya', cmd = {'Himalaya'}, -- {{{ + branch = 'development', + rtp = 'vim', + setup = function() + vim.api.nvim_create_autocmd('FileType', { + pattern = {'himalaya-msg-read', 'himalaya-msg-list'}, + callback = function() + vim.opt_local.list = false + vim.keymap.set('n', 'q', function() + vim.api.nvim_buf_delete(0, {}) + -- quit if no more buffers + -- if #vim.api.nvim_list_bufs() then vim.cmd [[quit]] end + end, {silent=true, buffer=0}) + end, + group = vim.api.nvim_create_augroup('Himalaya', {}), + }) + end, config = function() vim.g.himalaya_mailbox_picker = 'telescope' vim.g.himalaya_telescope_preview_enabled = true - end} + end} -- }}} end, config = { compile_path = compilepath, -- cgit 1.4.1