mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-31 15:30:27 +02:00
helpers.defaultNullOpts: add mkBorder
This commit is contained in:
parent
be6a29c800
commit
600cd12057
10 changed files with 29 additions and 36 deletions
|
@ -41,9 +41,7 @@ in {
|
|||
|
||||
preview = {
|
||||
winConfig = {
|
||||
border =
|
||||
helpers.defaultNullOpts.mkNullable (types.either types.str (types.listOf types.str)) "rounded"
|
||||
"The border for preview window, `:h nvim_open_win() | call search('border:')`";
|
||||
border = helpers.defaultNullOpts.mkBorder "rounded" "preview window" "";
|
||||
|
||||
winblend = helpers.defaultNullOpts.mkInt 12 "The winblend for preview window, `:h winblend`";
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ with lib; let
|
|||
helpers.mkNullOrOption (with types; either int fractionType)
|
||||
"Optionally define an integer/float for the exact height of the preview window.";
|
||||
|
||||
border = helpers.defaultNullOpts.mkStr "rounded" "";
|
||||
border = helpers.defaultNullOpts.mkBorder "rounded" "oil" "";
|
||||
|
||||
winOptions = {
|
||||
winblend = helpers.defaultNullOpts.mkInt 0 "";
|
||||
|
@ -315,7 +315,7 @@ in {
|
|||
|
||||
maxHeight = helpers.defaultNullOpts.mkInt 0 "";
|
||||
|
||||
border = helpers.defaultNullOpts.mkStr "rounded" "";
|
||||
border = helpers.defaultNullOpts.mkBorder "rounded" "oil.open_float" "";
|
||||
|
||||
winOptions = {
|
||||
winblend = helpers.defaultNullOpts.mkInt 10 "";
|
||||
|
@ -329,7 +329,7 @@ in {
|
|||
progress =
|
||||
commonWindowOptions
|
||||
// {
|
||||
minimizedBorder = helpers.defaultNullOpts.mkStr "none" "";
|
||||
minimizedBorder = helpers.defaultNullOpts.mkBorder "none" "oil floating progress window" "";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -140,13 +140,12 @@ in {
|
|||
|
||||
floatOpts = {
|
||||
border =
|
||||
helpers.defaultNullOpts.mkStr "single"
|
||||
helpers.defaultNullOpts.mkBorder "single" "toggleterm"
|
||||
''
|
||||
`border` = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by
|
||||
`win open`.
|
||||
The border key is *almost* the same as 'nvim_open_win'.
|
||||
See `:h nvim_open_win` for details on borders however the 'curved' border is a custom
|
||||
border type not natively supported but implemented in this plugin.
|
||||
The 'curved' border is a custom border type not natively supported but implemented in this plugin.
|
||||
'';
|
||||
|
||||
width = helpers.defaultNullOpts.mkInt 50 "";
|
||||
|
|
|
@ -81,7 +81,7 @@ in {
|
|||
};
|
||||
};
|
||||
in {
|
||||
border = helpers.defaultNullOpts.mkEnumFirstDefault ["none" "single" "double" "shadow"] "";
|
||||
border = helpers.defaultNullOpts.mkBorder "none" "which-key" "";
|
||||
position = helpers.defaultNullOpts.mkEnumFirstDefault ["bottom" "top"] "";
|
||||
margin =
|
||||
helpers.defaultNullOpts.mkNullable spacingOptions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue