JavaHello / spring-boot.nvim

Neovim + Spring Boot LS
Apache License 2.0
37 stars 7 forks source link

Is VS Code compulsory? #5

Open nithin-mk opened 4 months ago

nithin-mk commented 4 months ago

Is it compulsory to install VScode Spring Boot extension in Visual Studio Code accoording to the README? If I don't have VS Code, would spring-boot.nvim be able to download the required Spring Tools 4 files and work by itself?

JavaHello commented 4 months ago

It will not be downloaded automatically. If you do not use vscode, you need to manually download the compiled jar.

nithin-mk commented 4 months ago

Thank you for your reply. From which website can I download the JAR from - VSCode Marketplace or Spring Tools website?

JavaHello commented 4 months ago

You can directly download the vscode spring-boot-tools plugin and unzip it, or download the sts4 project and compile it.

jonathan-elize commented 3 months ago

I got around this by using what nvim-java does. The author of nvim-java made a mason regsitry that would get you the jars needed.

In all this is what I did:

  1. I updated my mason.setup call to also use the nvim-java repository as a source:
    require("mason").setup({
    registries = {
        "github:mason-org/mason-registry",
        "github:nvim-java/mason-registry",
    },
    })
  2. I installed spring-boot-tools through :Mason
  3. I added the bundle of jars to my nvim-jdtls setup accordingly:
    local spring_path = require("mason-registry")
    .get_package("spring-boot-tools")
     :get_install_path() .. "/extension/jars/*.jar"
    local spring = vim.split(vim.fn.glob(spring_path), "\n", {})
    vim.list_extend(bundles, spring)
nithin-mk commented 3 months ago

@jonathan-elize Thank you!