Closed BlueStaggo closed 3 years ago
OmniSharp-vim uses vim omni-completion. Trigger it from insert mode by typing <C-x><C-o>
.
If you want completions to be displayed automatically as you type, you'll need an auto-completion plugin, as described in the README. The example config uses asyncomplete.
To verify that OmniSharp-vim is working as expected, Try some things like :OmniSharpGotoDefinition
, :OmniSharpFindUsages
, :OmniSharpGlobalCodeCheck
.
I don't know if you want feedback on your init.vim, but the line "This is needed and idk why" triggered me :smile:. As you are using vim-plug, you don't need line 21 filetype plugin on
, because vim-plug does this for you. ~And I expect the line you have in after/init.vim
could go directly in your init.vim
, after you set colorscheme gruvbox
~ No I was wrong about this bit, sorry, discard.
I've been using <C-x><C-o>
and that didn't work. The thing that surprised me was that OmniSharp commands didn't do anything and didn't throw any errors as far as I know. Also, I'm quite new to Vim, so I didn't know what filetype plugin on
did.
Ohhhh ... neovim 0.4.4 on Windows. That doesn't work 😅
There was a neovim bug, which I reported, and was fixed. See https://github.com/OmniSharp/omnisharp-vim/issues/499 for details.
So your options are to download a nightly build of neovim, or use vim. Sorry I didn't put the pieces together immediately.
Norton hates Neovim 5.0 (just like many other things) (32 bit and 64 bit), I don't know how to get the missing dependencies to build it with MinGW and I don't know how to get Plug working with Vim. I'll just wait for 5.0 to release unless there are workarounds. I'll leave this open for now.
I don't think there's any reason to keep the issue open: it's a duplicate of #499 and is also mentioned in the README, under Asynchronous server interactions over Studio.
Getting vim-plug to work with vim or gvim is very simple, it's described in the project README. But if you'd prefer to wait for neovim 0.5 to be released, that's up to you. The only other workaround to get OmniSharp-vim working on Windows with neovim is to use the HTTP version of the server instead of the stdio version. However, I wouldn't recommend this, using the HTTP server means you need python, all server requests are synchronous, and many features are not available, such as popups and full semantic highlighting.
I managed to get it working with Vim. You can easily tell why I want to wait for Neovim 0.5 instead: My guess is that the omnicompletion pop-up was added in by Neovim. I've tried the HTTP version and nothing worked. Guess I'll have to wait for 0.5!
You can easily tell why I want to wait for Neovim 0.5 instead
No? What's the problem? I can't see much in that small screenshot. Is the completion menu not being displayed? That's peculiar. What version of vim is this, and is it terminal or gvim?
My guess is that the omnicompletion pop-up was added in by Neovim.
No, omnicompletion and the completion menu has been part of vim for many years, long before neovim was forked.
No, omnicompletion and the completion menu has been part of vim for many years, long before neovim was forked
Sorry, I made a mistake. I set my completeopt
setting to noinsert
, which, apparently, is required by muComplete
. I guess NeoVim automatically adds in the menu
option. I guess I'll use Vim for now until NeoVim 0.5 comes out or I find a nightly build of 0.5 that Norton doesn't mind.
The default completeopt for both vim and neovim is completeopt=menu,preview
Pattern not found
I'm using OmniSharp on Neovim for the first time and I can't seem to get Omni-completion working.
init.vim (or .vimrc for vim)
after/init.vim (I don't know the Vim equivalent)
.NET info
dotnet --version
: 5.0.203dotnet --list-sdks
: 5.0.203 [C:\Program Files\dotnet\sdk]msbuild --version
: 16.9.0.16703omnisharp msbuild --version
: MSBuild completely screws up here, but OmniSharp uses the one from Visual Studio, so it is ok.OmniSharp log
Extra info
:version
returns NVIM v0.4.4.