fix(nvim): handle cmdheight=0 woes w/ macros

This commit is contained in:
Price Hiller 2022-06-18 23:29:43 -05:00
parent ca69e82ff3
commit 0387f81bce

View File

@ -5,6 +5,23 @@ M.setup = function()
vim.api.nvim_create_autocmd('BufWritePre', {
command = '%s/\\s\\+$//e',
})
-- NOTE: Handles issues with cmdheight=0, waiting for
-- https://github.com/neovim/neovim/pull/18961
-- to be merged
vim.api.nvim_create_autocmd('RecordingEnter', {
pattern = '*',
callback = function()
vim.opt_local.cmdheight = 1
end,
})
vim.api.nvim_create_autocmd('RecordingLeave', {
pattern = '*',
callback = function()
vim.opt_local.cmdheight = 0
end,
})
end
return M