我有安装了.net-core 2.0.0的ubuntu 18.04机器。 我还安装了(neovim(nvim v0.2.2。
我能够在我的 ubuntu 机器上构建和运行 .net 核心项目。 我的问题是如何将 vim/nvim 与 c# 自动完成功能用于我的 .net 核心项目。 我已经为我的 nvim 安装了 Omnisharp-vim 插件,但它不起作用。 我试图配置全能罗斯林,但没有运气。我在 Omnisharp github 页面上读到,我需要安装 omnisharp-roslyn 服务器才能让 Omnisharp-vim 工作。不幸的是没有运气。 我在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