Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ neogit.setup {
kind = "floating_console",
},
popup = {
kind = "split",
kind = "popup",
},
stash = {
kind = "tab",
Expand Down
2 changes: 1 addition & 1 deletion doc/neogit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ to Neovim users.
kind = "floating_console",
},
popup = {
kind = "split",
kind = "popup",
},
stash = {
kind = "tab",
Expand Down
6 changes: 4 additions & 2 deletions lua/neogit/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ end
---| "split_below_all" Like :below split
---| "vsplit" Open in a vertical split
---| "floating" Open in a floating window
---| "popup" Open in a popup
---| "auto" vsplit if window would have 80 cols, otherwise split

---@class NeogitCommitBufferConfig Commit buffer options
Expand Down Expand Up @@ -451,7 +452,7 @@ function M.get_default_values()
kind = "floating_console",
},
popup = {
kind = "split",
kind = "popup",
},
stash = {
kind = "tab",
Expand Down Expand Up @@ -704,13 +705,14 @@ function M.validate_config()
"floating",
"floating_console",
"replace",
"popup",
"auto",
}, val)
then
err(
name,
string.format(
"Expected `%s` to be one of 'split', 'vsplit', 'split_above', 'vsplit_left', tab', 'floating', 'replace' or 'auto', got '%s'",
"Expected `%s` to be one of 'split', 'vsplit', 'split_above', 'split_above_all', 'split_below', 'split_below_all', 'vsplit_left', tab', 'floating', 'floating_console', 'replace', 'popup' or 'auto', got '%s'",
name,
val
)
Expand Down
3 changes: 2 additions & 1 deletion lua/neogit/lib/popup/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local config = require("neogit.config")
local PopupBuilder = require("neogit.lib.popup.builder")
local Buffer = require("neogit.lib.buffer")
local logger = require("neogit.logger")
Expand Down Expand Up @@ -407,7 +408,7 @@ function M:show()
self.buffer = Buffer.create {
name = self.state.name,
filetype = "NeogitPopup",
kind = "popup",
kind = config.values.popup.kind,
mappings = self:mappings(),
status_column = " ",
autocmds = {
Expand Down