aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/lua/vimrc
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/lua/vimrc
parentd0ebe31c0128893644c7e8cc3faa407b301fefac (diff)
downloaddotfiles-fe0fb3147b36cbe486e2fcb64a9861e4d8f92064.tar.gz
dotfiles-fe0fb3147b36cbe486e2fcb64a9861e4d8f92064.tar.zst
dotfiles-fe0fb3147b36cbe486e2fcb64a9861e4d8f92064.zip
nvim: fix PHP indent
Diffstat (limited to '.config/nvim/lua/vimrc')
-rw-r--r--.config/nvim/lua/vimrc/init.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/lua/vimrc/init.lua b/.config/nvim/lua/vimrc/init.lua
index be5eba9..feedd0b 100644
--- a/.config/nvim/lua/vimrc/init.lua
+++ b/.config/nvim/lua/vimrc/init.lua
@@ -30,6 +30,19 @@ end
+function M.after_indent(ft, callback)
+ local var_name = 'did_indent_' .. ft .. '_after'
+ if vim.b[var_name] ~= nil then
+ return
+ end
+
+ callback(conf)
+
+ vim.b[var_name] = true
+end
+
+
+
local function set_indentation(style, width)
local editorconfig = vim.b.editorconfig or {}