From 9f55dc23624aad76234ca3b92d5233775b438c10 Mon Sep 17 00:00:00 2001 From: Segcolt <9hmbzr275@mozmail.com> Date: Sat, 9 Nov 2024 11:38:18 -0300 Subject: [PATCH] Fix a stupid problem Apparenlty having a "#" in the file path breaks everything so I had to just replace that. --- lua/plugins/competitest.lua | 5 ++--- templates/template.c | 2 -- templates/template.cpp | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lua/plugins/competitest.lua b/lua/plugins/competitest.lua index 46bd8e2..e8d1587 100644 --- a/lua/plugins/competitest.lua +++ b/lua/plugins/competitest.lua @@ -7,15 +7,14 @@ return { -- c = "~/.config/nvim/templates/template.c" -- } template_file = "~/.config/nvim/templates/template.$(FEXT)", - evaluate_template_modifiers = true, received_contests_directory = "/tmp/Competitive Programming/$(JUDGE)/$(CONTEST)", received_problems_path = function(task, extension) local hyphen = string.find(task.group, " %- ") if hyphen == nil then - return string.format("%s/%s/%s.%s", vim.fn.getcwd(), task.name, task.name, extension) + return string.format("%s/%s/%s.%s", vim.fn.getcwd(), task.name, task.name, extension):gsub("#", " ") else local contest = string.sub(task.group, hyphen + 3) - return string.format("%s/%s/%s.%s", vim.fn.getcwd(), contest, task.name, extension) + return string.format("%s/%s/%s.%s", vim.fn.getcwd(), contest, task.name, extension):gsub("#", " ") end end, testcases_use_single_file = true, diff --git a/templates/template.c b/templates/template.c index 0eafcbe..a3cc909 100644 --- a/templates/template.c +++ b/templates/template.c @@ -1,5 +1,3 @@ -/* Problem URL: $(URL) */ - #include #include #include diff --git a/templates/template.cpp b/templates/template.cpp index 160587c..ad113a7 100644 --- a/templates/template.cpp +++ b/templates/template.cpp @@ -1,5 +1,3 @@ -/* Problem URL: $(URL) */ - #include using namespace std;