eclipse / aCute

Eclipse aCute - C# edition in Eclipse IDE
https://projects.eclipse.org/projects/tools.acute
Eclipse Public License 2.0
78 stars 33 forks source link

Autocompletion not working #173

Open Degubi opened 5 years ago

Degubi commented 5 years ago

Hello! I have a problem with autocompletion not working. For this very simple piece of code:

using System;

namespace NewDotnetProject{
    class Program{
        static void Main(string[] args){
            Console.WriteLine("Hello World!");
        }
    }
}

I can't autocomplete anything. Also I don't get any errors if I mistype anything. Dotnet path: "C:\Program Files\dotnet\dotnet.exe". Gives command version: 2.1.700

Eclipse .log file with exceptions: https://pastebin.com/tpQQ0Bw6

Screenshot of omnisharp directory: bug

e-ahmedwaleed commented 4 years ago

I'd add that I have the same problem, tried trivial solutions such as doing a clean uninstall and trying again, down grading .NET to exactly 2.0v .. but failed.

I get this errors in the log every time I type a char in the same hello world program, so I guess it is very related to the auto completion image

e-ahmedwaleed commented 4 years ago

The 3 Errors Are: image image image

I hope this helps ... still can't make use of the suggested solution in the error since i have no idea what does it refer to.

mickaelistria commented 4 years ago

aCute is currently lacking maintainers. Unless someone voice in quickly with intent to fix this issue, we'll just terminate the project.

eriawan commented 4 years ago

@EngAhmedWaleed

Let me see... what id the exact version of .NET Core SDK you have?

e-ahmedwaleed commented 4 years ago

@EngAhmedWaleed

Let me see... what id the exact version of .NET Core SDK you have?

I had 3.1 (latest version), then rolled back to 2.0 and there is no change in the results ... after I've read the first error msg I mentioned before (in my second comment), it is related to lsp4e I guess the problem is there not in the core.

I would appreciate any help since I really admire every plug in like this one, I might even try to at least manipulate some classes to disable this feature if there is no hope to make it work (just to stop the errors from appearing).

Just saw the edits: the exact IDs are : SDK 3.1.201 & SDK 2.1.202

eriawan commented 4 years ago

@EngAhmedWaleed

Ok, currently I only have .NET Core SDK 3.0.101 and 3.1.200 installed on my machine, and it doesn't happen.

I'll install SDK 2.1 now, because I need to test in v2.1 SDK too.

e-ahmedwaleed commented 4 years ago

A little progress: I tried to do the suggested solution in the error msg and this is the result image Now i get one error msg (the path to exe gives the same result too) image

Not only the 3 errors are reduced to only one, but also the auto completion started to appear but not work (it stucks at 0%) image

If I make the path to the dir, I get access denied error.

I know that in the https://github.com/eclipse/aCute#alternative-configuration section it is talking about a local version of the OmniSharp, still don't know how to install it i'll try maybe it solves the problem

eriawan commented 4 years ago

@EngAhmedWaleed

Have you ensured that you already have Omnisharp in the plugin folder?

If the omnisharp-roslyn folder is not available, then that error may occur.

This is the look of the folder contents inside the eclipse acute plugin:

image

e-ahmedwaleed commented 4 years ago

@eriawan Yes, I took the path for the environment variable from there. image

I'm currently trying to install a local copy of it (but still having several errors during the building process), since I hope it will give a result

See https://marketplace.eclipse.org/content/acute-c-edition-eclipse-ide-experimental . It currently expects the user to have omnisharp-node-client installed locally and path set as environment variables. This should be improved in the next days with https://github.com/mickaelistria/aCute/issues/8

However, integration with LSP and Eclipse IDE is currently somehow blocked by https://github.com/OmniSharp/omnisharp-node-client/issues/377

Originally posted by @mickaelistria in https://github.com/OmniSharp/omnisharp-node-client/issues/309#issuecomment-286070184

e-ahmedwaleed commented 4 years ago

Trying to install a local one is a new problem I can't bother myself with :(, so eventually I gave up on trying to.

New errors and new problems appear :')

e-ahmedwaleed commented 4 years ago

Recent updates: I missed up alot with my eclipse files while trying to make this work, so I installed a fresh 2020-03 eclipse (but in D directory), the problem holds, now all errors gives :

java.util.concurrent.TimeoutException at java.util.concurrent.CompletableFuture.timedGet(Unknown Source) at java.util.concurrent.CompletableFuture.get(Unknown Source)

That is after i assigned OMNISHARP_LANGUAGE_SERVER_COMMAND to omnisharp exe location, otherwise i get the first 3 errors again which states that Omnisharp is not found.

Andrey-VZ commented 2 years ago

No need OMNISHARP_LANGUAGE_SERVER_COMMAND variable.

Contents of ".metadata\.plugins\org.eclipse.acute\omnisharp-roslyn\" need to move to "server" subfolder.

Source here: https://github.com/eclipse/aCute/blob/08a26873b168e85403eacf5118460a222376fea0/org.eclipse.acute/src/org/eclipse/acute/OmnisharpStreamConnectionProvider.java#L126

Also possibe to view eclipse iteraction with LSP by turning on logs in Preferences - Language Servers - Logs