Feat: Configure discussion tree split width and position
This MR improves the configurability of the plugin by using Nui's split system rather than managing the splits ourselves. This lets the user configure both the positioning of the discussion tree and it's width, and reduces overall maintenance of split management for the plugin.
This commit is contained in:
@@ -134,9 +134,14 @@ M.setPluginConfiguration = function(args)
|
||||
error("The .gitlab.nvim project file's 'project_id' must be number")
|
||||
end
|
||||
|
||||
-- Configuration for the plugin, such as port of server
|
||||
-- Configuration for the plugin, such as port of server, layout, etc
|
||||
state.PORT = args.port or 21036
|
||||
state.LOG_PATH = args.log_path or (vim.fn.stdpath("cache") .. "/gitlab.nvim.log")
|
||||
state.DISCUSSION_SPLIT = {
|
||||
relative = args.discussion_tree and args.discussion_tree.relative or "editor",
|
||||
position = args.discussion_tree and args.discussion_tree.position or "left",
|
||||
size = args.discussion_tree and args.discussion_tree.size or "20%",
|
||||
}
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user