config(cmp): simplify disabling scrollbar

This commit is contained in:
SHA-5010 2022-12-12 23:46:41 +09:00 committed by Sidhanth Rathod
parent 5ea340171c
commit 40c180d3b2

View file

@ -50,20 +50,12 @@ local function border(hl_name)
} }
end end
local cmp_window = require "cmp.utils.window"
cmp_window.info_ = cmp_window.info
cmp_window.info = function(self)
local info = self:info_()
info.scrollable = false
return info
end
local options = { local options = {
window = { window = {
completion = { completion = {
side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0, side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0,
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel", winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel",
scrollbar = false,
}, },
documentation = { documentation = {
border = border "CmpDocBorder", border = border "CmpDocBorder",