Compare commits
2 Commits
4918f2bcee
...
40e91c0226
| Author | SHA1 | Date | |
|---|---|---|---|
| 40e91c0226 | |||
| 9f55dc2362 |
@ -57,7 +57,14 @@ return {
|
||||
"--query-driver=/usr/bin/*gcc",
|
||||
"--function-arg-placeholders=0",
|
||||
},
|
||||
root_dir = require("lspconfig.util").root_pattern(".git") or vim.fn.getcwd(),
|
||||
root_dir = function(path)
|
||||
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" },
|
||||
capabilities = {
|
||||
offsetEncoding = "utf-8",
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* Problem URL: $(URL) */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* Problem URL: $(URL) */
|
||||
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user