todo-comments.nvim icon indicating copy to clipboard operation
todo-comments.nvim copied to clipboard

Idea: conceal comment marker for matched lines

Open gegoune opened this issue 4 years ago • 3 comments

I think this could be quite cool actually. Given nature of what this plugin does there is no need to see comment strings on lines that were highlighted by todo. What do you think?

gegoune avatar May 13 '21 21:05 gegoune

Good point! I'll see to add this :)

folke avatar May 13 '21 21:05 folke

It's actually not that easy to implement this in a clean way.

Right now, todo-comments uses the highlight API and works regardless of buffers highlighted using treesitter or syntax ruls.

By default, treesitter disables syntax, so any syn rules with conceal would not run.

You can enable the hidden treesitter option additional_vim_regex_highlighting = true, to have it also run any syntax rules, but that might of course have a lot of side effects from syn rules that were loaded by ftplugins.

I'd rather wait until Neovim adds proper conceal support to the decorator api.

folke avatar May 15 '21 13:05 folke

Ah,I see, didn't realise that. Thanks for detailed explanation. Personally I don't want to enable that setting in treesitter.

I still think it would be nice if that could be implemented but not at cost of hacks or some ugly code. If you are keen on this feature please keep that issue open. Close it otherwise. Once again, big thanks!

gegoune avatar May 15 '21 13:05 gegoune