feat(config): Add option to change split position

Default: 'right'
Possible Values: 'right' and 'left'
This commit is contained in:
simrat39
2021-04-24 19:02:01 -07:00
parent 19fd160a66
commit ae5f990f01
2 changed files with 21 additions and 4 deletions

View File

@@ -5,12 +5,29 @@ local M = {}
local defaults = {
highlight_hovered_item = true,
show_guides = true,
position = 'right'
}
M.options = {}
function M.get_position_navigation_direction()
if M.options.position == 'left' then
return 'h'
else
return 'l'
end
end
function M.get_split_command()
if M.options.position == 'left' then
return "topleft vs"
else
return "vs"
end
end
function M.setup(options)
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
end
return M