-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jetbrains: add plugin support #223593
jetbrains: add plugin support #223593
Conversation
9f81861
to
2c41d15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Letting this sit a week for comments. LGTM, good job! Minor nitpick; run nixfmt on nix files.
Is the formatter for nixpkgs |
2c41d15
to
d324b05
Compare
@edwtjo reminder |
"8182" = { | ||
# Rust | ||
nativeBuildInputs = [ autoPatchelfHook ]; | ||
commands = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first of all: thanks for this great PR!
While trying to get the Github Copilot plugin to work with your changes I noticed that the contents of the commands
attribute are never evaluated as these values are folded into the mkDerivation parameters in mkPlugin. It seems to be a leftover from your old, closed PR where you used this in attribute to construct a custom buildPhase. Am I missing something or should buildPhase
be used here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, youre absolutely right, ill fix this straight away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be done, I built all the IDEs with the rust plugin but I might've missed something, lmk if the change breaks your copilot setup
d324b05
to
7a6cd2b
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/clion-github-copilot-fails-to-login/22197/11 |
I pulled nixpkgs, checked out the PR and built it with For a short time the github copilot icon was showing, but then it was crossed out again.
and
Did I miss something? (I'm relatively new to NixOS) |
I think the github copilot plugin needs special treatment (patching a binary) |
7a6cd2b
to
c8c1ad2
Compare
Does that work? |
I still get:
|
I just checked out your changes to the PR and built again, if that was what you where asking for... |
c8c1ad2
to
79d6b66
Compare
Did this attempt work? |
I still get:
|
The last commit I see is:
|
How are you installing the plugin? it works fine on my end. This PR is for declarative plugin support, not plugin support in general. What you're looking for is probably along the lines of |
Directly from the jetbrains marketplace in the plugins section of the clion settings. Is there a better way to do it in NixOS? |
This PR can't modify plugins fetched through the settings pane. Instead, you specify the plugins you want before installing clion, then it creates a clion install with those plugins bundled. |
I see, thank you. Do you maybe have an example on how to implement that in my |
put |
After adding the like I tried building my configuration with
I also tried |
I took the liberty of rebasing since @GenericNerdyUsername didn't respond, and re requested review of some people, I will merge this if they say the changes are fine and ci runs through. |
On it... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just integrated commit c3c3a9ba26fff3dd0b406d34ada95d505b047bf4 into my nixcfgs!
Latest clion, phpstorm and goland still work great with GitHub Copilot! 🥳
Hm but ofborg is complaining, I'm going to take a look once I'm at my laptop again. |
Yes, strange. I got similar errors too when trying to build with
|
c3c3a9b
to
9adfad5
Compare
@SuperSandro2000 why did you merge this? |
This isnt ready for merge yet, I made the changes needed, but github is refusing the push bc its too big, so im trying it in chunks |
Do we need a new PR? 😁 |
Probably, It doesn't let me revert this one so we can't later merge the currently still in progress changes. |
Is anyone else going to make the pr, or should I? |
Feel free to go ahead and make one, just link this one in the description :D |
First of all, let me say how grateful I am that I found this PR. Having Github Copilot working again is a total godsend. Apologies for my naiveté, but is this PR the only place where any of this functionality is documented? I'm just wondering if there are instructions elsewhere, and if the number (jetbrains.plugins.addPlugins jetbrains.clion [ "17718" ]) |
@wusticality I'm not sure about the documentation question, but you should be able to avoid the magic number by specifying the plugin by name. I'm using the following in my config: (jetbrains.plugins.addPlugins jetbrains.clion [ "github-copilot" ]) |
I also just use |
The number is the plugin ID (the link for the plugin is https://plugins.jetbrains.com/plugin/17718-github-copilot) I have added some docs (though I really should add them to the manual), but they're waiting to be merged, along with some other stuff, in #259373 |
I can't get this to work with anything other than copilot myself, for example https://plugins.jetbrains.com/plugin/13882-godot-support |
Can you post some logs? |
@Krutonium the overhaul just got merged, take a look at the readme |
Just checked back, Let's have a look... Ah that Readme is quite good! @SuperSandro2000 WRT Logs, it was literally just a notification of the plugin not being found. |
This for this, much appreciated. :) |
For those who tried everything above, but couldn't make it work - I found github-copilot-intellij-agent that patches copilot binary to make it work with NixOS. Just an additional step needed - symlinking the new binary (change IntelliJIdea2022.2 to your IDE model & version, like WebStorm2023.2): ln -fs /run/current-system/sw/bin/copilot-agent ~/.local/share/JetBrains/IntelliJIdea2022.2/github-copilot-intellij/copilot-agent/bin/copilot-agent-linux |
@spy4x i worked !!! on at least on my PhpStorm ver 2023.2 |
This doesn't seem to work for me Idea-community logs present the following error
Copilot plugin was installed (initially) using the regular plugins-section in settings UI and then I followed it up with home-manager refresh with this change to pkgs: Is install history (the fact that it was installed the regular way, from settings) expected to cause problems? |
I said that too soon. Uninstalling the plugin updates to the point where the copilot plugin shows up as "bundled" and greyed out, followed by restart did the trick. I had to uninstall update and disable the plugin to get to this point and then had to enable it again after restarting Idea. |
Description of changes
This commit adds support for declarative plugins (including ones which need patching). Untested on darwin. Closes #189183. Overhaul of #191341. Merged in #240521.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)