return {
  {
    "mason-org/mason-lspconfig.nvim",
    config = function()
      ensure_installed = { "lua-language-server", "gopls", "jdtls" }
    end
  },
  {
    "mason-org/mason.nvim",
    config = function()
      require("mason").setup()
    end
  },
  {
    "neovim/nvim-lspconfig",
    config = function()
      local lspconfig = require("lspconfig")

      vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
      vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, {})
      vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {})

      local servers = { "lua_ls", "gopls", "jdtls" }
        for _, server in ipairs(servers) do
        lspconfig[server].setup({})
      end
    end
  },
  { "mfussenegger/nvim-jdtls" },
  {
    "L3MON4D3/LuaSnip",
    version = "v2.*",
    build = "make install_jsregexp",
    dependencies = {
    "rafamadriz/friendly-snippets",
    }
  },
  {
    'hrsh7th/nvim-cmp',
    dependencies = {
      'hrsh7th/cmp-nvim-lsp',  -- Autocompletar com LSP
      'hrsh7th/cmp-buffer',    -- Autocompletar com o buffer
      'hrsh7th/cmp-path',      -- Autocompletar com caminhos de arquivo
      'saadparwaiz1/cmp_luasnip', -- Autocompletar com LuaSnip
      'L3MON4D3/LuaSnip',      -- O plugin de snippets
    },
    config = function()
      local cmp = require('cmp')
      local luasnip = require('luasnip')

      cmp.setup({
        snippet = {
          expand = function(args)
            luasnip.lsp_expand(args.body)  -- Expande o snippet com LuaSnip
          end,
        },
        mapping = {
          ['<Tab>'] = cmp.mapping.select_next_item(),   -- Seleciona o próximo item
          ['<S-Tab>'] = cmp.mapping.select_prev_item(), -- Seleciona o item anterior
          ['<CR>'] = cmp.mapping.confirm({ select = true }),  -- Confirma a seleção
        },
        sources = {
          { name = 'nvim_lsp' },  -- LSP
          { name = 'buffer' },     -- Buffer
          { name = 'path' },       -- Caminhos
          { name = 'luasnip' },    -- LuaSnip
        },
      })
    end
  }
}
