-
Notifications
You must be signed in to change notification settings - Fork 416
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
Working with *.csx and intellisense is messing up #1199
Comments
I am not sure I fully understand, so let me try and recap: you say that when OmniSharp is started with pre-existing csx files, everything is fine. But when you start OmniSharp when no csx files exist, and then you later add one, intellisense for the new one is not surfaced properly? |
Oh I think I know what you mean. We have a file watcher for new csx files, but it only gets activated once at least 1 csx file exists on startup. Otherwise we won't discover new files. If that's the thing that the you are experiencing, then I agree, it would have to be fixed. The workaround for now would be to keep an empty |
I can try to create a small repo if needed but you have understand correctly.
That's exactly what I'm experience.
Will be there a fix in the future? |
Thanks, I managed to reproduce it, so no problem. If I provided you a local OmniSharp build for testing this, would you be interested in trying this out? |
Oh that was fast! Yes I would be interested. |
no problem! |
Thank you, I will check in the afternoon. |
Is it possible for you to provide the OmniSharp.Http.Driver? |
Thanks - I think then you will really need to provide more details about what you are doing and how you are wiring things up. I think in your case it's not really related to the file watching issue anymore, but has to do something with your current set up.
|
|
Thanks a lot. I think I now understand what is happening. Sorry, there was a bit of a confusion on the type of editor that you are using and that impacts things a lot. However, in your case the issue is slightly more complex. When I was referring to "file watching" here, I wasn't referring to physical watching of file system, but instead a file watching service that OmniSharp has, and exposes as endpoint. It is the responsibility of the editor to watch for file changes and inform OmniSharp about them over the So in your case, the process would be something like this:
Also, a final thing, when you are unsure what is going on, you can always run OmniSharp with the |
Thanks a lot. That filesChanged was missing. Calling that fixed my problem. Thank you! |
I'm working on an asp.net core solution. In that solution the user can add a c# script via monaco editor. For better usage I'm running Omnisharp as a service and send the /autocomplete to omnisharp.
Omnisharp is started this way: Omnisharp.exe -s Path
The scripts are stored on the file system as a xxx.csx file. When starting omnisharp when a csx file is present it works well. Added own assemblies as #r "XY.dll".
If omnisharp starts without the *.csx file the intellisense is not working and from /codecheck I'm also getting warnings that #r can only be used in scripts.
What would be a smart way to handle this?
The text was updated successfully, but these errors were encountered: