aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/after/indent/php.lua
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-01-03 03:05:10 +0900
committernsfisis <nsfisis@gmail.com>2024-01-06 21:19:05 +0900
commitfe0fb3147b36cbe486e2fcb64a9861e4d8f92064 (patch)
treed708c00a3b6500d8b4b9dd533d71ea6fc71bedb1 /.config/nvim/after/indent/php.lua
parentd0ebe31c0128893644c7e8cc3faa407b301fefac (diff)
downloaddotfiles-fe0fb3147b36cbe486e2fcb64a9861e4d8f92064.tar.gz
dotfiles-fe0fb3147b36cbe486e2fcb64a9861e4d8f92064.tar.zst
dotfiles-fe0fb3147b36cbe486e2fcb64a9861e4d8f92064.zip
nvim: fix PHP indent
Diffstat (limited to '.config/nvim/after/indent/php.lua')
-rw-r--r--.config/nvim/after/indent/php.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/nvim/after/indent/php.lua b/.config/nvim/after/indent/php.lua
new file mode 100644
index 0000000..aeffba8
--- /dev/null
+++ b/.config/nvim/after/indent/php.lua
@@ -0,0 +1,8 @@
+vimrc.after_indent('php', function(conf)
+ -- The default indent plugin for PHP bundled with Neovim disables
+ -- 'smartindent' and 'autoindent' because the plugin fully handles
+ -- indentation by itself. However, I use nvim-treesitter plugin for PHP
+ -- indentation, which requires that these options are on.
+ vim.bo.smartindent = true
+ vim.bo.autoindent = true
+end)