Skip to content

Commit

Permalink
Fix autocmd on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
yutkat authored Apr 1, 2024
1 parent b8ae749 commit c2d7f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/guess-indent/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local function setup_autocommands()
vim.cmd([[
augroup GuessIndent
autocmd!
autocmd BufReadPost * silent lua require("guess-indent").set_from_buffer("auto_cmd")
autocmd BufReadPost,BufEnter * silent lua require("guess-indent").set_from_buffer("auto_cmd")
" Run once when saving for new files
autocmd BufNewFile * autocmd BufWritePost <buffer=abuf> ++once silent lua require("guess-indent").set_from_buffer("auto_cmd")
augroup END
Expand Down

0 comments on commit c2d7f57

Please sign in to comment.