Compare commits

...

3 commits

Author SHA1 Message Date
Timofey Khoruzhii 41c8f0c633 add nix
All checks were successful
Clang-format Check / clang-format-check (push) Successful in 18s
Tests Check / test-check (push) Successful in 2m20s
2023-05-12 19:34:40 +03:00
Timofey Khoruzhii d71806a941 fix bug 2023-05-12 19:33:40 +03:00
Timofey Khoruzhii e54097c38d add suggestion 2023-05-12 19:21:12 +03:00
3 changed files with 11 additions and 4 deletions

View file

@ -0,0 +1,5 @@
local cmd = require("cmd").cmd
return function(line)
cmd('nix develop -c "' .. line .. '"')
end

View file

@ -118,7 +118,6 @@ void LuaLoader::Import(const std::string& name, const std::string& field, int ta
void LuaLoader::ParseImport() { void LuaLoader::ParseImport() {
if (!lua_istable(L, -1)) { if (!lua_istable(L, -1)) {
lua_pop(L, 1);
return; return;
} }

View file

@ -47,6 +47,12 @@ int main(int argc, char* argv[]) {
for (auto script_name : scripts) { for (auto script_name : scripts) {
lua.LoadToGlobal(script_name); 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") { if (script_name == "main") {
auto all_scripts = lua.GetListScripts("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 (...) { } catch (...) {
} }