Compare commits

..

No commits in common. "40e91c0226cecdd9611d82964b6d00cd8d9f417a" and "4918f2bcee3a98aec2457438a95b2fd34db38eba" have entirely different histories.

4 changed files with 8 additions and 10 deletions

View File

@ -57,14 +57,7 @@ return {
"--query-driver=/usr/bin/*gcc", "--query-driver=/usr/bin/*gcc",
"--function-arg-placeholders=0", "--function-arg-placeholders=0",
}, },
root_dir = function(path) root_dir = require("lspconfig.util").root_pattern(".git") or vim.fn.getcwd(),
local normal = require("lspconfig.util").root_pattern(".git")(vim.fn.getcwd())
if normal then
return normal
else
return vim.fn.getcwd()
end
end,
filetypes = { "cpp", "c" }, filetypes = { "cpp", "c" },
capabilities = { capabilities = {
offsetEncoding = "utf-8", offsetEncoding = "utf-8",

View File

@ -7,14 +7,15 @@ return {
-- c = "~/.config/nvim/templates/template.c" -- c = "~/.config/nvim/templates/template.c"
-- } -- }
template_file = "~/.config/nvim/templates/template.$(FEXT)", template_file = "~/.config/nvim/templates/template.$(FEXT)",
evaluate_template_modifiers = true,
received_contests_directory = "/tmp/Competitive Programming/$(JUDGE)/$(CONTEST)", received_contests_directory = "/tmp/Competitive Programming/$(JUDGE)/$(CONTEST)",
received_problems_path = function(task, extension) received_problems_path = function(task, extension)
local hyphen = string.find(task.group, " %- ") local hyphen = string.find(task.group, " %- ")
if hyphen == nil then if hyphen == nil then
return string.format("%s/%s/%s.%s", vim.fn.getcwd(), task.name, task.name, extension):gsub("#", " ") return string.format("%s/%s/%s.%s", vim.fn.getcwd(), task.name, task.name, extension)
else else
local contest = string.sub(task.group, hyphen + 3) local contest = string.sub(task.group, hyphen + 3)
return string.format("%s/%s/%s.%s", vim.fn.getcwd(), contest, task.name, extension):gsub("#", " ") return string.format("%s/%s/%s.%s", vim.fn.getcwd(), contest, task.name, extension)
end end
end, end,
testcases_use_single_file = true, testcases_use_single_file = true,

View File

@ -1,3 +1,5 @@
/* Problem URL: $(URL) */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>

View File

@ -1,3 +1,5 @@
/* Problem URL: $(URL) */
#include <bits/stdc++.h> #include <bits/stdc++.h>
using namespace std; using namespace std;