What frameworks should I use?

I am a luau scripter and I currently use Knit. I don’t really like knit now since it doesn’t have IntelliSense (I’m legit those people that take forever to code without it). I use Roblox LSP + Knit plugin, but some places of IntelliSense still aren’t achievable. Are there any better frameworks that suit me? I know there is Firework framework and CanaryEngine 7. Any other frameworks you can suggest me. Don’t convince me that I should quit using frameworks or something like that. It’s how I code, makes me code faster and easier.

2 Likes

I’m not sure it’s possible to obtain Intellisense in a framework, but I’ve only ever used Knit.

The premise of a framework is that it acts as an interface between two scripts. However, since these scripts are linked to the framework at runtime, it’s effectively impossible to establish intellisense without type casting.

I highly recommend you read Stephen’s (creator of Knit) blog post about this very topic here.

2 Likes

To add onto this, you may wish to explore roblox-ts. With TypeScript’s advanced type system, it’s likely that you will be able to get Intellisense that you are looking for. However, this comes at the cost of package constraints.

1 Like

Yeah I know that flamework has IntelliSense. I may consider switching into TS later when I have time

I remember seeing an announcement that would allow for string requires, like require("name")
If so, we should be able to get some intellisense out of it.

Hi, I won’t recommend a framework but rather my fork of Roblox LSP, I added improved Knit support to it :).

1 Like

Thanks! I recently just realized for this plugin I shouldn’t do what I did for that code, or IntelliSense won’t work for the properties attached to the plugin. Instead create these outside of the method for Knit.CreateService() so IntelliSense can actually work. And instead of using Knit.GetService() you should just require the module individually

local DialogService = Knit.CreateService({
	Name = "DialogService",
	Prompt = require(script.Prompt), --DO NOT DO THAT
	Dialog = require(script.Dialog), --DO NOT DO THAT
	Client = {
		CreateDialog = Knit.CreateSignal(),
	},
})

DialogService.Prompt = require(script.Prompt)
DialogService.Dialog = require(script.Dialog)

Well requiring won’t work if it’s from a controller, because controllers can’t access ServerScriptService nor ServerStorage, guessing your services are there. But for the first part, yes, you need to set properties in the :Start function, for example.

so there isn’t IntelliSense for properties in knit?

The type is fixed to a service with no properties (only the Knit defaults); what you pass to the function doesn’t determine the return type. Adding properties after creating the service adds to the table and updates it’s type.

Is this what you mean? It doesn’t work for me

Hi, it’s usually:

self.duck = "this is a string"

That does work within the service, but trying to access it outside of the service using knit.GetService still doesn’t work, the properties doesn’t update even if I use self.duck = "this is a string".

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.