nvim-lspconfig icon indicating copy to clipboard operation
nvim-lspconfig copied to clipboard

configurtion for java_language_server not works.

Open yimingwangdell opened this issue 1 year ago • 6 comments

Description

https://stackoverflow.com/questions/76944249/how-to-specify-classpath-with-java-language-server-of-neovim

I tried add classpath to ~/.config/Code/User/settings.json , $PROJ/.vscode/settings.json as doc described, also tried CLASSPATH variable with .jar path. none of them works for me, any ideas to make it works?

Neovim version

NVIM v0.10.0-dev-835+gdd09630a2 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Run "nvim -V1 -v" for more info

Nvim-lspconfig version

latest

Operating system and version

linux

Affected language servers

java_language_server

Steps to reproduce

return { setup = function(lspconfig, lsp) lspconfig.java_language_server.setup {} end }

Actual behavior

all packages were not found by lsp

Expected behavior

all packages were found by lsp

Minimal config

return {
	setup = function(lspconfig, lsp)
		lspconfig.java_language_server.setup {}
	end
}

LSP log

https://gist.github.com

yimingwangdell avatar Aug 22 '23 06:08 yimingwangdell

server name is jdtls there is no java_language_server

glepnir avatar Aug 22 '23 06:08 glepnir

@glepnir that's not correct image

actually I tries jdtls days ago, it totally not works for my side. https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/2798

yimingwangdell avatar Aug 22 '23 06:08 yimingwangdell

@glepnir please consider reopening this issue.

yimingwangdell avatar Aug 22 '23 06:08 yimingwangdell

oh sry there has java-language-server. but the mostly used is jdtls.

glepnir avatar Aug 22 '23 07:08 glepnir

relate #2769 ? I think this issue duplicated ?

glepnir avatar Aug 22 '23 07:08 glepnir

@glepnir I am not sure if that issue is the same as mine, in that issue, it's not mentioned whether packages are recognized correctly. Also I notice java runtime packages are found correctly, I can see class methods with "K" with "show document" key binding, so it seems lsp is running correctly but just a misconfiguration of java_language_server.

yimingwangdell avatar Aug 22 '23 07:08 yimingwangdell