mirror of
https://github.com/hyzendust/KickestEnd.nvim.git
synced 2026-02-15 14:01:13 +01:00
Made the echo message at the bottom of Neovim dissapear on most key presses.
This commit is contained in:
15
init.lua
15
init.lua
@@ -1210,5 +1210,20 @@ for _, fmt in ipairs(formatters) do
|
|||||||
ensure_file(fmt.path, fmt.content)
|
ensure_file(fmt.path, fmt.content)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Auto-clear messages on most user actions
|
||||||
|
local clear_msg_grp = vim.api.nvim_create_augroup('AutoClearMessages', { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd(
|
||||||
|
{ 'CursorMoved', 'CursorMovedI', 'InsertEnter', 'InsertLeave', 'TextChanged', 'TextChangedI' }, {
|
||||||
|
group = clear_msg_grp,
|
||||||
|
callback = function()
|
||||||
|
vim.cmd 'echo ""' -- Clear the message/command line
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Auto-clear messages on pressing ESC
|
||||||
|
vim.keymap.set('n', '<Esc>', '<Esc><Cmd>echo ""<CR>', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('v', '<Esc>', '<Esc><Cmd>echo ""<CR>', { noremap = true, silent = true })
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|||||||
Reference in New Issue
Block a user