CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
517 stars 84 forks source link

🐞 Double closing bracket output when typing opening bracket #23

Closed 0xWDG closed 1 year ago

0xWDG commented 2 years ago

If i type a new function (e.g.) function x( it appends ) which is great. What is less great, I'm also typing ), this will end in function x ()), it would be nice if it behaves more like VSCode does.

Happening now

https://user-images.githubusercontent.com/1290461/173197775-90976647-82da-42f9-a036-186bcc3fb34c.mov

Expectation

https://user-images.githubusercontent.com/1290461/173197784-44df068e-73e1-4a5a-ae5a-05711273e443.mov

lukepistrol commented 2 years ago

Good point! I would also like to find a better way to handle bracket pairs. Currently we cannot use " or ' because it gets stuck in an infinite loop.

lukepistrol commented 1 year ago

Could be implemented using https://github.com/ChimeHQ/TextFormation