mirror of
https://github.com/marianozunino/nvim.git
synced 2025-06-28 18:43:50 -03:00
chore: some qol crap
This commit is contained in:
parent
867159343a
commit
6fb744cdae
34 changed files with 433 additions and 598 deletions
|
@ -39,9 +39,9 @@ end, { desc = "Quit all" })
|
|||
|
||||
-- create a user command to save without formatting :noa w
|
||||
vim.api.nvim_create_user_command("W", function()
|
||||
-- if buffer is empty, don't save
|
||||
if vim.fn.empty(vim.fn.expand("%:t")) == 1 then
|
||||
return vim.notify("Buffer is empty, not saving", vim.log.levels.ERROR)
|
||||
Snacks.notifier.notify("Buffer is empty, not saving", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
vim.api.nvim_command("noa w")
|
||||
end, { nargs = 0, desc = "Save without formatting" })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue