HerringtonDarkholme / yats.vim

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim
Vim License
649 stars 68 forks source link

Does work with treesitter? #263

Open javeoff opened 1 year ago

javeoff commented 1 year ago

I prefer this plugin is must have for typescript developer, but i also have treesitter plugin, that assign node groups as common tags. With yats i does not have any highlight groups in ts code but treesitter identified nodes. My theme creates highlights from treesitter nodes. Created typescript highlights are not assign to any nodes in ts code.

May be i have another plugins, that breaks yats? Please, help!

My plugins list image image
javeoff commented 1 year ago

I disabled treesitter highlighting and got this result. Some nodes in code do not have highliting group. I do not know why. I tried to set different filetypes and syntax in the editor, but nothing changed

image
HerringtonDarkholme commented 1 year ago

Sorry I didn't get what you mean.

that assign node groups as common tags

What's node groups?

Created typescript highlights are not assign to any nodes in ts code.

What does this mean?

In case you need translation support, you can try deepl https://www.deepl.com/en/translator

javeoff commented 1 year ago

@HerringtonDarkholme

In common, after disabling treesitter highlight nodes (for ex. Checkbox, FC, IProps) Do not have any highlights. But keys in the IProps have foldBraces highlight.

I mean, common tags is a highlights in the code syntax. Typescript highlights had only common highlights while treesitter was enabled, after disable it, now i have case in the second message.

javeoff commented 1 year ago
There is code with :TSEnable highlight image
There is code with :TSDisable highlight image

Problem: IProps, Checkbox, FC dont have highlight groups

My steps to fix:

Current result:

javeoff commented 1 year ago

May i explain more? I just want to highlight syntax elements like in ide. I can't do it perhaps because I have treesitter.

HerringtonDarkholme commented 1 year ago

The easy way to disable highlighting is using TSDisable highlight in neovim.

Sadly, a highlighting syntax cannot co-exist with tree-sitter highlighting.