mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
feat: make java lsp install optional
This commit is contained in:
parent
2075211c18
commit
a0399722a0
1 changed files with 6 additions and 2 deletions
|
@ -21,7 +21,7 @@ in {
|
|||
|
||||
package = mkOption {
|
||||
description = "java language server";
|
||||
type = types.package;
|
||||
type = with types; either package (listOf str);
|
||||
default = pkgs.jdt-language-server;
|
||||
};
|
||||
};
|
||||
|
@ -32,7 +32,11 @@ in {
|
|||
vim.lsp.lspconfig.enable = true;
|
||||
vim.lsp.lspconfig.sources.jdtls = ''
|
||||
lspconfig.jdtls.setup {
|
||||
cmd = {"${cfg.lsp.package}/bin/jdt-language-server", "-data", vim.fn.stdpath("cache").."/jdtls/workspace"},
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then nvim.lua.expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/jdt-language-server", "-data", vim.fn.stdpath("cache").."/jdtls/workspace"}''
|
||||
},
|
||||
}
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue