Closed Nexela closed 6 years ago
I second this, Autocomplete-Lua should search for the project directory or a directory where .luacheckrc
exists.
This should be doable: https://discuss.atom.io/t/project-folder-path-of-opened-file/24846/14
Note that it needs to check if the file is not unsaved, and if there is actually a project it belongs to. If the file doesn't belong to a project, but is a saved file, the CWD should be the path where the file resides.
This sounds like a good idea. I'll have time for this project again soon and I'll also make this change.
Implemented in b6c45dc
I currently use a setup like this
/main.lua |--Lib/libfile.lua |--Script/scriptfile.lua
In scriptfile.lua if I require("lib/libfile") I don't get the autocompletes from the require. If I do it from main.lua I get them just fine.
My lua_path has ./?.lua
The only way I have found to get them to work correctly is to add a .luacompleterc file in the project root with the hardcoded path to the project.
I would like to avoid a.) hardcoing the path and b.) having to use a the .luacompleterc file period if I don't have too
Am I missing something or is this currently not possible?