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

Documentation on how to add Treesitter support for a custom language #344

Open
altnp opened this issue Apr 15, 2024 · 2 comments
Open

Documentation on how to add Treesitter support for a custom language #344

altnp opened this issue Apr 15, 2024 · 2 comments

Comments

@altnp
Copy link

altnp commented Apr 15, 2024

I would like to add support for C# by just inheriting the basic C syntax.

I have tried adding a /after/queries/cs/matchup.scm file with just ; inherits c without any luck. (I confirmed that C files are working just fine as expected).

image

What else is needed to make this work? Adding some documentation would be appreciated!

@altnp
Copy link
Author

altnp commented Apr 15, 2024

I figured out it should have been in a c_sharp folder, not CS, however now I get errors about undefined node type.

@wisp3rwind
Copy link
Contributor

You can use the :InspectTree command when editing a C# file (requires recent neovim) to check what the exact nodes are that C# is parsed to. This is probably (very?) different from C.

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

No branches or pull requests

2 participants