vim-matchup icon indicating copy to clipboard operation
vim-matchup copied to clipboard

Documentation on how to add Treesitter support for a custom language

Open altnp opened this issue 2 years ago • 2 comments

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 avatar Apr 15 '24 03:04 altnp

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

altnp avatar Apr 15 '24 04:04 altnp

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.

wisp3rwind avatar Apr 26 '24 09:04 wisp3rwind