Compare commits

...

20 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
ea9bb853bd Change how competitest works 2024-09-22 23:29:58 -03:00
79739f6cc1 Remove lazy-lock... 2024-09-22 23:17:08 -03:00
17 changed files with 208 additions and 123 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
lazy-lock.json

View File

@@ -1,99 +0,0 @@
{
"AstroNvim": { "branch": "main", "commit": "d771094986abced8c3ceae29a5a55585ecb0523a" },
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"aerial.nvim": { "branch": "master", "commit": "b59e01e4380932b375ecff165b48a9400c4af929" },
"alpha-nvim": { "branch": "main", "commit": "b6f4129302db197a7249e67a90de3f2b676de13e" },
"arshlib.nvim": { "branch": "master", "commit": "111fd439268adda206a24b133096893869a50764" },
"astrocommunity": { "branch": "main", "commit": "b6f8a518e527d5372e42cec767d211bb969fb6a6" },
"astrocore": { "branch": "main", "commit": "cf5823e2b59aa9666445e3f3531296ad8f417b7c" },
"astrolsp": { "branch": "main", "commit": "5d92b868586c4b79298003b307e8dc3e9a357816" },
"astrotheme": { "branch": "main", "commit": "037c3dbd161d6744d274243dd71314b2964753b2" },
"astroui": { "branch": "main", "commit": "7adeb60d76939d3cd66c9852e0e8621bd42014dd" },
"better-escape.nvim": { "branch": "master", "commit": "f45b52f8f87792e8659526f23261ffe278a54be5" },
"catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"competitest.nvim": { "branch": "master", "commit": "c3cb0e2b0916a879c4d3dcb5737e6c046dd0afc5" },
"compiler.nvim": { "branch": "main", "commit": "e889774c7f2fefad60f8e6638d324223b07d2624" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
"guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" },
"headlines.nvim": { "branch": "master", "commit": "7671eec1065982cdf2ba4136beb1600fe1279431" },
"heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
"hologram.nvim": { "branch": "main", "commit": "f5194f71ec1578d91b2e3119ff08e574e2eab542" },
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
"indent-tools.nvim": { "branch": "master", "commit": "31b839d65aa04b568fabe5e100a63cc44ef3f5d5" },
"info.vim": { "branch": "master", "commit": "b1acda75344f36b91d9c51a33201eada38cf33e9" },
"jupyter-vim": { "branch": "master", "commit": "91eef96d0f26ce37db241833341d08d11c8e5215" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
"lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" },
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" },
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mini.bufremove": { "branch": "main", "commit": "e6044aa28e61d4dd9ec86194d6f81743eced0c1c" },
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
"mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" },
"mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" },
"neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" },
"neoclip": { "branch": "master", "commit": "adfb1430c7308f0b3036f89b037509b3d0b4610a" },
"neoconf.nvim": { "branch": "main", "commit": "8ee287dccee562857b0abe9fe3acd6ad147f8a70" },
"neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" },
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
"none-ls.nvim": { "branch": "main", "commit": "9b98991e15dce8fc502993e23caac2528b8b667f" },
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" },
"nvim-dap": { "branch": "master", "commit": "20a4859ebde1c9bc8e96f8cc11a20667e7fdd516" },
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
"nvim-lspconfig": { "branch": "master", "commit": "0ef64599b8aa0187ee5f6d92cb39c951f348f041" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-send-to-term": { "branch": "master", "commit": "e0aa448d417a553d19cba8c78d91993387f1ff2d" },
"nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
"nvim-treesitter": { "branch": "master", "commit": "00f128dd73086aa578dc3d9142de06c633b7c685" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "fe3deb7f67ce0cc4ebfe2ea6c1c7ae1c7a939d73" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" },
"nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" },
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
"nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" },
"overseer.nvim": { "branch": "master", "commit": "236e60cdac6410dd95ea5cecafdb801a304d6a41" },
"pets.nvim": { "branch": "main", "commit": "8a443e2eae804e5abe21b5d00ceaef4041f882e4" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"project_nvim": { "branch": "main", "commit": "4317ce951459a53ba45ffed2495ac6752211364b" },
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "5f73b24aeb94f5274c218955573153c69ce4d1ee" },
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
"smart-splits.nvim": { "branch": "master", "commit": "1a2b268a7ec7aeef879cdd15973339010ec134f7" },
"telescope-bibtex.nvim": { "branch": "master", "commit": "289a6f86ebec06e8ae1590533b732b9981d84900" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "c5a14e0550699a7db575805cdb9ddc969ba0f1f5" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-hop.nvim": { "branch": "master", "commit": "337a1e9f08f972ebf7a7d26251577812ebaadc78" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" },
"toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "53ed7c65e466963c916251f9ce6df7dd3685dc36" },
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-s-asm": { "branch": "master", "commit": "a43fc9a86d9978c449609fcff4cc324e6615421b" },
"vim-sandwich": { "branch": "master", "commit": "74cf93d58ccc567d8e2310a69860f1b93af19403" },
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" },
"wiki.vim": { "branch": "master", "commit": "ba630e2e174f9fe963c4bce17024a4adbcb09624" },
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
}

View File

@@ -2,18 +2,19 @@ return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.colorscheme.catppuccin" },
-- {
-- "catppuccin",
-- opts = {
-- integrations = {
-- ts_rainbow2 = true,
-- treesitter = true,
-- }
-- },
-- config = function()
-- vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "#1e1e2f" })
-- end
-- },
{
"catppuccin",
opts = {
integrations = {
ts_rainbow2 = true,
treesitter = true,
},
transparent_background = true
},
-- config = function()
-- vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "#1e1e2f" })
-- end
},
-- { import = "astrocommunity.pack.cpp" },
@@ -43,5 +44,7 @@ return {
{ 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
wrap = false, -- sets vim.opt.wrap
expandtab = false,
cursorline = false,
tabstop = 8,
shiftwidth = 8,
showtabline = 8,

View File

@@ -57,6 +57,21 @@ return {
"--query-driver=/usr/bin/*gcc",
"--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 = {
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

@@ -7,9 +7,26 @@ return {
-- c = "~/.config/nvim/templates/template.c"
-- }
template_file = "~/.config/nvim/templates/template.$(FEXT)",
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 = {
c = { exec = "gcc", args = { "-Wall", "-g", "-DDEBUG", "-fsanitize=address", "$(FNAME)", "-o", "$(FNOEXT)" } },
cpp = { exec = "g++", args = { "-Wall", "-g", "-DDEBUG", "-fsanitize=address", "$(FNAME)", "-o", "$(FNOEXT)" } },
c = { exec = "gcc", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-std=c23", "$(FNAME)", "-o", "$(FNOEXT).out", "-lm" } },
cpp = { exec = "g++", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-D__OPTIMIZE__", "-std=c++20", "$(FNAME)", "-o", "$(FNOEXT).out" } },
},
run_command = {
c = { exec = "./$(FNOEXT).out" },
cpp = { exec = "./$(FNOEXT).out" }
}
} end
}

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)
-- 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, {
-- "lua_ls",
"lua_ls",
"bashls",
-- "pylsp"=,
"pyright",
"cmake",
"mesonlsp",
"vimls",
"cssls",
"marksman",
})
end,
},

View File

@@ -1,6 +1,7 @@
return {
"matveyt/neoclip",
lazy = false,
enabled = false,
config = function(plugin, opts)
require("neoclip"):setup()
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",
lazy = false,
dependencies = "AstroNvim/astrocore",
opts = function(_, opts)
-- 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, {
-- "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,
config = function()
require("nvim-treesitter.configs").setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false
},
autotag = {
enable = true,
enable_rename = true,
enable_close = true,
enable_close_on_slash = true,
ensure_installed = {
"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

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 <stdlib.h>
#include <math.h>

View File

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