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

indentation in a multi language doc #6136

Open
colin-ryan-airm opened this issue Feb 19, 2024 · 5 comments
Open

indentation in a multi language doc #6136

colin-ryan-airm opened this issue Feb 19, 2024 · 5 comments
Labels
indent Issues or PRs about indentation queries or module

Comments

@colin-ryan-airm
Copy link

Hello,

I'm writing GraphQL queries within a string inside a JS/TS file. I can get highlighting to work with an injection query but indentation is acting like a string instead of GraphQL. Is there anything else I need to do to support indentation for for multi language docs?

Thanks!

@colin-ryan-airm colin-ryan-airm changed the title indentation in a multi language file indentation in a multi language doc Feb 19, 2024
@lucario387
Copy link
Member

Is there graphql indent queries

@colin-ryan-airm
Copy link
Author

@lucario387 The legend in CheckHealth suggest that the graphql package installed has indent support. I haven't done anything custom with it.

@lucario387
Copy link
Member

Found it

https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/ecma/indents.scm#L72

Template_string is always ignored, so I suspect that's why

@colin-ryan-airm
Copy link
Author

@lucario387 Thanks. SO if I copy this into a indents.scm file and modify it I can fix it you think?

@lucario387
Copy link
Member

I believe so.

@clason clason added the indent Issues or PRs about indentation queries or module label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indent Issues or PRs about indentation queries or module
Projects
None yet
Development

No branches or pull requests

3 participants