Compile omnisharp-roslyn server
Clone omnisharp-roslyn
Use command ./build.sh
to compile omnisharp-roslyn server (omnisharp-roslyn will be compiled with local environment mono)
nvim settings
Create ~/.config/nvim/omnisharp.config.vim
Copy the following script to omnisharp.config.vim.
Don’t forget to change the value of let g:OmniSharp_server_path = ''
to the absolute path of OmniSharp.exe which built just now.
Add following lines to ~/.config/nvim/init.vim
.
Run nvim
, execute :PlugInstall
to install omnisharp-vim plugin.
Unity3D development in nvim
-
Run nvim from the directory {project_dir}/Assets/Scripts/.
-
Create/Delete/Rename/Move C# script files from Unity3D Editor (Which will handle the .meta files).
-
After operation of script files in Unity3D, Go to Preferences -> External Tools and Click Regenerate project files to update the sln and csproj file.
-
Use <space>rs
in nvim to restart omnisharp server, which will reload sln and csproj files.
Reference
omnisharp-roslyn
omnisharp-vim
Unity3D and .NET Framework
Unity3D Command line arguments
Issue: Doesn’t download OmniSharp-Roslyn before trying to start on macOS
coc-omnisharp