From 4291eef69eab043588f1dbc8b0e02efcb031b607 Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Wed, 6 Dec 2023 04:47:04 +0100 Subject: [PATCH] added autocommand to change the indentation of php files --- nvim/lua/settings/autocommands.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 nvim/lua/settings/autocommands.lua diff --git a/nvim/lua/settings/autocommands.lua b/nvim/lua/settings/autocommands.lua new file mode 100644 index 0000000..55ff669 --- /dev/null +++ b/nvim/lua/settings/autocommands.lua @@ -0,0 +1,9 @@ +vim.api.nvim_create_autocmd("FileType", { + pattern = "php", + callback = function() + vim.bo.tabstop = 4 + vim.bo.softtabstop = 4 + vim.bo.shiftwidth = 4 + vim.bo.expandtab = true + end, +})