From 2f8105e5c3178c1328ac45e1deb27f8b27632a9c Mon Sep 17 00:00:00 2001 From: Lucas Garcia Rubio Date: Sun, 16 Feb 2025 10:06:28 -0300 Subject: [PATCH] new plugins --- init.lua | 43 +++++++++++++++++++++++++++++++------ lazy-lock.json | 2 ++ lua/custom/plugins/init.lua | 13 ++++++++++- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 1d6c797a..39b2e9b0 100644 --- a/init.lua +++ b/init.lua @@ -653,7 +653,7 @@ require('lazy').setup({ -- :Mason -- -- You can press `g?` for help in this menu. - -- require('mason').setup() + require('mason').setup() -- -- `mason` had to be setup earlier: to configure its options see the -- `dependencies` table for `nvim-lspconfig` above. @@ -666,7 +666,26 @@ require('lazy').setup({ 'jdtls', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } - + local cmp = require 'cmp' + cmp.setup { + mapping = { + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + }, + } + Global = {} + Global.lspCapabilities = vim.lsp.protocol.make_client_capabilities() + Global.lspCapabilities.textDocument.completion.completionItem.resolveSupport.properties = { + 'documentation', + 'detail', + 'additionalTextEdits', + 'sortText', + 'filterText', + 'insertText', + 'textEdit', + 'insertTextFormat', + 'insertTextMode', + } require('mason-lspconfig').setup { handlers = { function(server_name) @@ -684,12 +703,20 @@ require('lazy').setup({ java = { configuration = { runtimes = { - { name = 'Java-21', path = '/home/lucas/.sdkman/candidates/java/21.0.2-open', default = true }, - { name = 'Java-11', path = '/home/lucas/.sdkman/candidates/java/11.0.22-ms', default = false }, + { name = 'JavaSE-21', path = '/home/lucas/.sdkman/candidates/java/21.0.2-open', default = true }, + { name = 'JavaSE-11', path = '/home/lucas/.sdkman/candidates/java/11.0.22-ms', default = false }, }, }, + formatting = { + settings = { url = '/home/lucas/Magna_Sistemas.xml' }, + }, + signatureHelp = { + enabled = true, + description = { enabled = true }, + }, }, }, + capabilities = Global.lspCapabilities, } end, }, @@ -807,7 +834,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines @@ -952,7 +979,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps @@ -960,7 +987,9 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, + + vim.keymap.set('n', '|', ':Neotree reveal', { desc = 'Toggle Neotree window', silent = true }), -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lazy-lock.json b/lazy-lock.json index a6f6d4bc..8de8583f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -13,7 +13,9 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "374c78d3ebb5c53f43ea6bd906b6587b5e899b9e" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.nvim": { "branch": "main", "commit": "1bd64e3ce49964cdfa9ee0e84c56f42d53b89052" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "5d172e8315444dbc32867d1c7b04d8e7e68ec4e1" }, "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, "nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" }, "nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" }, "nvim-java": { "branch": "main", "commit": "04e3a41afce7357ad7c8d9c6676f0f3b5f5634e6" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..63d94f8d 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,15 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v3.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + -- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information + }, + }, +}