Skip to content

bug: jdtls does not work in html LibGDX project #481

Open

Description

@Gigores

Did you check docs and existing issues?

  • I have read all the plugin docs
  • I have searched the existing issues
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.12.0-dev-2316+g1eb2ca9fcf

Operating system/version

Arch Linux

Describe the bug

I have a LibGDX project, and when I open it in my neovim I encounter some "unexpected" behavior: There are no Treesitter highlighting, no project related code suggestions and diagnostics.

The command :checkhealth vim.lsp shows, that LSPs are running and attached to the current buffer:

vim.lsp: Active Features ~
- folding_range
  - Active buffers:

- semantic_tokens
  - Active buffers:
      [10]: spring-boot (id: 1), jdtls (id: 2)
- inline_completion
  - Active buffers:


vim.lsp: Active Clients ~
- spring-boot (id: 1)
  - Version: ? (no serverInfo.version response)
  - Root directory: ~/Programming/java/PaybackKnight
  - Command: { "java", "-XX:TieredStopAtLevel=1", "-Xmx1G", "-XX:+UseZGC", "-cp", "/home/igor/.local/share/nvim/nvim-java/packages/spring-boot-tools/1.55.1/extension/language-server/BOOT-INF/classes:/home/igor/.local/share/nvim/nvim-java/packages/spring-boot-tools/1.55.1/extension/language-server/BOOT-INF/lib/*", "-Dsts.lsp.client=vscode", "-Dsts.log.file=/dev/null", "-Dspring.config.location=file:/home/igor/.local/share/nvim/nvim-java/packages/spring-boot-tools/1.55.1/extension/language-server/BOOT-INF/classes/application.properties", "org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp" }
  - Settings: {
      spring_boot = {}
    }
  - Attached buffers: 10
- jdtls (id: 2)
  - Version: 1.54.0-SNAPSHOT
  - Root directory: ~/Programming/java/PaybackKnight
  - Command: <function @/home/igor/.local/share/nvim/site/pack/core/opt/nvim-java/lua/java-core/ls/servers/jdtls/cmd.lua:18>
  - Settings: {
      java = {
        configuration = {
          runtimes = { {
              default = true,
              name = "JavaSE-21",
              path = "/usr/lib/jvm/java-21-openjdk"
            }, {
              name = "JavaSE-1.8",
              path = "/usr/lib/jvm/java-8-openjdk"
            }, {
              name = "JavaSE-17",
              path = "/usr/lib/jvm/java-17-openjdk"
            }, {
              name = "JavaSE-25",
              path = "/usr/lib/jvm/java-25-openjdk"
            } }
        }
      }
    }
  - Attached buffers: 10

And there I have a different LibGDX project which works completely fine.
The only difference between them two is that the not-working one has html platform support, uses Java 8 because of that and is newer.

Steps To Reproduce

  1. Download gdx-liftoff jar file
  2. Create a project with html platform enabled using gdx-liftoff
  3. Run ./gradlew eclipse inside the project folder
  4. Open nightly neovim in the project folder and open a .java file

Expected Behavior

Treesitter highlighting, code suggestions and diagnostics working fine

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions