1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-18 06:51:12 +01:00

plugins/nvim-cmp: fix window.completion bug (#385)

This commit is contained in:
Gaétan Lepage 2023-05-25 16:16:13 +02:00 committed by GitHub
parent 131c94f3bc
commit fe581914ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,34 +607,30 @@ in {
inherit (cfg) view; inherit (cfg) view;
window = helpers.ifNonNull' cfg.window { window = helpers.ifNonNull' cfg.window {
completion = helpers.ifNonNull' cfg.window.completion { completion = with cfg.window.completion;
helpers.ifNonNull' cfg.window.completion {
inherit inherit
(cfg.window.completion)
border border
winhighlight winhighlight
zindex zindex
scrolloff scrolloff
scrollbar scrollbar
; ;
col_offset = cfg.window.completion.colOffset; col_offset = colOffset;
side_padding = cfg.window.completion.sidePadding; side_padding = sidePadding;
}; };
documentation = helpers.ifNonNull' cfg.window.completion { documentation = with cfg.window.documentation;
helpers.ifNonNull' cfg.window.documentation {
inherit inherit
(cfg.window.completion)
border border
winhighlight winhighlight
zindex zindex
; ;
max_width = let max_width =
inherit (cfg.window.documentation) maxWidth;
in
if isInt maxWidth if isInt maxWidth
then maxWidth then maxWidth
else helpers.ifNonNull' maxWidth (helpers.mkRaw maxWidth); else helpers.ifNonNull' maxWidth (helpers.mkRaw maxWidth);
max_height = let max_height =
inherit (cfg.window.documentation) maxHeight;
in
if isInt maxHeight if isInt maxHeight
then maxHeight then maxHeight
else helpers.ifNonNull' maxHeight (helpers.mkRaw maxHeight); else helpers.ifNonNull' maxHeight (helpers.mkRaw maxHeight);