OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.7k stars 168 forks source link

[Question] What is the setup in the popup video? #592

Closed ofrades closed 4 years ago

ofrades commented 4 years ago

Popup video

This example looks very nice. Can someone explain what they are using? Vim or nvim? Coc, ale, asyncomplete-vim, ncm2?

nickspoons commented 4 years ago

It's Vim 8.2. No plugins are used for auto-completion or popups, that's all native Vim with completions triggered by the normal <C-x><C-o>, and the signature help popup provided by OmniSharp-vim.

The demo would have looked almost identical in neovim, except for the rich documentation popups displayed beside completion options - neovim doesn't have Vim's completeopt popup option for that yet.

The extra method signature information in the command line is displayed by echodoc.vim

The solution name in the statusline ("quickcode.sln") is displayed by vim-sharpenup, which is also used to create mappings to, amongst other things, quickly open the signature help popups.

ALE is used to display code issues.

The colorscheme is gruvbox.

ofrades commented 4 years ago

Thanks @nickspoons, that is very nice. For snippets you are using UltiSnips?

nickspoons commented 4 years ago

I don't personally use snippets - I turn ultisnips on occasionally to test that it works but snippets are not part of my workflow.

sandersantema commented 4 years ago

Are you certain there's no way to get the documentation popups given the recent developments of the floating win in neovim? I'd really like to use the docs in neovim :)

nickspoons commented 4 years ago

@sandersantema here's the neovim issue for adding the option: #10996

To do it without this option is possible, but fiddly. We have to decide where to put the popup, depending on where the completion drop-down is and where the edges of the screen are etc. If neovim is going to add completeopt=popup then it's easier to wait for that than to roll our own.

If anyone wants to have a shot at it they are most welcome, I'll be happy to help. The linked issue says that ncm2 has done it (I haven't looked at their implementation) so perhaps some inspiration could be taken from there?

nickspoons commented 4 years ago

Just to clarify @sandersantema, you can currently use :OmniSharpDocumentation and :OmniSharpSignatureHelp in neovim, and these will use floating windows to display the same documentation as is displayed while completing in Vim with completeopt=popup.

ofrades commented 4 years ago

@nickspoons and for error checking? The red dot is very nice, are you using ale? I have tried without plugins but it is not working out of the box. Omnishapr-vim detects the error with globlalcodecheck if I run the command, but is not visible in the editor like yours.

nickspoons commented 4 years ago

@ofrades yes it's ALE. I configure it like this:

let g:ale_linters = {
\ 'cs': ['OmniSharp']
\}
let g:ale_sign_error = '•'
let g:ale_sign_warning = '•'
let g:ale_sign_info = '·'
let g:ale_sign_style_error = '·'
let g:ale_sign_style_warning = '·'
nickspoons commented 4 years ago

For anyone still wondering about the demo in the README, there is now a wiki page with a complete sample .vimrc, very similar to the demo:

https://github.com/OmniSharp/omnisharp-vim/wiki/Example-config

kubil6y commented 2 years ago

these are not bad neither.

"let g:ale_sign_error = '✘' "let g:ale_sign_warning = '!'