Compare commits

..

18 Commits

Author SHA1 Message Date
5a1094d59e Add new plugin 2026-02-16 18:06:26 -03:00
3b1762ad09 Fix GCC not allowing sanitizers to do their work 2026-01-16 19:36:00 -03:00
1566b7fdc1 Add transparencty to the config 2026-01-16 17:19:54 -03:00
f3d4395f72 Add INF constants 2025-12-15 12:45:33 -03:00
3227957636 Change again because now it looks cooler or something 2025-10-20 11:34:34 -03:00
83e4097ab7 Change template 2025-10-20 11:32:17 -03:00
80c8732d93 Change a lot of stuff 2025-09-05 20:20:58 -03:00
f39f45f415 Update some stuff 2025-04-28 18:08:49 -03:00
82d279e6d8 Add pt_br spell checking for this config. 2024-11-25 21:29:18 -03:00
8728b9c5da Add problems URL again.
My last commit removed them for some reason...
2024-11-10 13:50:47 -03:00
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
4918f2bcee Try to prevent that annoying message. 2024-10-03 13:11:23 -03:00
0f839d2f9a Fix the fucking clangd server
Finally fixed it, god dammit...
2024-10-02 15:59:04 -03:00
84414bc2d9 Fix the names of the lsp servers 2024-09-25 11:14:47 -03:00
aa32e1aff3 Add some "ensure_installed" stuff
Just so I don't have to keep installing these stuffs
everytime I keep installing this config on my university
computers.
2024-09-25 09:47:12 -03:00
63ad4556f6 Update competitest plugin to insert problem url
This is the second time I'm doing this, I'm an idiot who
didn't pushed last time!
2024-09-24 16:32:42 -03:00
f9738ca92b Update competitest plugin 2024-09-23 16:16:16 -03:00
15 changed files with 202 additions and 24 deletions

View File

@@ -2,18 +2,19 @@ return {
"AstroNvim/astrocommunity", "AstroNvim/astrocommunity",
{ import = "astrocommunity.colorscheme.catppuccin" }, { import = "astrocommunity.colorscheme.catppuccin" },
-- { {
-- "catppuccin", "catppuccin",
-- opts = { opts = {
-- integrations = { integrations = {
-- ts_rainbow2 = true, ts_rainbow2 = true,
-- treesitter = true, treesitter = true,
-- } },
-- }, transparent_background = true
},
-- config = function() -- config = function()
-- vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "#1e1e2f" }) -- vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "#1e1e2f" })
-- end -- end
-- }, },
-- { import = "astrocommunity.pack.cpp" }, -- { import = "astrocommunity.pack.cpp" },
@@ -43,5 +44,7 @@ return {
{ import = "astrocommunity.lsp.lsp-signature-nvim" }, { import = "astrocommunity.lsp.lsp-signature-nvim" },
{ import = "astrocommunity.syntax.vim-sandwich" } { import = "astrocommunity.syntax.vim-sandwich" },
{ import = "astrocommunity.pack.java" }
} }

View File

@@ -42,6 +42,7 @@ return {
signcolumn = "auto", -- sets vim.opt.signcolumn to auto signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = false, -- sets vim.opt.wrap wrap = false, -- sets vim.opt.wrap
expandtab = false, expandtab = false,
cursorline = false,
tabstop = 8, tabstop = 8,
shiftwidth = 8, shiftwidth = 8,
showtabline = 8, showtabline = 8,

View File

@@ -57,6 +57,21 @@ return {
"--query-driver=/usr/bin/*gcc", "--query-driver=/usr/bin/*gcc",
"--function-arg-placeholders=0", "--function-arg-placeholders=0",
}, },
sqls = {
connections = {
driver = "postgres",
dataSourceName = "host=127.0.0.1 port=5432 user=postgres password=postgres dbname=trabalho sslmode=disable"
}
},
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 = { capabilities = {
offsetEncoding = "utf-8", offsetEncoding = "utf-8",
} }

10
lua/plugins/codesnap.lua Normal file
View File

@@ -0,0 +1,10 @@
return {
"mistricky/codesnap.nvim",
build = "make",
config = function() require("codesnap").setup{
-- bg_theme = "grape",
bg_padding = 0,
has_line_number = true,
} end
}

View File

@@ -8,9 +8,21 @@ return {
-- } -- }
template_file = "~/.config/nvim/templates/template.$(FEXT)", template_file = "~/.config/nvim/templates/template.$(FEXT)",
received_contests_directory = "/tmp/Competitive Programming/$(JUDGE)/$(CONTEST)", 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):gsub("#", " ")
else
local contest = string.sub(task.group, hyphen + 3)
return string.format("%s/%s/%s.%s", vim.fn.getcwd(), contest, task.name, extension):gsub("#", " ")
end
end,
testcases_use_single_file = true,
evaluate_template_modifiers = true,
received_problems_prompt_path = false,
compile_command = { compile_command = {
c = { exec = "gcc", args = { "-Wall", "-g", "-DDEBUG", "-fsanitize=address,undefined", "$(FNAME)", "-o", "$(FNOEXT).out" } }, c = { exec = "gcc", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-std=c23", "$(FNAME)", "-o", "$(FNOEXT).out", "-lm" } },
cpp = { exec = "g++", args = { "-Wall", "-g", "-DDEBUG", "-fsanitize=address,undefined", "$(FNAME)", "-o", "$(FNOEXT).out" } }, cpp = { exec = "g++", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-D__OPTIMIZE__", "-std=c++20", "$(FNAME)", "-o", "$(FNOEXT).out" } },
}, },
run_command = { run_command = {
c = { exec = "./$(FNOEXT).out" }, c = { exec = "./$(FNOEXT).out" },

24
lua/plugins/java.lua Normal file
View File

@@ -0,0 +1,24 @@
return {
"mfussenegger/nvim-jdtls",
opts = {
settings = {
java = {
configuration = {
runtimes = {
{
name = "JavaSE-21",
path = "/usr/lib/jvm/openjdk-bin-21/",
},
},
},
},
format = {
enabled = true,
settings = { -- you can use your preferred format style
url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
profile = "GoogleStyle",
},
},
},
},
}

4
lua/plugins/magma.lua Normal file
View File

@@ -0,0 +1,4 @@
return {
"dccsillag/magma-nvim",
ft = "python"
}

View File

@@ -7,7 +7,15 @@ return {
opts = function(_, opts) opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it -- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
-- "lua_ls", "lua_ls",
"bashls",
-- "pylsp"=,
"pyright",
"cmake",
"mesonlsp",
"vimls",
"cssls",
"marksman",
}) })
end, end,
}, },

View File

@@ -1,6 +1,7 @@
return { return {
"matveyt/neoclip", "matveyt/neoclip",
lazy = false, lazy = false,
enabled = false,
config = function(plugin, opts) config = function(plugin, opts)
require("neoclip"):setup() require("neoclip"):setup()
end, end,

View File

@@ -0,0 +1,15 @@
return {
{
"windwp/nvim-ts-autotag",
config = function(plugin, opts)
require("nvim-ts-autotag").setup({
opts = {
enable = true,
enable_rename = true,
enable_close = true,
enable_close_on_slash = true,
}
})
end,
},
}

View File

@@ -0,0 +1,4 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
lazy = false
}

View File

@@ -2,22 +2,71 @@ return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
lazy = false, lazy = false,
dependencies = "AstroNvim/astrocore",
opts = function(_, opts) opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it -- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
-- "lua" "lua",
"cpp",
"c",
"bash",
"vim",
"markdown",
"asm",
"cmake",
"css",
"html",
"javascript",
"printf",
"fish",
"git_config",
"git_rebase",
"gitcommit",
"gitignore",
"gitattributes",
"java",
"meson",
"ninja",
"python",
"sql",
"typescript",
"vimdoc",
"xml"
}) })
end, end,
config = function() config = function()
require("nvim-treesitter.configs").setup { require("nvim-treesitter.configs").setup {
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = false
}, },
autotag = { ensure_installed = {
enable = true, "lua",
enable_rename = true, "cpp",
enable_close = true, "c",
enable_close_on_slash = true, "bash",
"vim",
"markdown",
"asm",
"cmake",
"css",
"html",
"javascript",
"printf",
"fish",
"git_config",
"git_rebase",
"gitcommit",
"gitignore",
"gitattributes",
"java",
"meson",
"ninja",
"python",
"sql",
"typescript",
"vimdoc",
"xml"
} }
} }
end end

BIN
spell/pt.utf-8.spl Normal file

Binary file not shown.

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,14 +1,22 @@
/* Problem URL: $(URL) */
#include <bits/stdc++.h> #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std; using namespace std;
using namespace __gnu_pbds;
template <class T, class comp = less<>>
using ordered_set = tree<T, null_type , comp , rb_tree_tag , tree_order_statistics_node_update>;
#define V vector #define V vector
#define rmin(a, b) a = min(a, b) #define rmin(a, b) a = min(a, b)
#define rmax(a, b) a = max(a, b) #define rmax(a, b) a = max(a, b)
#define rep(i, lim) for (size_t i = 0; i < (lim); i++) #define rep(i, lim) for (int i = 0; i < (lim); i++)
#define nrep(i, s, lim) for (size_t i = s; i < (lim); i++) #define nrep(i, s, lim) for (int i = s; i < (lim); i++)
#define repv(i, v) for (auto &i : (v)) #define repv(i, v) for (auto &i : (v))
#define fillv(v) for (auto &itr_ : (v)) { cin >> itr_; } #define fillv(v) for (auto &itr_ : (v)) { cin >> itr_; }
@@ -67,10 +75,32 @@ auto operator>>(istream &is, vector<vector<v>> &vec)->istream& {
return is; return is;
} }
const int oo = INT32_MAX >> 1;
const ll OO = INT64_MAX >> 1;
void pre()
{
}
#define TEST 1
void solve()
{
}
int main() int main()
{ {
ios::sync_with_stdio(false); ios::sync_with_stdio(false);
cin.tie(nullptr); cin.tie(nullptr);
pre();
int t;
(TEST && cin >> t) || (t = 1);
while (t--) {
solve();
}
} }