From d56fed070eafcd61351f4fb3b1b261fa5fbbc0e2 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 4 Aug 2024 03:28:42 +0200 Subject: [PATCH] Autocmd for auto moving help-split to the right --- init.lua | 3 +++ lua/autocmd.lua | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 lua/autocmd.lua diff --git a/init.lua b/init.lua index 6e4891b..2660de1 100644 --- a/init.lua +++ b/init.lua @@ -16,6 +16,9 @@ require 'options' -- [[ Basic Keymaps ]] require 'keymaps' +-- [[ Setting autocmd's ]] +require 'autocmd' + -- [[ Install `lazy.nvim` plugin manager ]] require 'lazy-bootstrap' diff --git a/lua/autocmd.lua b/lua/autocmd.lua new file mode 100644 index 0000000..630c49f --- /dev/null +++ b/lua/autocmd.lua @@ -0,0 +1,13 @@ +-- [[ Setting autocmd's ]] +-- See `:help autocmd` + +-- Instantly move help window to the right +-- This is almost certainly a hacky way to do this) +vim.api.nvim_create_autocmd('FileType', { + pattern = { 'help' }, + callback = function() + vim.schedule(function() + vim.cmd 'wincmd L' + end) + end, +})