40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
let
|
|
inherit (lib.nix2lua) pipe1 call0 call1;
|
|
inherit (pkgs) vimUtils fetchFromGitHub;
|
|
|
|
spring-boot-nvim = vimUtils.buildVimPlugin {
|
|
pname = "spring-boot";
|
|
version = "2024-08-10";
|
|
src = fetchFromGitHub {
|
|
owner = "JavaHello";
|
|
repo = "spring-boot.nvim";
|
|
rev = "995a705becbc711b703f9ab344745ececf6471a3";
|
|
hash = "sha256-Hri6WQnWTmFwlOUCVG8O1eELn9FhlvVpUC9lt+uIGkc=";
|
|
};
|
|
};
|
|
in
|
|
|
|
{
|
|
plugin.spring-boot-nvim = {
|
|
enable = true;
|
|
package = spring-boot-nvim;
|
|
name = "spring_boot";
|
|
};
|
|
|
|
plugin.nvim-lspconfig.beforeSetup = [
|
|
(pipe1 config.plugin.spring-boot-nvim.var (call1 "setup" {
|
|
java_cmd = "${pkgs.jdk22}/bin/java";
|
|
log_file = "/tmp/spring-boot.log";
|
|
}))
|
|
(pipe1 config.plugin.spring-boot-nvim.var (call0 "init_lsp_commands"))
|
|
];
|
|
|
|
plugins.language-server.lspconfig.serverSettings.jdtls = {
|
|
init_options = {
|
|
bundles = (pipe1 config.plugin.spring-boot-nvim.var (call0 "java_extensions"));
|
|
};
|
|
};
|
|
}
|