Skip to main content

Octo

info

You can enable the extra with the :LazyExtras command. Plugins marked as optional will only be configured if they are installed.

Below you can find a list of included plugins and their default settings.

caution

You don't need to copy the default settings to your config. They are only shown here for reference.

Includes the following extras

octo.nvim

Octo

opts = {
enable_builtin = true,
default_to_projects_v2 = true,
default_merge_method = "squash",
picker = "telescope",
}

octo.nvim

Octo Picker

opts = function(_, opts)
vim.treesitter.language.register("markdown", "octo")
if LazyVim.has("telescope.nvim") then
opts.picker = "telescope"
elseif LazyVim.has("fzf-lua") then
opts.picker = "fzf-lua"
else
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`")
end

-- Keep some empty windows in sessions
vim.api.nvim_create_autocmd("ExitPre", {
group = vim.api.nvim_create_augroup("octo_exit_pre", { clear = true }),
callback = function(ev)
local keep = { "octo" }
for _, win in ipairs(vim.api.nvim_list_wins()) do
local buf = vim.api.nvim_win_get_buf(win)
if vim.tbl_contains(keep, vim.bo[buf].filetype) then
vim.bo[buf].buftype = "" -- set buftype to empty to keep the window
end
end
end,
})
end