mirror of
https://git.aramjonghu.nl/AramJonghu/nvim.git
synced 2026-06-07 00:48:24 +02:00
neorg unused and removed, neoformat
This commit is contained in:
@@ -1 +1,17 @@
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
|
||||
local neoformat_group = augroup("NeoformatOnSave", { clear = true })
|
||||
|
||||
autocmd("BufWritePost", {
|
||||
group = neoformat_group,
|
||||
callback = function()
|
||||
if vim.bo.buftype ~= "" or vim.bo.modifiable == false or vim.bo.readonly then
|
||||
return
|
||||
end
|
||||
if vim.fn.exists ":Neoformat" ~= 2 then
|
||||
return
|
||||
end
|
||||
vim.cmd "silent! Neoformat"
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user