Compare commits
3 commits
5c69b735a8
...
41c8f0c633
Author | SHA1 | Date | |
---|---|---|---|
Timofey Khoruzhii | 41c8f0c633 | ||
Timofey Khoruzhii | d71806a941 | ||
Timofey Khoruzhii | e54097c38d |
5
assets/lua/global/nix.lua
Normal file
5
assets/lua/global/nix.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
local cmd = require("cmd").cmd
|
||||
|
||||
return function(line)
|
||||
cmd('nix develop -c "' .. line .. '"')
|
||||
end
|
|
@ -118,7 +118,6 @@ void LuaLoader::Import(const std::string& name, const std::string& field, int ta
|
|||
|
||||
void LuaLoader::ParseImport() {
|
||||
if (!lua_istable(L, -1)) {
|
||||
lua_pop(L, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,12 @@ int main(int argc, char* argv[]) {
|
|||
for (auto script_name : scripts) {
|
||||
lua.LoadToGlobal(script_name);
|
||||
|
||||
parser.AddRule(MakePattern({".", "config", script_name.string().data()}),
|
||||
[&projects](auto& args) {
|
||||
const auto& project = projects.GetProject();
|
||||
OpenFileInEditor(project.GetPathToScripts() / (args[3] + ".lua"));
|
||||
});
|
||||
|
||||
if (script_name == "main") {
|
||||
auto all_scripts = lua.GetListScripts("main");
|
||||
|
||||
|
@ -68,9 +74,6 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (std::find(scripts.begin(), scripts.end(), "main") != scripts.end()) {
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue