mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Add autocomplete details to (1c)
This commit is contained in:
parent
86e531e3a5
commit
07309fc9a6
1 changed files with 6 additions and 1 deletions
|
@ -91,7 +91,12 @@ require("./libs/dependency")
|
|||
require("@libs/dependency")
|
||||
```
|
||||
|
||||
The main drawback of this approach is that it is not backwards compatible with any existing code that uses unprefixed require statements.
|
||||
A benefit of this approach is that the role of autocomplete becomes fairly well-defined.
|
||||
When `require("` is typed, autocomplete has only three options to display: the `@`, `./`, and `../` prefixes.
|
||||
After a prefix has been typed, autocomplete will either display defined aliases or local modules, depending on the prefix.
|
||||
Approaches (1a) and (1b) would be less clear about this, as `require("` could be followed by a string component or one of the three prefixes.
|
||||
|
||||
The main drawback of this approach is that it is not backwards compatible with any existing code that uses unprefixed require statements and may result in code that looks cluttered.
|
||||
|
||||
### (2) Strongly recommend explicit prefixes
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue