Comments (7)
Ah, my bad. I came from a setup without lspinstaller where the full path was handled by the script instead of the config object.
Since I use https://github.com/mfussenegger/nvim-jdtls, I still need to explicitly pass a workspace, and I forgot to update the cmd
in the lua config.
Thanks for the quick and helpful response!
from nvim-lspinstall.
I'm using nvim-jdtls, so I can't use lspconfig's setup function for Java. I have to give it a config object, so I still have to define a cmd
key. I've kept what I have, but changed the workspace parameter so that it now contains a full path.
I was unable to figure out how to get the config object including the cmd
key from lspinstall, and use that as a basis. I'm still finding my way around Lua and Neovim's APIs 😅. So I figured I'd just hard code it for now and improve it later.
Is there a good way to get that config object, and/or a nice/official way to get the location of a language server for a given language? Right now I'm doing this: https://github.com/jqno/dotfiles/blob/4142375cd0961e1442f42128289acb7bc43c06aa/nvim/lua/filetypes/java.lua#L29
from nvim-lspinstall.
require'lspinstall/servers'.java.default_config
from nvim-lspinstall.
Also, now that I'm here: the script calls a command called die
in two places, but my machine (a freshly installed Ubuntu 21.04) doesn't recognise it, and I can't find it via apt
either. Googling it seems to turn up a lot of false positives about processes dying and whatnot. What do I need to install to make that work?
from nvim-lspinstall.
@jqno I copied parts of the script from kotlin lang server. Didn't realize die
is a cmd local to the script (see: https://github.com/fwcd/kotlin-language-server/blob/58966bc18dd5bf82fdfcf7a2f44bab3622f6907a/server/src/test/resources/additionalWorkspace/gradlew#L56).
Thanks, will fix that.
$WORKSPACE
should already be an absolute path
nvim-lspinstall/lua/lspinstall/servers/java.lua
Lines 34 to 39 in 8f7ce91
I also just tested it to confirm
:lua print(require "lspconfig/util".path.join { require"lspinstall/util".install_path("java"), 'workspace', 'test' })
prints:
/Users/karim/.local/share/nvim/lspinstall/java/test
from nvim-lspinstall.
So now you've removed the cmd
key from your config?
from nvim-lspinstall.
Thank you!
from nvim-lspinstall.
Related Issues (20)
- No html/CSS diagnostics HOT 1
- code_action does not work for Java without nvim-jdtls HOT 3
- haskell does not work (`cmd_cwd` changes and hls can't find hie.yaml)
- JSON language server will not run under Node 12.x because... HOT 1
- Add prisma lsp HOT 2
- Support for yarn HOT 1
- Supporting yarn HOT 12
- install lua failed on arch linux HOT 1
- Can't install Python LSP using LspInstall, in WSL2 HOT 2
- LspInstall - cannot find npm command HOT 2
- Custom install path HOT 2
- Error message when saving C header files. HOT 3
- Add LspInstall for lemminx (XML,XSD,SVG) HOT 3
- Install a list of language servers at startup HOT 3
- Options for java
- "cmd not defined" after installing Java HOT 1
- nvim-lspinstall config for html makes svelte files show duplicate entries for completion
- Angularls doesn't works at all
- MacOS - CSS - Client quit with exit code 1 and signal 0
- Does ESLint Language Server will be added to LSPInstall?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-lspinstall.