Compare commits

...

2 Commits

Author SHA1 Message Date
40e91c0226 Fix astrolsp, again.
Apparently now it returns a function? Well, whatever, it works now.
2024-11-10 13:33:03 -03:00
9f55dc2362 Fix a stupid problem
Apparenlty having a "#" in the file path breaks everything so I had to
just replace that.
2024-11-09 11:38:18 -03:00
4 changed files with 10 additions and 8 deletions

View File

@ -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",

View File

@ -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,

View File

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

View File

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