Roblox LSP - Full Intellisense for Roblox and Luau!

It recognizes the class of the Instance, but that’s all.

I got used to using the function autocomplete with this LSP, but using the if statement autocomplete is really hard because it only triggers within the word “if”, and I type relatively fast (100-120 wpm) and it literally does not pick that I am writing an if statement until I am already past the word.

I feel it would be way easier if the LSP just followed behind what studio does and trigger the ‘end’ autocomplete whenever it sees the “then” word in the first line of an if statement. I find that approach really clean and intuitive, and it never misses an autocomplete if I type too fast.

Unfortunately every time I happen to go back to the studio script editor to fix one or two scripts not within my Rojo configuration, I always find I miss that functionality.

This feature can be added but is very tricky, and people who use vscode (and other external editors) are used to snippets, so it’s not my priority to add this.

Anyways, I’ll see if I can implement it because I got time.

2 Likes

Thank you!
I was also thinking of maybe getting my own hands dirty here to get this small feature. Whatever works to make this happen!

1 Like

It’s done, next update it will be live (0.15.1).

1 Like

https://i.gyazo.com/e6f815cc3dbeb48651e075e165a953e4.mp4

Not sure if I’m doing something wrong?

Make sure editor.formatOnType is enabled:
image

Also, if the line is the last line of the code, when autocompleting the end the cursor will be moved next to it, otherwise it will work exactly like Roblox Studio, I can’t solve this at the moment.

It is on, and I just did this again with a new script that is 6 lines long, started writing the if-statement on line 1.

I was not talking about that setting.

Ah this setting is within VSCode itself. It was off, and now it works! Thank you so much for the work!

1 Like

Do you have any projection on when you’ll ship the semantic highlighting fix addressed by Polyhex? I noticed there were two new recent builds, but neither seem to fix the odd editor coloration that popped up in and beyond 0.14.2.

It’s fixed, what theme are you using?

Oh? I’m using a Gruvbox suite. Give me a little (I’m on mobile currently) and I’ll send you the exact VSC extension link.

Here’s the link: Gruvbox Themes - Visual Studio Marketplace

For reference, this is Gruvbox Dark (Medium) on 0.14.1:

…and 0.15.1:

1 Like

It’s seems the problem is your theme.

I tested it with both .lua and .javascript and they look similar:

Roblox LSP is based on JavaScript.

There is another theme called Gruvbox Material and it looks like this:

So it definitely works as it should.

2 Likes

Ah, okay. I’ll check the Material one as an alternative. Is there any configuration I can use to get the semantic highlighting shown in the aforementioned 0.14.1 example?

Yes there are settings in VSCode to modify the color of tokens, I don’t remember how to do it.

1 Like

All good; I’ll take a look at it. Thanks for the support!

The ROBLOX LSP plugin produces significant lag when I run it, even when I am not modifying, creating, removing, etc. any instances.

Is this a known issue, or perhaps something unique on my part?

The Roblox LSP Plugin only does something when an Instance is added, removed, or renamed, make sure you don’t have another plugin that does that constantly.

If not, try to add to the exclude list instances that may contain a lot of descendants, like game.Workspace.