Module Auto-completion Plugin

Hello there!

I made a plugin that automatically requires ModuleScripts for you, and also gets the necessary Services for the requirement. This is the first plugin I have ever released, so if you find any bugs, please let me know!

Features:

  • Autocompletes ModuleScripts via auto-completion selection
  • Also gets the necessary Services

Link to the plugin: Module Autocompletion

And a clip of me using it:

worlds

8 Likes

Hi, ive found a few problems :frowning:

  1. Imports show up when they shouldn’t
    Imports show up when defining var names, in multiline strings, in function name definitions, in for loop params, and in function params, just places where you 100% don’t want any imports
    Tho it doesn’t show up in multiline comments and singleline strings so all you gotta do is extend this

  2. Auto import doesn’t work if an unrelated variable has the same name
    It should only be disabled if an import of the same name has the same var name, tho it’s not much of a problem ig
    image

  3. Autocomplete does not change if the names/locations of any modules are changed
    Lets say I enabled the plugin with some module in ReplicatedStorage called MyModule and i renamed it to MyModuleCool, the autocomplete does not reflect that change.
    Same thing for if i move it somewhere else, the path does not change

  4. If a module name has punctuation other than _ or any other special character, the path name is not changed into a string computed access
    Lets say I have a module named “My Module”, the plugin autocompletes this as the path:
    ReplicatedStorage.My Module
    When it really should be
    ReplicatedStorage["My Module"]

  5. Plugin does not find the shortest path
    Lets say I wanna require a module which is inside script, you’d expect the path to be script.MyModule, but since the plugin is game-relative that means it’ll always use the global path instead of the script-relative one :confused:

  6. Plugin does not care about order
    If i define multiple things after one another, this happens:
    image

All of these are issues which aren’t present in my own plugin SimpleComplete tho this is a pretty good beginner plugin so thumbs up :slight_smile:

1 Like

Thanks for the honest feedback! I will try to fix all the bugs you mentioned and update the plugin as soon as possible! I just did not test the plugin enough I think

1 Like

Update V1.01:

New features:

  • Updates ModuleScripts when you rename them

Fixes:

  • Formatation of Modules with a space in their name is now fixed
  • Some of the unwanted import show-ups
  • Order is also fixed
1 Like

Hello, still a few issues:

  1. Find shortest path doesn’t work and theres newlines between every module import for sum reason (Also special characters still in variables :frowning: )

  2. Import context validation fails in multiline comments, multiline strings (in the line of the closing bracket ]]), and in for counter loop args (should only be invalid when for var| = 10, however for all the other args it should import)

  3. Imports show up in method calls

  4. Imports dont show up after strings when in the same line

  5. Imports showing up in anonymous function params

  6. Import priorities are too high
    Ideally the priority of imports should be far below the normal completion items, as normal items are more likely to be used so imports would just be obstructing

  7. Having service names to anything other than their GetService name breaks the plugin

  8. Imports dont show up in for loop iterator arg

Overall it’s good progress but much things to irron out

2 Likes

Thanks for the feedback again, I fixed a few stuff, but not the shortest path and the function calls yet.

1 Like