TaDaa / vimade

An eye friendly plugin that fades your inactive buffers and preserves your syntax highlighting!
MIT License
486 stars 8 forks source link

[Feature request] Support to make neovim numhl of sign fade. #39

Open kevinhwang91 opened 4 years ago

kevinhwang91 commented 4 years ago

I saw some code in signs.py about linehl were commented.

      # linehl adds high performance hit -- maybe add toggle for this
      # if 'linehl' in item:
        # linehl_id = vim.eval('hlID("'+item['linehl']+'")')
        # if linehl_id:
          # ids.append(linehl_id)
        # definition += ' linehl=vimade_' + linehl_id

and numhl of sign works after I added below code.

      if 'numhl' in item:
        numhl_id = vim.eval('hlID("'+item['numhl']+'")')
        if numhl_id:
          ids.append(numhl_id)
        definition += ' numhl=vimade_' + numhl_id

But it must make sure that the option checkinterval of vimade greater than the option updatetime of neovim, otherwise, vim-gitgutter enabled g:gitgutter_highlight_linenrs = 1 may works unexpected.

I don't know why, please support this feature with bug-free code.

TaDaa commented 4 years ago

Will get the issue you are talking about resolved, its been there in the back of my mind but I keep putting it off.

+1 for supporting numhl. I want to say linehl should be supportable at this point on neovim as well given all the highlighting performance improvements it currently has over vim -- will look into re-enabling it.

TaDaa commented 4 years ago

linehl and numhl should now be supported with some perf improvements and logic for sign prioritization.

Currently considering options to catch signs that might be triggered off of updatetime -- likely will update vimade to consult both signsretentionperiod and updatetime, which should handle most plugins without specific configurations. Should have an update on this one in a day or 2.