move definition files type to map or array, add default names to array definition files - #49
move definition files type to map or array, add default names to array definition files#49nnullcolumn wants to merge 1 commit into
Conversation
4teapo
left a comment
There was a problem hiding this comment.
Thanks for the PR! Overall looks good but I added a couple comments I think need to be resolved
| // Fold `luau-lsp.types.definitionFiles` into `settings.definitions` so all definition | ||
| // files are registered the same way. Like `definitions`, it may be either an array of | ||
| // paths (unnamed) or a map of package name -> path | ||
| match types.remove("definitionFiles") { |
There was a problem hiding this comment.
Might be best to just reuse the deserialize_definition_files function here?
| // avoid treating definition files as regular Luau files; it only looks at the paths, so | ||
| // package names are irrelevant here. Registration into the global scope is done instead | ||
| // via the `--definitions` CLI arguments built in `language_server_command`. | ||
| types.insert( |
There was a problem hiding this comment.
Probably should re-insert them with names as an object and resolve (optionalName, path) into (name, path) here already using the logic for replacing None-names; backwards compatibility in the language server might get removed some day as hinted to by todos in luau-lsp source, which could cause errors or definition files being treated as normal files, and it should only possibly be better to keep the names
|
will be coming back to work on this soon, been very busy |
full disclosure this was vibecoded
fixes #47
the human part (i'm so sorry i forgot to include this section on initial PR open):