我安装了.net-core 2.0.0的ubuntu 18.04机器。我还安装了(neovim)nvim v0.2.2。
我能够在ubuntu机器上构建并运行.net核心项目。我的问题是如何在.net核心项目中使用带有c#自动完成功能的vim / nvim。我已经为我的nvim安装了Omnisharp-vim插件,但无法正常工作。我尝试配置omnisharp-roslyn,但是没有运气。我在Omnisharp github页面上读到,我需要安装omnisharp-roslyn服务器才能使Omnisharp-vim工作。不幸的是,在安装omnisharp-roslyn时没有任何帮助。我见过有人在YouTube上用自动完成功能在vim中编码c#。
任何想法如何设置?因为我很想在我的ubuntu机器上拥有此功能。
谢谢
您可以毫无问题地使用。请参阅我的C#配置:
" C#
Plug 'https://github.com/adelarsq/vim-csharp', {'for':['cs','csx','cshtml.html','csproj','solution']}
Plug 'https://github.com/OmniSharp/omnisharp-vim', {'for':['cs','csx','cshtml.html','csproj','solution'], 'on': ['OmniSharpInstall']}
let g:OmniSharp_server_stdio = 1
let g:OmniSharp_selector_ui = '' " Use vim - command line, quickfix etc.
let g:OmniSharp_highlight_types = 2
augroup my_omnisharp
autocmd!
au FileType cs nmap <buffer> <silent> ga :OmniSharpGetCodeActions<CR>
au FileType cs nmap <buffer> <silent> gd :OmniSharpGotoDefinition<CR>
au FileType cs nmap <buffer> <silent> gq :OmniSharpCodeFormat<CR>
au FileType cs nmap <buffer> <silent> gu :OmniSharpFixUsings<CR>
au FileType cs nmap <buffer> <silent> gr :OmniSharpFindUsages<CR>
au FileType cs nmap <buffer> <silent> gK :OmniSharpDocumentation<CR>
au FileType cs nmap <buffer> <silent> <F2> :OmniSharpRename<CR>
augroup END