feat(langs): java
This commit is contained in:
@@ -50,6 +50,8 @@ lib.my.makeHomeProgramConfig {
|
||||
typescript
|
||||
nodejs
|
||||
|
||||
java-language-server
|
||||
|
||||
ripgrep
|
||||
];
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@ local servers = {
|
||||
"cssls",
|
||||
"nixd",
|
||||
"html",
|
||||
"java_language_server",
|
||||
}
|
||||
|
||||
local extra_config = {
|
||||
@@ -73,7 +74,6 @@ capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
local lspconfig = require("lspconfig")
|
||||
for _, server in ipairs(servers) do
|
||||
local extra = extra_config[server] or {}
|
||||
local config = {
|
||||
@@ -82,5 +82,6 @@ for _, server in ipairs(servers) do
|
||||
for k, v in pairs(extra) do
|
||||
config[k] = v
|
||||
end
|
||||
lspconfig[server].setup(config)
|
||||
vim.lsp.config(server, config)
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
|
||||
@@ -15,6 +15,7 @@ lib.my.makeSwitch {
|
||||
python.enable = true;
|
||||
rust.enable = true;
|
||||
lua.enable = true;
|
||||
java.enable = true;
|
||||
qml.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
20
modules/coding/langs/java.nix
Normal file
20
modules/coding/langs/java.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "java";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"java"
|
||||
];
|
||||
config' = {
|
||||
my.home.home.packages = with pkgs; [
|
||||
openjdk24
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user