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

Does work with treesitter? #263

Open
javeoff opened this issue Feb 18, 2023 · 6 comments
Open

Does work with treesitter? #263

javeoff opened this issue Feb 18, 2023 · 6 comments

Comments

@javeoff
Copy link

javeoff commented Feb 18, 2023

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
Copy link
Author

javeoff commented Feb 18, 2023

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
Copy link
Owner

HerringtonDarkholme commented Feb 18, 2023

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
Copy link
Author

javeoff commented Feb 18, 2023

@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
Copy link
Author

javeoff commented Feb 18, 2023

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:

  • Disable treesitter highlights

Current result:

  • Generic types have highlight tsGenerics - good!
  • Jsx elements have highlights - good!
  • some tags applied highlights from yats, but not for all syntax elements.

@javeoff
Copy link
Author

javeoff commented Feb 28, 2023

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
Copy link
Owner

HerringtonDarkholme commented Feb 28, 2023

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

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

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

2 participants