-
Hi, I've recently switched from I've tried some print debugging and found that My setup, some paths redacted. Neovim is installed via AppImage: OS default Java: My lspconfig loaded with lazy.nvim, written from scratch from various guides, not a distribution: return { {"nvim-java/nvim-java", }, {"mason-org/mason.nvim",lazy=false,config=function()require("mason").setup()end, }, {"mason-org/mason-lspconfig.nvim",enabled=true,lazy=false,opts= {auto_install=true, }, }, {"neovim/nvim-lspconfig",dependencies= {"saghen/blink.cmp"},lazy=false,config=function()vim.keymap.set("n","K",vim.lsp.buf.hover, {desc="LSP Hover"})vim.keymap.set("n","<leader>cd",vim.lsp.buf.definition, {desc="LSP definition"})vim.keymap.set("n","<leader>cf",vim.lsp.buf.references, {desc="LSP references"})vim.keymap.set({"n","v"},"<leader>ca",vim.lsp.buf.code_action, {desc="LSP code actions"})vim.keymap.set("n","<leader>cr",vim.lsp.buf.rename, {desc="LSP rename"})vim.keymap.set("n","<leader>ch",function ()vim.lsp.buf.typehierarchy("subtypes")end, {desc="LSP subtype hierarchy"})vim.keymap.set("n","<leader>cH",function ()vim.lsp.buf.typehierarchy("supertypes")end, {desc="LSP supertype hierarchy"})vim.keymap.set("n","<leader>ce","<cmd>lua vim.diagnostic.open_float()<CR>", {desc="Show diagnostic in floating windiw"} )localjava=require("java")java.setup( {java_debug_adapter= {enable=true, },spring_boot_tools= {enable=false, } })locallspconfig=require("lspconfig")lspconfig.jdtls.setup({})lspconfig.lua_ls.setup({settings= {Lua= {runtime= {version="LuaJIT", },diagnostics= {globals= {"vim"},-- Add 'vim' to the list of globals to avoid undefined global errors },workspace= {library= {vim.fn.expand("$VIMRUNTIME/lua"),vim.fn.stdpath("config").."/lua",-- Add any other paths where your Lua files are located }, },telemetry= {enable=false, }, }, }, })end, }, {"mfussenegger/nvim-jdtls",enabled=false,dependencies= {"nvim-dap"}, }, {"folke/lazydev.nvim",ft="lua",-- only load on lua filesopts= {library= {-- See the configuration section for more details-- Load luvit types when the `vim.uv` word is found {path="${3rd}/luv/library",words= {"vim%.uv"} }, }, }, },} Output of And localjava=require("java")vim.keymap.set("n","<leader>ct",java.test.run_current_method, {desc="Java test method"})vim.keymap.set("n","<leader>cT",java.test.run_current_class, {desc="Java test class"})vim.keymap.set("n","<leader>dt",java.test.debug_current_method, {desc="Java debug method"})vim.keymap.set("n","<leader>dT",java.test.debug_current_class, {desc="Java debug class"})vim.keymap.set("n","<leader>cy",java.test.view_last_report, {desc="Java show test report"})vim.keymap.set("n","<leader>cl",java.runner.built_in.toggle_logs, {desc="Java toggle logs"}) |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 5 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Delete opts from Mason lspconfig line it causes it to setup jdtls before nvim-java and see#293 and#399 |
BetaWas this translation helpful?Give feedback.
All reactions
-
Unfortunately that's not it. I did an experiment, took I will try debugging it further on a different machine, from scratch. And maybe I'll check different versions of Neovim, plugins or JDTLS. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Unfortunately I don't have the possibility to look into this right now. I'm on the move and type from my phone. |
BetaWas this translation helpful?Give feedback.
All reactions
-
No worries, I'm not expecting you to find the cause. I'll debug this myself and let you know when I find anything. I'm assuming the problem is somewhere in my config or environment. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I'm at home now and have the time just to test if it works for me. It does. Both running Try the Kickstart starter, I think I used it recently. At least I'm sure it setup the language servers fine. Also my configuration is based on Kickstart, though not the nvim-java's kickstart starter. Nevertheless it follows the same conventions. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Actually I found something. When I disabled spring boot tools then I too don't get document symbols. I get the message:
This might be missing implementation of the protocol on nvim-java's side, but I'm not (yet) familiar with that part of the code. |
BetaWas this translation helpful?Give feedback.