jbangdev / jbang-idea

IntelliJ IDEA plugin for JBang
https://plugins.jetbrains.com/plugin/18257-jbang
MIT License
20 stars 9 forks source link

Code completion does not work with native edit #101

Closed hlavki closed 9 months ago

hlavki commented 9 months ago

Hi,

I am using Intellij Idea Ultimate (2023.3.2) with Jbang plugin (0.24.4) and jbang (0.114.0). When I do this steps:

jbang init -t cli dkman.java
jbang edit --open=idea dkman.java

IDE opens the project, but code completion provides classes only from JDK, not from dependencies (picocli, etc). It works if I use -b option in edit.

maxandersen commented 9 months ago

Does Right click in the source file editor give a synchronize jbang option?

hlavki commented 9 months ago

@maxandersen yes, it gives me that option. When I run it I get: image

But classes from //DEPS dependencies are not suggested for completion.

maxandersen commented 9 months ago

IntelliJ requires the file is in a directory marked as sources. You can right click it's parent and add as sources.

Let's see if it's that.

hlavki commented 9 months ago

thanks @maxandersen, it works now.

maxandersen commented 9 months ago

Cool. Thanks to confirm.

Really should find a way to inform users or even better have it "just work"