我在ubuntu 18.04机器上安装了.net-core 2.0.0。我还安装了(Nvim)nvim v0.2.2。
我能够在我的ubuntu机器上构建和运行.net-core项目。我的问题是如何将vim/nvim与c#自动完成一起用于我的.net-core项目。我已经为我的nvim安装了Omnisharp-vim插件,但它不工作。我尝试配置omnisharp-roslyn,但没有成功。我在Omnisharp github页面上看到,我需要安装omnisharp-roslyn服务器才能运行Omnisharp-vim。不幸的是没有运气。我在youtube上见过有人用vim编写带有自动补全功能的c#。
你知道怎么设置吗?因为我喜欢在我的ubuntu机器上使用这个功能。
谢谢
发布于 2019-10-17 02:08:13
你可以毫无问题地使用它。查看我的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 ENDhttps://stackoverflow.com/questions/50402511
复制相似问题