JohnnyMorganz / luau-lsp

Language Server Implementation for Luau
MIT License
204 stars 52 forks source link

When autocompleting end, the bracket sometimes isn't added when needed #600

Open AliBussell opened 3 months ago

AliBussell commented 3 months ago

See below; https://github.com/JohnnyMorganz/luau-lsp/assets/166288422/9619b5c3-d77a-463f-b289-0c864e5013ee

JohnnyMorganz commented 2 months ago

This looks like user error to me - you are deleting the brackets that got added, then autocompleting the end? I don't see why we should add the brackets there afterwards

lolmanurfunny commented 1 month ago

Just experienced this myself a minute ago and it clicked.

Here's a recreation of that:

https://github.com/JohnnyMorganz/luau-lsp/assets/77128366/7666c97e-6526-44b1-8103-407eaf7dd508

I went to cut the RunService.PreAnimation:Once(function() portion that was in foo so I could paste it into bar.


The initial video comes off as unnatural since it's merely a showcase of the current behavior rather than a realistic scenario.

AliBussell commented 1 month ago

@lolmanurfunny Glad someone else could figure out what I mean by this.