Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling the java language server and trying to use it results in an error. #899

Closed
ivandimitrov8080 opened this issue Jan 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ivandimitrov8080
Copy link
Contributor

Plugin affected: LSP
Nixpkgs channel: unstable

Description

Enabling this option and trying to use it:

        plugins.lsp.servers.java-language-server.enable = true;

Results in this error:

Error executing vim.schedule lua callback: ...rapped-0.9.5/share/nvim/runtime/lua/vim/lsp/handlers.lua:122: bad argument #1 to 'ipairs' (table expected, got nil)                                                   
stack traceback:
        [C]: in function 'ipairs'
        ...rapped-0.9.5/share/nvim/runtime/lua/vim/lsp/handlers.lua:122: in function 'handler'
        ...eovim-unwrapped-0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1056: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

I tried creating a flake for this repo

Config

That's the config basically.

@ivandimitrov8080 ivandimitrov8080 added the bug Something isn't working label Jan 6, 2024
@GaetanLepage
Copy link
Collaborator

Thank you for reporting this.
I was indeed able to reproduce the issue.
However, I am not sure that this bug has anything to do with nixvim. I will then be closing this.
If you find any lua code that is wrong or missing in your generated init.lua, please feel free to re-open this issue.
Also, if you have access to a classic (non-nix) neovim setup, it could be nice to try reproducing this behavior there.

Also, maybe you could you try using nvim-jdtls instead. This is what people seem to recommend.

@GaetanLepage
Copy link
Collaborator

Some people seem to encounter this error on a "normal" neovim setup:
georgewfraser/java-language-server#267

@siph
Copy link
Contributor

siph commented Jan 6, 2024

I remember reporting this in the original pr: #417. It was annoying but I think the server would still work. I ended up switching to nvim-jdtls although I don't write java anymore so I haven't really used it much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants