Service Autocomplete (code completions)

Maybe look to see how sleitnick solved the problem with his module autocomplete plugin?

The difference is hes replacing what the user inputs so for example :TestMod becomes local TestModule = require(ā€¦TestModule) etc my plugin isnā€™t doing this.

Also his plugin isnā€™t inserting any new lines which I believe is the reason my plugin is broke at the moment.

Iā€™m gonna give it until next wednesdays update and take it from there. But as far as im concerned the problem my plugin is facing is a script error bug where for some reason inserting a new line is now making the auto complete prompt appear at the beginning of the script.

If u press tab to insert the plugin will work perfectly at the moment.

Fixed the plugin :tada: consider enabling auto update for the future

Also fixed a bug where the plugin wouldnā€™t insert into the correct position

Added support for inserting based on the length of the service as requested by @SomeFedoraGuy:

Change how the plugin inserts new services by running Shared.ServiceSortType()

only two modes supported right now
Shared.ServiceSortType(ā€œAlphabeticalā€)
Shared.ServiceSortType(ā€œLengthā€)
these functions only need to be run once and will be saved to the local machine for future use.

Link to the github: GitHub - Baileyeatspizza/Service-Autocomplete: Roblox studio port of service autocompletion roblox LSP provides

3 Likes

Great update, thanks!

What I originally asked for would be a ā€œLengthInversedā€ here, which, in your screenshot, would start at and ā€œServerScriptServiceā€ end at ā€œTeamsā€.

1 Like

Ahh that makes a lot more sense lol

Here you go:

Just quickly update the plugin

1 Like

It would be good when you press enter it doesnt go on the top of all statements by its own.
And please fix when i typed for Example Replicated and I press enter
It should delete the keyword I wrote already and replace with the autocompleted line.

1 Like

This solves the issue of breaking my freaking fingers to define many services

One suggestion is that when you hit Enter, the keyword should be instantly removed as you hit Enter, so I donā€™t have to manually edit it


Here is the video of the issue, or create a setting to disable it

I know @Grip_All already explained it but Iā€™m explaining it better

ah thanks a few people have said this but I wasnā€™t sure what they were referring to.

I am not going to implement this the plugin was designed to add services as ur writing code for example in the code below replicated storage will be added to the top of the script when its autocompleted

local part = ReplicatedStorage.SomePart

What you guys want is just the services defined but thereā€™s some edge cases which wonā€™t allow this to be implemented without problems

For example I write out ContentProvider:PreloadAsync() all on a new line however, if ā€œContentProviderā€ is removed the code ends up being :PreloadAsync() which is not what the user intended

Sorry, but for that reason the feature will not be added (if u find urself repeating the same service definitions in every script make a template to avoid editing the services)

1 Like

I have an idea, Why not add an setting, which defaults to how it works now, in case if someone gets annoyed by that, then they can disable the setting, also sometimes you can forget that you made a template, and some people like I are uncomfortable with templates

hey Ive just found out that your plugin doesnt have auto completion for MemoryStoreServiceā€¦

Is there a way to access the services with a period instead of GetService()?

This is literally bad practice why would it be implemented

4 Likes

Do some research and come back.

sorry if ur having difficulties with the plugin it detects the services currently present in ur studio instance which works great for most cases

but some services (maybe MemoryStoreService) arenā€™t present in studio by default and become available when GetService is used to request themā€¦

Iā€™ll add a hardcoded list of services to the plugin in the next update thatā€™ll fix it :tada: shoulda been added before but I forgot thanks for the reminder

1 Like