From d879ab677f22df5368e0bee4cb1b428b41665a77 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 16 Jul 2024 09:16:52 +0200 Subject: [PATCH] Colour output for nvim ephemeral command --- vim/plugin/ephemeral.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vim/plugin/ephemeral.lua b/vim/plugin/ephemeral.lua index 91060f9..c3eedab 100644 --- a/vim/plugin/ephemeral.lua +++ b/vim/plugin/ephemeral.lua @@ -8,10 +8,12 @@ end, {}) vim.api.nvim_create_user_command("Ephemeral", function(params) if params.args == "" then - print(vim.g.ephemeral_buffers - and "New buffers are ephemeral" - or "New buffers are permanent" - ) + vim.api.nvim_echo({ + {"New buffers are "}, + vim.g.ephemeral_buffers + and {"ephemeral", "DiffDelete"} + or {"permanent", "DiffAdd"}; + }, false, {}) elseif params.args == "on" then vim.g.ephemeral_buffers = true elseif params.args == "off" then