summaryrefslogtreecommitdiff
path: root/lua/plugins/jdtls.lua
blob: 49ab7292bbb938e10f0056fe70a921b376529011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
return {
  "mfussenegger/nvim-jdtls",
  optional = true,
  opts = {
    jdtls = function(config)
      if not vim.g.user_is_termux then
        config.cmd = vim.list_extend(vim.deepcopy(config.cmd), {
          "--jvm-arg=-Xms8g",
          "--jvm-arg=-Xmx16g",
        })
      end
      if LazyVim.has("spring-boot.nvim") then
        config.init_options = config.init_options or {}
        config.init_options.bundles =
          vim.list_extend(vim.deepcopy(config.init_options.bundles or {}), require("spring_boot").java_extensions())
      end
    end,
  },
}