mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
plugins/toggleterm: allow lua functions in float_opts keys which support them
This commit is contained in:
parent
80c03843e7
commit
db93efffdb
2 changed files with 23 additions and 5 deletions
|
@ -228,13 +228,27 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
The 'curved' border is a custom border type not natively supported but implemented in this plugin.
|
||||
'';
|
||||
|
||||
width = helpers.mkNullOrOption types.ints.unsigned "";
|
||||
width = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||
Width of the floating terminal. Like `size`, `width` can be a number or
|
||||
function which is passed the current terminal.
|
||||
'';
|
||||
|
||||
height = helpers.mkNullOrOption types.ints.unsigned "";
|
||||
height = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||
Height of the floating terminal. Like `size`, `height` can be a number
|
||||
or function which is passed the current terminal.
|
||||
'';
|
||||
|
||||
row = helpers.mkNullOrOption types.ints.unsigned "";
|
||||
row = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||
Start row of the floating terminal. Defaults to the center of the
|
||||
screen. Like `size`, `row` can be a number or function which is passed
|
||||
the current terminal.
|
||||
'';
|
||||
|
||||
col = helpers.mkNullOrOption types.ints.unsigned "";
|
||||
col = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||
Start column of the floating terminal. Defaults to the center of the
|
||||
screen. Like `size`, `col` can be a number or function which is passed
|
||||
the current terminal.
|
||||
'';
|
||||
|
||||
winblend = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
||||
|
||||
|
|
|
@ -60,7 +60,11 @@
|
|||
auto_scroll = false;
|
||||
float_opts = {
|
||||
border = "double";
|
||||
width = 30;
|
||||
width = ''
|
||||
function()
|
||||
return math.ceil(vim.o.columns * 0.8)
|
||||
end
|
||||
'';
|
||||
height = 30;
|
||||
winblend = 5;
|
||||
zindex = 20;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue