Colour output for nvim ephemeral command
This commit is contained in:
parent
8a1596f8b3
commit
d879ab677f
1 changed files with 6 additions and 4 deletions
|
@ -8,10 +8,12 @@ end, {})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("Ephemeral", function(params)
|
vim.api.nvim_create_user_command("Ephemeral", function(params)
|
||||||
if params.args == "" then
|
if params.args == "" then
|
||||||
print(vim.g.ephemeral_buffers
|
vim.api.nvim_echo({
|
||||||
and "New buffers are ephemeral"
|
{"New buffers are "},
|
||||||
or "New buffers are permanent"
|
vim.g.ephemeral_buffers
|
||||||
)
|
and {"ephemeral", "DiffDelete"}
|
||||||
|
or {"permanent", "DiffAdd"};
|
||||||
|
}, false, {})
|
||||||
elseif params.args == "on" then
|
elseif params.args == "on" then
|
||||||
vim.g.ephemeral_buffers = true
|
vim.g.ephemeral_buffers = true
|
||||||
elseif params.args == "off" then
|
elseif params.args == "off" then
|
||||||
|
|
Loading…
Reference in a new issue