kabouzeid / nvim-lspinstall

Provides the missing :LspInstall for nvim-lspconfig
MIT License
526 stars 65 forks source link

"cmd not defined" after installing Java #183

Closed samodostal closed 3 years ago

samodostal commented 3 years ago

I installed java through :LspInstall java. No errors during installation. When I open a .java file and type :LspInfo, I get cmd not defined for filetype java.

Config: java
filetypes:         java
root directory:    NA
cmd:               cmd not defined
cmd is executable: NA
autostart:         true
custom handlers:   textDocument/codeAction, language/status

Any ideas what I might be doing wrong? I made sure $JAVA_HOME is set.

samodostal commented 3 years ago

I figured it out. Because my repository wasn't managed by .git, jdtls could not find root directory. It is working after adding .git file, or changing root_pattern.