mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 10:13:46 +01:00
manage jdtls bundles with nix
This commit is contained in:
parent
6a2bad0734
commit
c974057a57
6 changed files with 47 additions and 27 deletions
|
@ -39,7 +39,10 @@
|
||||||
:implementationsCodeLens {:enabled true}
|
:implementationsCodeLens {:enabled true}
|
||||||
:references {:includeDecompiledSources true}
|
:references {:includeDecompiledSources true}
|
||||||
:referencesCodeLens {:enabled true}
|
:referencesCodeLens {:enabled true}
|
||||||
:updateBuildConfiguration :interactive}}
|
:updateBuildConfiguration :interactive
|
||||||
|
:decompilers {:cfr {:rename true
|
||||||
|
:antiobf true
|
||||||
|
:trackbytecodeloc true}}}}
|
||||||
:init_options {:bundles bundle-info.bundles
|
:init_options {:bundles bundle-info.bundles
|
||||||
:extendedClientCapabilities (let [cap jdtls.extendedClientCapabilities]
|
:extendedClientCapabilities (let [cap jdtls.extendedClientCapabilities]
|
||||||
(set cap.resolveAdditionalTextEditsSupport
|
(set cap.resolveAdditionalTextEditsSupport
|
||||||
|
|
|
@ -87,7 +87,6 @@ fn lFindRuntimes(l: *c.lua_State) !c_int {
|
||||||
/// Returns a list of JDTLS bundles (plugins basically) and the preferred content provider
|
/// Returns a list of JDTLS bundles (plugins basically) and the preferred content provider
|
||||||
///
|
///
|
||||||
/// https://github.com/dgileadi/vscode-java-decompiler/tree/master/server
|
/// https://github.com/dgileadi/vscode-java-decompiler/tree/master/server
|
||||||
// TODO: add command to download these maybe?
|
|
||||||
fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
||||||
const home = std.posix.getenv("HOME") orelse return error.HomeNotSet;
|
const home = std.posix.getenv("HOME") orelse return error.HomeNotSet;
|
||||||
|
|
||||||
|
@ -122,7 +121,7 @@ fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
||||||
var iter = dir.iterate();
|
var iter = dir.iterate();
|
||||||
var idx: c_int = 1;
|
var idx: c_int = 1;
|
||||||
while (try iter.next()) |f| {
|
while (try iter.next()) |f| {
|
||||||
if (f.kind != .file or !std.mem.endsWith(u8, f.name, ".jar"))
|
if (!std.mem.endsWith(u8, f.name, ".jar"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!has_cfr and std.mem.containsAtLeast(u8, f.name, 1, "cfr"))
|
if (!has_cfr and std.mem.containsAtLeast(u8, f.name, 1, "cfr"))
|
||||||
|
|
|
@ -103,28 +103,4 @@ in
|
||||||
mv * .* "$out"
|
mv * .* "$out"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
#pkgs.linkFarm "nvim-plugins"
|
|
||||||
# (lib.mapAttrsToList
|
|
||||||
# (name: src: {
|
|
||||||
# name = name;
|
|
||||||
# path = stdenv.mkDerivation {
|
|
||||||
# name = "${name}-compiled";
|
|
||||||
# inherit src;
|
|
||||||
|
|
||||||
# nativeBuildInputs = with pkgs; [ luajit luajitPackages.fennel ];
|
|
||||||
|
|
||||||
# buildPhase = ''
|
|
||||||
# # Compile source with mzte-nv-compile
|
|
||||||
# ${if mzte-nv-compiler != "" then "${mzte-nv-compiler} ." else ""}
|
|
||||||
# '';
|
|
||||||
|
|
||||||
# installPhase = ''
|
|
||||||
# mkdir -p "$out"
|
|
||||||
# mv * .* "$out"
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# })
|
|
||||||
# config.cgnix.nvim-plugins
|
|
||||||
# );
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ let
|
||||||
# Misc
|
# Misc
|
||||||
html-tidy
|
html-tidy
|
||||||
shellcheck
|
shellcheck
|
||||||
|
tree-sitter
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cgnix
|
./cgnix
|
||||||
|
./jdtls-bundles.nix
|
||||||
./mcdev.nix
|
./mcdev.nix
|
||||||
./mzte-nix.nix
|
./mzte-nix.nix
|
||||||
];
|
];
|
||||||
|
|
40
nix/jdtls-bundles.nix
Normal file
40
nix/jdtls-bundles.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
config.packages.jdtls-bundles = pkgs.linkFarm "jdtls-bundles" [
|
||||||
|
{
|
||||||
|
name = "java-debug.jar";
|
||||||
|
path = pkgs.fetchurl {
|
||||||
|
url = "https://git.mzte.de/LordMZTE/-/packages/maven/com.microsoft.java-com.microsoft.java.debug.plugin/0.52.0/files/1444";
|
||||||
|
hash = "sha256-GjMQkxHVqp2H4dqh8NFW37N7kuBA2RWTIw9BYuyix4w=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "decompiler-common.jar";
|
||||||
|
path = pkgs.fetchurl {
|
||||||
|
url = "https://git.mzte.de/LordMZTE/-/packages/maven/dg.jdt.ls.decompiler-dg.jdt.ls.decompiler.common/0.0.3-snapshot/files/1366";
|
||||||
|
hash = "sha256-qSgzUPmUtflDWisTG5RIA/UCPuZiOkP9NOI5zFwXC8E=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "decompiler-procyon.jar";
|
||||||
|
path = pkgs.fetchurl {
|
||||||
|
url = "https://git.mzte.de/LordMZTE/-/packages/maven/dg.jdt.ls.decompiler-dg.jdt.ls.decompiler.procyon/0.0.3-snapshot/files/1393";
|
||||||
|
hash = "sha256-T+zzLbxrXOPW0Y8mnMKPFxAY1P7/VNKfRwOgcO9tnyo=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "decompiler-fernflower.jar";
|
||||||
|
path = pkgs.fetchurl {
|
||||||
|
url = "https://git.mzte.de/LordMZTE/-/packages/maven/dg.jdt.ls.decompiler-dg.jdt.ls.decompiler.fernflower/0.0.3-snapshot/files/1384";
|
||||||
|
hash = "sha256-0uR8Pq4vBCz/lc8gE5S7IgfN6Axa4LBYarEJ+XbV3xk=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "decompiler-cfr.jar";
|
||||||
|
path = pkgs.fetchurl {
|
||||||
|
url = "https://git.mzte.de/LordMZTE/-/packages/maven/dg.jdt.ls.decompiler-dg.jdt.ls.decompiler.cfr/0.0.3-snapshot/files/1375";
|
||||||
|
hash = "sha256-dxiKfDFecbXW/lGd5Ncbk1gldS30RhApCVcYYf0GRH0=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue