mickeynp / combobulate

Structured Editing and Navigation in Emacs with Tree-Sitter
GNU General Public License v3.0
945 stars 54 forks source link

When typing an arrow function in Typescript, it will wrongly close a JSX tag #30

Closed davazp closed 1 year ago

davazp commented 1 year ago

In typescript-ts-mode, when writing JSX, an arrow function inside a prop will close the JSX tag.

For example, with this snippet, (_|_) si the cursor position.

function Test () {
  return <Component prop={x=_|_}></Component>
}

If I type > to continue typing an arrow function, it will autocomplete to:

function Test () {
  return <Component prop={x=>_|_</Component>}></Component>
}
mickeynp commented 1 year ago

I've fixed this in master also. Can you try?

davazp commented 1 year ago

It is fixed. Thanks!