nyngwang / NeoZoom.lua

A simple usecase of floating window to help you focus.
MIT License
184 stars 15 forks source link

feat: highlight overrides config support #54

Closed sjdonado closed 1 year ago

sjdonado commented 1 year ago

Allows to customise highlight properties.

Highlight definition map, accepts the following keys: fg (or foreground): color name or "#RRGGBB", see note. bg (or background): color name or "#RRGGBB", see note. sp (or special): color name or "#RRGGBB" blend: integer between 0 and 100 bold: boolean standout: boolean underline: boolean undercurl: boolean underdouble: boolean underdotted: boolean underdashed: boolean strikethrough: boolean italic: boolean reverse: boolean nocombine: boolean link: name of another highlight group to link to, see :hi-link. default: Don't override existing definition :hi-default ctermfg: Sets foreground of cterm color ctermfg ctermbg: Sets background of cterm color ctermbg cterm: cterm attribute map, like highlight-args. If not set, cterm attributes will match those from the attribute map documented above.

Use case: background color is darker by default using github-nvim-theme:

neozoom.setup({
  ...
  highlight_overrides = {
    bg = 'none',
  },
})
before after
image image
nyngwang commented 1 year ago

Thanks for your help, but I will prefer to provide an option for passing callbacks on zoom-in(popup) instead. This will solve any future XYZ overrides config support PRs and avoid complexity in the documentation.

nyngwang commented 1 year ago

The example setup is provided in the linked PR #56, will update the README later.