neovim: add spring-boot ls
This commit is contained in:
parent
b3554bdb76
commit
d915336df4
3 changed files with 45 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let inherit (lib.nix2lua) call; in
|
let inherit (lib.nix2lua) call; in
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,9 @@ let inherit (lib.nix2lua) call; in
|
||||||
root_dir = call "${config.plugin.nvim-lspconfig.varName}.util.root_pattern" [ "deno.json" "deno.jsonc" ];
|
root_dir = call "${config.plugin.nvim-lspconfig.varName}.util.root_pattern" [ "deno.json" "deno.jsonc" ];
|
||||||
};
|
};
|
||||||
# java
|
# java
|
||||||
jdtls = { cmd = [ "jdtls" ]; };
|
jdtls = {
|
||||||
|
cmd = [ "${pkgs.jdt-language-server}/bin/jdtls" ];
|
||||||
|
};
|
||||||
# json
|
# json
|
||||||
jsonls = { };
|
jsonls = { };
|
||||||
# css, scss, less
|
# css, scss, less
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./ollama.nix
|
./ollama.nix
|
||||||
|
./spring-boot.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
40
neovim/plugins/spring-boot.nix
Normal file
40
neovim/plugins/spring-boot.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ 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"));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue