AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.13k stars 233 forks source link

java pack root_dir #1131

Open jsenjobs opened 1 month ago

jsenjobs commented 1 month ago

Checklist

Neovim version (nvim -v)

0.10.0 release

Operating system/version

macOS 11.5

Terminal/GUI

noevidea

Describe the bug

java pack can not resolve root_dir when maven project with submodules

Steps to Reproduce

open a java maven project with submodules

Expected behavior

submodule--

Screenshots

No response

Additional Context

No response

Minimal configuration

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- install plugins
local plugins = {
  { "AstroNvim/AstroNvim", import = "astronvim.plugins" },
  { "AstroNvim/astrocommunity" },

  -- add any other plugins/customizations here
  { import = "astrocommunity.pack.java"},
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here (autocommands, vim.filetype, etc.)
ALameLlama commented 1 month ago

I've updated the repro config to include the the java pack. I'll see if I can find an example repo and have a play around with this later

ALameLlama commented 1 month ago

I found this, will give it a try when i have some time https://github.com/jitpack/maven-modular or https://github.com/anliksim/maven-template-bom

ALameLlama commented 1 month ago

@AstroNvim/astrocommunity-maintainers Someone else might need to try and repro this, I run my stuff in VM and it doesn't seem to like it

[ERROR][2024-07-26 19:48:47] .../vim/lsp/rpc.lua:770    "rpc"   "/home/vagrant/maven-template-bom/.repro/data/nvim/mason/bin/lemminx"   "stderr"    "The current machine does not support all of the following CPU features that are required by the image: [CX8, CMOV, FXSR, MMX, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, POPCNT, LZCNT, AVX, AVX2, BMI1, BMI2, FMA].\nPlease rebuild the executable with an appropriate setting of the -march option."
Uzaaft commented 1 month ago

I'll try sometime next week.