nixos-configs/common/home/neovim/langs/java.nix
matt1432 8deffb3adb
All checks were successful
Discord / discord commits (push) Has been skipped
feat(nvim): coc -> lspconfig
2024-05-08 23:04:16 -04:00

44 lines
793 B
Nix

{
config,
lib,
pkgs,
...
}: let
inherit (pkgs) vimPlugins;
inherit (config.vars) neovimIde;
javaSdk = pkgs.temurin-bin-17;
javaPkgs = with pkgs; [gradle maven];
in
lib.mkIf neovimIde {
home.packages = javaPkgs;
xdg.dataFile.".gradle/gradle.properties".text = ''
org.gradle.java.home = ${javaSdk}
'';
programs = {
java = {
enable = true;
package = javaSdk;
};
neovim = {
extraPackages = javaPkgs;
extraLuaConfig =
/*
lua
*/
''
vim.api.nvim_create_autocmd("FileType", {
pattern = 'java',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
'';
plugins = [
];
};
};
}