Closed NitroCao closed 5 years ago
In which scenario the auto complete doesn't work?
In which scenario the auto complete doesn't work?
When I use objects and functions from third party libraries. For example:
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Scanner;
import java.net.MalformedURLException;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.ParseException;
import m3u8parser.m3u8parser;
import m3u8parser.FormatException;
import org.apache.commons.cli.HelpFormatter;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class App {
public static void main(String[] args) throws IOException, ParseException, FileNotFoundException, FormatException {
Options options = new Options();
CommandLineParser parser = new DefaultParser();
HelpFormatter formatter = new HelpFormatter();
CommandLine cmd = null;
options.addOption(Option.builder("i")
.longOpt("url")
.hasArg()
.argName("url")
.desc("Specify the url of m3u8 file")
.build());
the variable options
is a Options
object from org.apache.commons.cli
. When I insert options.
, it cannot show the methods of Options
, such as addOption
.
It works from VScode Java. It might an issue of neovim.
Seems that it's the problem of my configuration :(
@JayceCao I'm also using Vim and have the same issue, did you figure out how to resolve this?
@JayceCao I'm also using Vim and have the same issue, did you figure out how to resolve this?
Update plugins first. Then configure the value of GRADLE_USER_HOME
shell environment variable to your home .gradle
directory. Clear the $HOME/.gradle/wrapper/dists
directory.
Hope it will work for you.
Hello everyone.
I am running Vim 8.1 on Arch and using ALE as the client for eclipse.jdt.ls.
Unfortunately, even though linting and autocomplete are working for the core Java libraries, I can neither get auto-completion for third party libraries, similarly to what is shown by @JayceCao above, nor does it seem like there is any activity regarding Gradle when I open the project, as a clean ~/.gradle
folder remains unpopulated.
Even when I call Gradle to download the dependencies, I still get no autocompletion on the third party libraries, even though they are present.
This is surely an issue with my configuration so I come here searching for some guidance.
My questions are as follows, does autocomplete for third party libraries still work for you on eclipse.jdt.ls 0.35+, @JayceCao?
Did setting GRADLE_USER_HOME
and cleaning up ~/.gradle
fix the issue for you @orlandoc01?
Should eclipse.jdt.ls trigger Gradle when opening a project?
Thank you for your time.
I'm using coc-java plugin in coc.nvim completion plugin, which uses jdt.ls. And everything works fine. You can have a try.
Hello everyone. I am running Vim 8.1 on Arch and using ALE as the client for eclipse.jdt.ls. Unfortunately, even though linting and autocomplete are working for the core Java libraries, I can neither get auto-completion for third party libraries, similarly to what is shown by @JayceCao above, nor does it seem like there is any activity regarding Gradle when I open the project, as a clean
~/.gradle
folder remains unpopulated. Even when I call Gradle to download the dependencies, I still get no autocompletion on the third party libraries, even though they are present. This is surely an issue with my configuration so I come here searching for some guidance. My questions are as follows, does autocomplete for third party libraries still work for you on eclipse.jdt.ls 0.35+, @JayceCao? Did settingGRADLE_USER_HOME
and cleaning up~/.gradle
fix the issue for you @orlandoc01? Should eclipse.jdt.ls trigger Gradle when opening a project? Thank you for your time.
@JayceCao can you elaborate on your coc.nvim
setup? I am using coc.nvim
with the jdt.ls extension. I get errors like The import com.whatever.whatever cannot be resolved
or any third-party package that I have. I don't get this issue when i load the project in Eclipse itself or IntelliJ.
@JayceCao can you share your coc.nvim and coc-java configuration, I updated to lastest version of eclispe.jdt.ls and vim plugins also clear dist folder, and still have this problem
@JayceCao can you elaborate on your
coc.nvim
setup? I am usingcoc.nvim
with the jdt.ls extension. I get errors likeThe import com.whatever.whatever cannot be resolved
or any third-party package that I have. I don't get this issue when i load the project in Eclipse itself or IntelliJ.
I have the same problem, did you figure it out?
@JayceCao can you elaborate on your
coc.nvim
setup? I am usingcoc.nvim
with the jdt.ls extension. I get errors likeThe import com.whatever.whatever cannot be resolved
or any third-party package that I have. I don't get this issue when i load the project in Eclipse itself or IntelliJ.I have the same problem, did you figure it out?
Sorry that I don't use nvim to write Java anymore and the original configuration file has been lost
Also having this problem... has anyone found a solution?
Also having this problem... has anyone found a solution?
Yeah I got it working for me (just a simple java file, not a project).
I put my libraries here java.project.referencedLibraries
See here https://github.com/redhat-developer/vscode-java/pull/1196#issuecomment-568192224
Ah ok, I suppose I could download the jars manually for my projects, thanks! I am using gradle with coc-java and neovim when experiencing this problem. With vscode everything works fine, but with nvim I get package not found and symbol missing errors. I believe that shouldn't be the case and it shouldn't require manually downloading jars, but I'm having a hard time finding out why it is happening.
Editor: neovim 0.4.0-DEV with coc-java. OS: Archlinux. build tool: Gradle. Gradle version:
build.gradle:
project structure:
log:
.project in data directory:
.classpath in data directory:
Please help me... I haven't found a solution for a long time.