From 80c8732d9303d734adc57a15ca369fcd3d3f7a5c Mon Sep 17 00:00:00 2001 From: Segcolt <9hmbzr275@mozmail.com> Date: Fri, 5 Sep 2025 20:20:58 -0300 Subject: [PATCH] Change a lot of stuff --- lua/community.lua | 4 +++- lua/plugins/astrolsp.lua | 6 ++++++ lua/plugins/competitest.lua | 4 ++-- lua/plugins/java.lua | 24 ++++++++++++++++++++++++ lua/plugins/treesitter.lua | 1 + templates/template.cpp | 6 ++++++ 6 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 lua/plugins/java.lua diff --git a/lua/community.lua b/lua/community.lua index 28b94cf..dd2dc74 100644 --- a/lua/community.lua +++ b/lua/community.lua @@ -43,5 +43,7 @@ return { { import = "astrocommunity.lsp.lsp-signature-nvim" }, - { import = "astrocommunity.syntax.vim-sandwich" } + { import = "astrocommunity.syntax.vim-sandwich" }, + + { import = "astrocommunity.pack.java" } } diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index f1c8c31..930e525 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -57,6 +57,12 @@ 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 diff --git a/lua/plugins/competitest.lua b/lua/plugins/competitest.lua index 29b182a..eefc1ed 100644 --- a/lua/plugins/competitest.lua +++ b/lua/plugins/competitest.lua @@ -21,8 +21,8 @@ return { evaluate_template_modifiers = true, received_problems_prompt_path = false, compile_command = { - c = { exec = "gcc", args = { "-Wall", "-g", "-DDEBUG", "-fsanitize=address,undefined", "-std=c23", "$(FNAME)", "-o", "$(FNOEXT).out", "-lm" } }, - cpp = { exec = "g++", args = { "-Wall", "-g", "-DDEBUG", "-fsanitize=address,undefined", "-std=c++20", "$(FNAME)", "-o", "$(FNOEXT).out" } }, + c = { exec = "gcc", args = { "-O0", "-Wall", "-g", "-DDEBUG", "-fsanitize=address,undefined", "-std=c23", "$(FNAME)", "-o", "$(FNOEXT).out", "-lm" } }, + cpp = { exec = "g++", args = { "-O0", "-Wall", "-g", "-DDEBUG", "-fsanitize=address,undefined", "-std=c++20", "$(FNAME)", "-o", "$(FNOEXT).out" } }, }, run_command = { c = { exec = "./$(FNOEXT).out" }, diff --git a/lua/plugins/java.lua b/lua/plugins/java.lua new file mode 100644 index 0000000..a11478f --- /dev/null +++ b/lua/plugins/java.lua @@ -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", + }, + }, + }, + }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 412ba52..e53a360 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -38,6 +38,7 @@ return { require("nvim-treesitter.configs").setup { highlight = { enable = true, + additional_vim_regex_highlighting = false }, ensure_installed = { "lua", diff --git a/templates/template.cpp b/templates/template.cpp index cf04480..1e07c32 100644 --- a/templates/template.cpp +++ b/templates/template.cpp @@ -1,8 +1,14 @@ /* Problem URL: $(URL) */ #include +#include +#include using namespace std; +using namespace __gnu_pbds; + +template > +using ordered_set = tree; #define V vector