Enable autoindent and smartindent for PHP and general use

This change re-enables autoindent and smartindent options in
both PHP and general settings to improve code formatting
and maintain consistency across file types.
This commit is contained in:
Ray Elliott 2026-01-13 19:54:44 +00:00
commit e450617eb6
2 changed files with 8 additions and 0 deletions

View file

@ -25,6 +25,12 @@ vim.api.nvim_create_autocmd("FileType", {
vim.opt_local.tabstop = 2 -- Display tabs as 2 spaces wide
vim.opt_local.shiftwidth = 2 -- Indent/outdent by 2 columns (one tab)
vim.opt_local.softtabstop = 2 -- Tab key inserts 2 columns (one tab)
-- Fix: Neovim's built-in PHP indent sets indentexpr but breaks autoindent
-- Re-enable autoindent/smartindent and clear the broken indentexpr
vim.opt_local.autoindent = true
vim.opt_local.smartindent = true
vim.opt_local.indentexpr = "" -- Clear GetPhpIndent(), use smartindent instead
end,
})