Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entirety of JS/TS tagged template literal is italic #79

Open
benfrain opened this issue Feb 17, 2022 · 3 comments
Open

Entirety of JS/TS tagged template literal is italic #79

benfrain opened this issue Feb 17, 2022 · 3 comments

Comments

@benfrain
Copy link

benfrain commented Feb 17, 2022

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 benfrain changed the title Entirety of JS/TS template literal is italic Entirety of JS/TS named template literal is italic Feb 17, 2022
@mcchrish
Copy link
Collaborator

mcchrish commented Feb 18, 2022

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 mcchrish changed the title Entirety of JS/TS named template literal is italic Entirety of JS/TS tagged template literal is italic Feb 18, 2022
@zbindenren
Copy link

same for yaml:

Selection_004

@mcchrish
Copy link
Collaborator

Related to: nvim-treesitter/nvim-treesitter#4157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants