wrapwidth icon indicating copy to clipboard operation
wrapwidth copied to clipboard

Competition with other sources of virtual text

Open PatrBal opened this issue 1 year ago • 8 comments

Hi, thank you very much for this wonderful plugin. I have been waiting for this feature in Neovim for years! Especially for my LaTeX writings. My problem is that the virtual text feature is already used by coc.nvim which uses it to display "inlay Hints" provided by the texlab language server. This is illustrated by the following screenshots.

  1. Original text in Neovim with neither "inlay Hints" nor "WrapWidth" enabled: Screenshot 2024-01-22 at 16 33 15
  2. Same text in Neovim with texlab "inlay Hints" enabled but with "WrapWidth" disabled: Screenshot 2024-01-22 at 16 38 32
  3. Original text with texlab "inlay Hints" disabled and with "WrapWidth" enabled: Screenshot 2024-01-22 at 16 40 26
  4. Finally, the same text with both texlab "inlay Hints" and "WrapWidth" enabled: Screenshot 2024-01-22 at 16 42 22

So, there is clearly a problem of incompatibility of WrapWidth with other sources of virtual text. It is possible that there is no good solution to that problem (except having the functionnality hardcoded in the neovim core without any use of the virtual text feature). I don't know enough about the virtual text feature to answer that.

Do you think it is possible to have wrapwidth working when other sources of virtual text are enabled?

Thank you very much again, in any case, for the nice plugin.

Edit: FWIW this problem is discussed in the following issue https://github.com/neovim/neovim/issues/24804 But there may still remain an issue when the "virtual spaces" have to be inserted in the middle of a "inlay hint"...

PatrBal avatar Jan 22 '24 15:01 PatrBal