This commit is contained in:
Daniel Flanagan 2022-07-19 10:01:14 -05:00
parent 60740173ac
commit e181f411eb
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
2 changed files with 4 additions and 4 deletions

View File

@ -281,7 +281,7 @@ vim.api.nvim_create_autocmd("TextYankPost", {
end,
})
vim.api.nvim_create_autocmd("BufWritePost", {
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*",
callback = function()
vim.lsp.buf.formatting_seq_sync()

View File

@ -8,14 +8,14 @@ ls -la "$(dirname "$0")"
for file in "$(dirname "$0")/provision.d"/*; do
test -d "$file" && continue
echo "Runnning $file..."
if <<< "$file" grep -q "AS_ROOT"; then
if [ "$is_root" == "1" ]; then
if grep -q "AS_ROOT" "$file"; then
if [ "$is_root" = "1" ]; then
"$file"
else
sudo "$file"
fi
else
if [ "$is_root" == "1" ]; then
if [ "$is_root" = "1" ]; then
sudo -u daniel "$file"
else
"$file"