nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

feat:allow highlight overrides for scrollbar and scrollbar thumb

Open jakewvincent opened this issue 1 year ago • 0 comments

This PR adds two config options to window.completion which allow the user to override the default highlight groups for the winhighlight of the scrollbar and the scrollbar thumb, which were previously hard-coded. The following files are changed:

  1. lua/cmp/config/default.lua: Added entries in default config table for scrollbar_highlight and scrollbar_thumb_highlight
  2. lua/cmp/config/window.lua: Added entries in the settings table returned by window.bordered() for scrollbar_highlight and scrollbar_thumb_highlight
  3. lua/cmp/utils/window.lua: in window.update(), retrieve the default or user-customized values for scrollbar_highlight and scrollbar_thumb_highlight, and use those when setting the window options (this is where the previous hard-coded values are replaced)
  4. lua/cmp/types/cmp.lua: Defined scrollbar_highlight and scrollbar_thumb_highlight in cmp.WindowConfig class.
  5. doc/cmp.txt: Updated documentation

jakewvincent avatar Nov 04 '23 21:11 jakewvincent