Skip to content

Conversation

@benyn
Copy link
Owner

@benyn benyn commented Feb 18, 2023

interface, type and enum declarations are now supported as class textobjects.

Known issues:

  • the last semicolon (;) of the inner text (interface, type) or the last comma of the inner text (enum) are missed.
  • an object declared with as const isn't supported (value: as_expression ending with type_identifier)

Related to nvim-treesitter#396

`interface`, `type` and `enum` declarations are now supported as class `textobject`s.

Known issues:
- the last semicolon (`;`) of the inner text (`interface`, `type`) or the last comma of the inner text (`enum`) are missed.
- an object [declared with `as const`](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums) isn't supported (`value: as_expression` ending with `type_identifier`)
`interface`, `type` and `enum` declarations are now supported as class `textobject`s. Tested and confirmed that trailing semicolons (`;`) and commas (`,`) are captured in `@class.inner`, if present.
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

Successfully merging this pull request may close these issues.

2 participants