You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Newly created C# files have to be added to the Assembly-CSharp.csproj file. This is done automatically by Unity if a supported external editor is chosen. This issue can be solved through the other major issue: #8
You can hook in to one of unity package to auto regenerate .csproj files each compilation, like i did in this repo: https://github.com/reaz1995/UnityNvimSupport.
If you want lsp support for newly created files just add <Compile Include="Assets\**\*.cs" /> line to Assembly-CSharp.csproj. (it can be done auto to check and include this line in Assembly-CSharp.csproj).
Also you dont need more .csproj than Assembly-CSharp.csproj and Assembly-CSharp-Editor.csproj those have links to .dlls and resolve lsp autocmp, bloating main project with all sub projects will slow your lsp by alot. If you dont get autocmp it means your paths in .csproj wasn't resolved correctly so you it mean you probably run nvim in wsl on Windows which require path translation in .csproj.
@reaz1995 Thanks for the information. I already knew that this current approach is a complete messed up and I am currently working on something similar to this https://github.com/Unity-Technologies/com.unity.ide.vscode (for NeoVim of course). A deal breaker for me is attaching Neovim debugging to Unity (similar to the way VSCode - VS does it) - so that's what I am currently focusing on.
I will do a major cleanup for this project this + next week and get back to addressing this issue :)
LSP does not properly work for newly added files.
Potential fix in this issue discussion:
OmniSharp/omnisharp-roslyn#2250
The text was updated successfully, but these errors were encountered: