zenbones.nvim icon indicating copy to clipboard operation
zenbones.nvim copied to clipboard

Entirety of JS/TS tagged template literal is italic

Open benfrain opened this issue 3 years ago • 3 comments

Thanks for zenbones!

One thing I've noticed is that when using TS/JS files, the entirety of the contents of template literal strings are in italics which makes it a little difficult to read at times:

image

For comparison here is the same thing in nightfox image

I wonder if this is an intentional choice or if there is a way of of doing something different in named template literals, where the content is often HTML templates as strings?

benfrain avatar Feb 17 '22 11:02 benfrain

Thanks for reporting, that's definitely not intentional. Ideally, we want to handle tagged templates differently. Do you have an insight on how to achieve that? Maybe we have to adjust something upstream in https://github.com/nvim-treesitter/nvim-treesitter?

It seems it's treated as a normal string in nvim-treesitter. I wonder if we can adjust the query to treat it as TSStringSpecial instead so that we can assign a more specific hl group (one that is without italic). Screen Shot 2022-02-18 at 8 47 51 AM

mcchrish avatar Feb 18 '22 00:02 mcchrish

same for yaml:

Selection_004

zbindenren avatar Mar 15 '22 13:03 zbindenren

Related to: https://github.com/nvim-treesitter/nvim-treesitter/issues/4157

mcchrish avatar Jun 18 '23 00:06 mcchrish