Roblox LSP - Full Intellisense for Roblox and Luau!

Now this automomplete from kampfkarren’s plugin will be a relic of the past, thank god.

1 Like

That’s not from Roblox LSP but from Kampfkarren’s Roblox Lua Autocompletes extension.

Yeah, but until this came out that was one of the best autocompletes extensions to use for roblox. Since this has came out, it has improved our roblox autocompletes drastically.

EDIT: I got the name wrong! I’ve edited it to be correct. My bad!

Damn, why can’t Roblox studio have this kind of syntax? Good resource

3 Likes

Small bug, when I have a settings module like:
image

And try to reference an index like Wait Refresh Time

It doesn’t continue autocomplete past the first letter (type W shows Wait Refresh Time but typing Wa does not show it anymore, it adds an extra set of brackets (which could make the entire thing a string, although that might be related to the fact that it puts ENV_ before it.

Other bug is that when doing something similar with a single word index:

Not quotations are included which should be there.

Small bugs though - this is an amazing extension that is really helpful when coding with VSC/Rojo! Hopefully these small fixes can be added!

1 Like

I see thanks for reporting it, I will fix it for next update.

Btw, I think you don’t need to use strings, you can just do:

local module = {
    Client = {
        "Data"
    },
    Server = {},
    WaitRefreshTime = 0.2
}

and have better autocomplete.

You can do so by editing the settings.json file for your workspace and include:

{
"editor.tokenColorCustomizations": {
        "comments": "#628f5c",
        "functions": "#5697d3",
        "keywords": "#835ea5",
        "numbers": "#dba24c",
        "strings": "#c98383",
        "variables": "#8a8a8a", 
        "types": "#309eb9",
        "textMateRules": [
            {
                "scope": "constant.language.lua",
                "settings": { "foreground": "#7b9bf1" }
            },
      },
}

that’s a snippet of what I have in mine. This allows you to change every individual token color you like.
“entity.name.function.lua” for functions.
“keyword.operator.lua” for operators.
“keyword.local.lua” for locals
and more.

1 Like

@Nightrains I have an issue that recently happened.

I had set up the boolean colors to be different. Red for false and Green for true.

However support for it seems to have been removed? It is now going based on contant.language.lua for both and ignoring what I had for it:

        "textMateRules": [
            {
                "scope": "constant.language.lua",
                "settings": { "foreground": "#7b9bf1" }
            },
            {
                "scope": "constant.language.boolean.false.lua",
                "settings": { "foreground": "#e64040" }
            },
            {
                "scope": "constant.language.boolean.true.lua",
                "settings": { "foreground": "#64d864" }
            },

Not sure if your update broke it or an update VSCode did. If it can’t be resolved by Roblox LSP then no worries.

Edit: (2 hours later) Just ran into another weird issue: BrickColor warning for not using number? lol


@https_KingPie yea it’s better to use: #Settings.Client than #Settings["Client"] :slight_smile:

The plugin doesn’t connect to VSCode, and it doesn’t work in VSCode. I don’t have lua installed, and it is running on the port.

Here’s my studio error, no errors in VSC.

10:47:13.298 [Roblox LSP] Failed to connect: HttpError: ConnectFail - Studio

10:47:13.298 Make sure the VSCode Extension is running and hosting: http://127.0.0.1:27843 - Studiot

I have had no issues with the setup process. I added RobloxLSP extension to VSCode and got the RobloxLSP Plugin for studio. Starting up both VSCode and Roblox Studio then clicking the Start button on the plugin prints that it connects, and in VSCode I can do workspace. and it shows a list of objects I have in workspace. If its not doing that for you, make sure the port number is the same (i didn’t need to change this, I left it using the default). Also try making sure your firewall isn’t blocking the 2 programs from communicating.

The port is the same. The firewall thing, I honestly don’t know how to do, i’m on a mac. Is the extension able to work without the plugin? For me it doesn’t, so I just want to see if there’s something else involved that i’m missing.

Never had a mac, not sure how to check that, try googling it? Also yes you need the plugin for Studio and the extension for VSCode active for this to work.

Just checked. My firewall isn’t blocking it, so that definitely isn’t it. I do have the plugin and extension both running as well.

I guess wait until the plugin owner replies. My only other guess is that maybe its probably not compatible with mac pc’s but I wouldn’t know for sure lol.

1 Like

Yes I changed it to hot fix a bug, sorry about that, I didn’t think about people like you using it that way.

For the second problem, it’s very weird because that should not happen and it doens’t happen to me, make sure it works after reloading vscode and that you don’t have any type annotations that changes it.

1 Like

Thanks dude, you helped me a lot!

You shouldn’t repeat the same message.

I already responded you yesterday on github, we should solve this there.

Oh sorry, I didn’t see that, I deleted it.

How do I find the option to do this? Since I do not know where the Lua > Workspace is.

Nevermind, found it in extension settings