-
Notifications
You must be signed in to change notification settings - Fork 167
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
Recognize changed project structure. #723
Comments
Not really. There are no file watchers in OmniSharp-vim, and I don't think it would make sense for there to be. To me it would kind of make sense to have some file watchers on the server side, OmniSharp-roslyn, but I suspect if they were interested in automatically detecting changes they would have done it already. When I make multi-file changes, I just restart the server. For individual file changes, you can tell OmniSharp-roslyn about the changes by just opening the modified file in your Vim session. The new state of the file will be sent to OmniSharp-roslyn. |
I see. Well I guess there is nothing that can be done here. If any one finds some kind of solution for this, please post it here. |
Hello. I stumbled upon the endpoint I remembered this issue and thought that maybe these can be used in some way to solve the problem. It would be nice to trigger this endpoint via omnisharp-vim, so that one does not have to restart the whole server again, as this takes quite a while. |
Hi @DasOhmoff, That endpoint was added in this PR. Reading the description, it appears to be about running roslyn analyzers. I don't think this endpoint triggers reading modified files from disk. |
Ah I see. But could we not at least trigger this endpoint manually when needed via omnisharp-vim? Then one would not have to restart the whole server again. |
Well yeah we can trigger the endpoint but what for? You still need to restart the server to have the external changes you've made read in. |
Does it not reanalize the whole project when we trigger the endpoint? In that case would the the server not read in the external changes itself, and afterwards notify vim about it? Maybe I misunderstood. |
I don't think so. Looking at the PR I think it just tells all analysers to restart. To start analysing the code that is in memory. If it reloads all files from disk, what would be the difference between this endpoint, and restarting the server? Give it a try if you want, I just can't imagine that this endpoint will solve the original issue. |
Hello, thank you for your help.
When I work within vim on a cs file, everything works great and fine. But when I then switch to Visual Studio f.e. and change some things, such as adding a file to the project f.e., then vim stops working correctly. It shows errors that are not there and also cannot find the types in the new files. After restarting the servers everything works fine again.
Is there a way omnisharp recognize the changed project structure or files, and to update accordingly?
The text was updated successfully, but these errors were encountered: