SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
935 stars 13 forks source link

Smarter brackets and tags completion #296

Open Curculigo opened 3 months ago

Curculigo commented 3 months ago

Currently, it will blindly insert the closing brackets and tags without considering the context.

SpartanJ commented 3 months ago

This is not easy and I don't think there's a way to implement it perfectly. Even with the context you cannot always infer the user intention, that's why I personally don't like most auto-close features (except for auto-close tags that it actually saves you time). There's currently some very basic logic to avoid auto inserting extra close brackets on some cases but it will not be enough. More info in issue #121.