JetBrains IntelliJ IDEA Support - #1773
Conversation
|
CI fails due to it being a UNFREE package. |
| }; | ||
|
|
||
| config = mkIf cfg.enable { | ||
| vim.lsp.servers.intellij-server = { |
This comment was marked as low quality.
This comment was marked as low quality.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
found the fix. its 2 part.
- If you use maven or gradle, have it in your path (should be via a devshell provided and not shipped with nvf). if it detects maven or gradle, but those are not available it can't even resolve
String - Define JDK in the LSP init options
There was a problem hiding this comment.
i've tried that, but without success. i still cant do a go to definition on imported lib
There was a problem hiding this comment.
FYI I updated inside this branch earlier. as for why it doesn't work, for you I don't know. did you look at your lsp.log file yet?
There was a problem hiding this comment.
My flake input is:
nvf.url = "github:NotAShelf/nvf/3d54267724fe2da0abbbc7901875527b1e02120b";
nvf.inputs.nixpkgs.follows = "nixpkgs";this is the nix config:
let
intellij-server =
pkgs.callPackage
"${inputs.nvf}/flake/pkgs/by-name/intellij-server/package.nix"
{ };
in
{
vim.lsp.enable = true;
vim.languages.java = {
enable = true;
lsp.enable = false;
extensions = {
maven-nvim.enable = true;
gradle-nvim.enable = true;
};
};
vim.languages.kotlin = {
enable = true;
lsp.enable = false;
};
vim.lsp.presets.intellij-server.enable = true;
vim.lsp.servers.intellij-server = {
filetypes = [
"java"
"kotlin"
];
cmd = lib.mkForce [
(lib.getExe intellij-server)
"--stdio"
"--data-sharing=none"
"--region=not_set"
];
init_options.eulaHash = lib.mkForce (
lib.generators.mkLuaInline ''
(function()
local file = assert(io.open("${intellij-server}/EULA.txt", "rb"))
local hash = vim.fn.sha256(file:read("*a"))
file:close()
return hash:sub(1, 16)
end)()
''
);
};
}There was a problem hiding this comment.
remove nvf.inputs.nixpkgs.follows = "nixpkgs"; plz. we dont support overriding nixpkgs for nvf, we always just test with the version we bundle
There was a problem hiding this comment.
also youre overriding the cmd args and co for the lsp, why?
just test with
{
vim.languages.java = {
enable = true;
treesitter.enable = true;
lsp = {
enable = true;
servers = ["intellij-server"];
};
dap = {
enable = true;
debugger = ["intellij-server"];
};
extensions = {
maven-nvim.enable = true;
gradle-nvim.enable = true;
};
};
}There was a problem hiding this comment.
thanks for the tips, i`ve tried it with your sample, but got the same result. im using a gradle btw.
There was a problem hiding this comment.
huh, im using maven. gradle is shit after all, doesnt even have the concept of licenses
b8042d2 to
1321ded
Compare
c50099e to
9059fa8
Compare
| substituters = https://cache.nixos.org/ https://feel-co.cachix.org | ||
| substituters = https://cache.nixos.org/ https://feel-co.cachix.org | ||
| trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= feel-co.cachix.org-1:nwEFNnwZvtl4KKSH5LDg+/+K7bV0vcs6faMHAJ6xx0w= | ||
| allowUnfree = true |
There was a problem hiding this comment.
will only apply after the MR is merged.
9059fa8 to
34cd27f
Compare
34cd27f to
0788285
Compare
0788285 to
3d54267
Compare
3d54267 to
25e0368
Compare
25e0368 to
904e8b6
Compare
|
new version theoreticlly has the test runner shiped and also now has lombok support. for now just updated the urls and hashes, so no custom wiring for the test runne yet |
904e8b6 to
dc80eb2
Compare

We'll need to decide whether we wanna package unfree stuff. Also in the future we might need some custom LSP commands for log in
Closes: #1772
Sanity Checking
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.