]> git.huck.website - nvim.git/commitdiff
git windows split to right side
authorHuck Boles <huck@huck.website>
Sat, 13 May 2023 20:22:38 +0000 (15:22 -0500)
committerHuck Boles <huck@huck.website>
Sat, 13 May 2023 20:22:38 +0000 (15:22 -0500)
lua/functions.lua

index f90075317d211922040448df8e59887bb587b680..dc2fa628b408b56890a5e237911089df9a780e59 100644 (file)
@@ -2,7 +2,8 @@
 vim.api.nvim_create_autocmd("BufWinEnter", {
     pattern = { "*" },
     callback = function()
-        if vim.o.filetype == 'help' or 'fugitive' or 'gitcommit' then
+        local filetype = vim.o.filetype
+        if filetype == 'help' or filetype == 'fugitive' or filetype == 'gitcommit' then
             vim.cmd.wincmd("L")
         end
     end