|
2 | 2 | <img alt="OmniSharp" src="https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/omnisharp-logo-light.png">
|
3 | 3 | </h1>
|
4 | 4 |
|
5 |
| -[](https://travis-ci.org/OmniSharp/omnisharp-vim) |
6 |
| -[](https://ci.appveyor.com/project/nickspoons/omnisharp-vim) |
| 5 | + |
| 6 | + |
7 | 7 |
|
8 | 8 | OmniSharp-vim is a plugin for Vim to provide IDE like abilities for C#.
|
9 | 9 |
|
10 | 10 | OmniSharp works on Windows, and on Linux and OS X with Mono.
|
11 | 11 |
|
12 |
| -The plugin relies on the [OmniSharp-Roslyn](https://github.com/OmniSharp/omnisharp-roslyn) server, a .NET development platform used by several editors including Visual Studio Code, Emacs, Atom and others. |
13 |
| - |
14 |
| -## New! Popups |
15 |
| - |
16 |
| -Use Vim's popup windows and neovim's floating windows to display code/documentation without disrupting your window layouts: see [Popups](#popups) section for details and configuration options. |
| 12 | +The plugin relies on the [OmniSharp-Roslyn](https://github.com/OmniSharp/omnisharp-roslyn) server, a .NET development platform used by several editors including Visual Studio Code and Emacs. |
17 | 13 |
|
18 | 14 | 
|
19 | 15 |
|
20 | 16 | _(see the wiki [example config](https://github.com/OmniSharp/omnisharp-vim/wiki/Example-config) for a similar configuration to this demo)_
|
21 | 17 |
|
22 |
| -## New! Run unit tests |
23 |
| - |
24 |
| -It is now possible to run unit tests via OmniSharp-roslyn, with success/failures listed in the quickfix window for easy navigation: |
25 |
| - |
26 |
| -```vim |
27 |
| -" Run the current unit test (the cursor should be on/inside the test method) |
28 |
| -:OmniSharpRunTest |
29 |
| -
|
30 |
| -" Run all unit tests in the current file |
31 |
| -:OmniSharpRunTestsInFile |
32 |
| -
|
33 |
| -" Run all unit tests in the current file, and file `tests/test1.cs` |
34 |
| -:OmniSharpRunTestsInFile % tests/test1.cs |
35 |
| -``` |
36 |
| - |
37 |
| -**Note:** this is only available using the stdio server, and unfortunately does _not_ work in translated WSL, due to the way OmniSharp-roslyn runs the tests. |
38 |
| - |
39 |
| -## Asynchronous server interactions over stdio |
40 |
| - |
41 |
| -For vim8 and neovim, OmniSharp-vim uses the OmniSharp-roslyn stdio server instead of the older HTTP server, using pure vimscript (no python dependency!). All server operations are asynchronous and this results in a much smoother coding experience. |
42 |
| - |
43 |
| -**Note:** neovim on Windows has been unable to communicate with the stdio server until a (very) recent neovim patch. |
44 |
| -If you are using nvim-qt _or_ terminal neovim on Windows, you will require a neovim [nightly build](https://github.com/neovim/neovim/releases/nightly) `NVIM v0.5.0-556` (2020-06-11) or newer, or will need to wait for neovim 0.5 to be released. |
45 |
| - |
46 |
| -To use the HTTP server instead, add this to your .vimrc: |
47 |
| - |
48 |
| -```vim |
49 |
| -let g:OmniSharp_server_stdio = 0 |
50 |
| -``` |
51 |
| - |
52 |
| -Any time `g:OmniSharp_server_stdio` is modified, the server needs to be re-installed with `:OmniSharpInstall`. |
53 |
| - |
54 | 18 | ## Features
|
55 | 19 |
|
56 | 20 | * Contextual code completion
|
@@ -78,21 +42,17 @@ Any time `g:OmniSharp_server_stdio` is modified, the server needs to be re-insta
|
78 | 42 | * Code formatter
|
79 | 43 | * Run unit tests and navigate to failing assertions
|
80 | 44 |
|
81 |
| -## Screenshots |
82 |
| -#### Auto Complete |
83 |
| - |
| 45 | +## Asynchronous server interactions over stdio |
84 | 46 |
|
85 |
| -#### Find Symbols |
86 |
| - |
| 47 | +For vim8 and neovim, OmniSharp-vim uses the OmniSharp-roslyn stdio server instead of the older HTTP server, using pure vimscript (no python dependency!). All server operations are asynchronous and this results in a much smoother coding experience. |
87 | 48 |
|
88 |
| -#### Find Usages |
89 |
| - |
| 49 | +To use the HTTP server instead, add this to your .vimrc: |
90 | 50 |
|
91 |
| -#### Code Actions |
92 |
| - |
| 51 | +```vim |
| 52 | +let g:OmniSharp_server_stdio = 0 |
| 53 | +``` |
93 | 54 |
|
94 |
| -#### Code Actions Available (see [wiki](https://github.com/OmniSharp/omnisharp-vim/wiki/Code-Actions-Available-flag) for details) |
95 |
| - |
| 55 | +Any time `g:OmniSharp_server_stdio` is modified, the server needs to be re-installed with `:OmniSharpInstall`. |
96 | 56 |
|
97 | 57 | ## Installation
|
98 | 58 | ### Plugin
|
@@ -446,6 +406,24 @@ However "buffer" popups (previewing definitions and implementations) may be conf
|
446 | 406 | - `center`: Centered in the Vim window, filling the entire workspace.
|
447 | 407 |
|
448 | 408 |
|
| 409 | +## Run unit tests |
| 410 | + |
| 411 | +It is possible to run unit tests via OmniSharp-roslyn, with success/failures listed in the quickfix window for easy navigation: |
| 412 | + |
| 413 | +```vim |
| 414 | +" Run the current unit test (the cursor should be on/inside the test method) |
| 415 | +:OmniSharpRunTest |
| 416 | +
|
| 417 | +" Run all unit tests in the current file |
| 418 | +:OmniSharpRunTestsInFile |
| 419 | +
|
| 420 | +" Run all unit tests in the current file, and file `tests/test1.cs` |
| 421 | +:OmniSharpRunTestsInFile % tests/test1.cs |
| 422 | +``` |
| 423 | + |
| 424 | +**Note:** this is only available using the stdio server, and unfortunately does _not_ work in translated WSL, due to the way OmniSharp-roslyn runs the tests. |
| 425 | + |
| 426 | + |
449 | 427 | ## Configuration
|
450 | 428 |
|
451 | 429 | ### Example vimrc
|
|
0 commit comments