apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.64k stars 844 forks source link

[TS] Automatic closing bracket is missing, when inserting opening bracket #7790

Open Chris2011 opened 4 days ago

Chris2011 commented 4 days ago

Description

When I type "export class Test {" and hitting enter, the editor sets the cursor into the correct position but without adding an automatic closing bracket as for JS or other languages.

Use case/motivation

For the first thing I would suggest to do the same as for JS and later on, we can add an option to hit { and it automatically adds a closing bracket as for ( in js. So this should work for normal, array diamond (in the right context) and block brackets.

Related issues

No response

Are you willing to submit a pull request?

Yes

matthiasblaesing commented 3 days ago

This is the behavior of the LSP module. Needs to be checked if it is even possible to configure the typescript LSP, so that it conforms to NB default behavior.

Chris2011 commented 3 days ago

Yes I thought so too. I think it is not possible to get everything 100% from the LSP so we need to interop with it and extends the stuff. But I dunno yet. I thought I will just add this w/o touching LSP.