Open LastTalon opened 1 year ago
I think this is something that needs to be set in the language-configuration.json or syntax file, although I'm not yet sure how to do this.
I notice that it also looks like sumneko's Lua also doesn't do this, so maybe it's unknown if it's even possible
I notice that it also looks like sumneko's Lua also doesn't do this, so maybe it's unknown if it's even possible
This extension does this for me. Perhaps its a setting I have set with it?
It did not work for me, would be interesting to know if yours is different
For me that extension operates exactly as described. I checked the settings I use and don't see any that would affect this behavior.
I've tested it while disabling all other extensions as well with the same behavior. And for completeness, Roblox LSP, based on the Lua LSP, also has this behavior.
Let me know if you still need help getting this behavior from other lsps. We can talk in real time if that helps.
I was still unable to reproduce this with the stock Lua grammar in VSCode or the sumneko extension. Can you screen capture the example behaviour you are looking for?
Here's a short clip of the behavior I get when using sumneko's extension. I looked and don't see any particular setting for it, so I believe it should be active all the time with that extension.
https://user-images.githubusercontent.com/2075484/211166240-e2325865-f65b-4bc2-b14b-84b4335b4387.mp4
I'm not using any Lua LSPs actively at the moment, so my ability to test/encounter these behaviors is going to be slow until I'm actively using them again.
When writing code I often encounter the situation where I leave a block empty temporarily to come back to it later. This ends up looking something like this.
Later, when I return to add this I place my cursor and add a new line, which results in something like this.
However it would be much more convenient (and expected) for this to autoexpand to something like this.
This would give it similar behavior to table expansion, like the following.
When using the same workflow currently becomes this.