Skip to content

Commit 421d8d6

Browse files
author
Minh-Tam TRAN
committed
Merge branch 'master' of https://github.com/OmniSharp/omnisharp-vim into improve_sln_scope_handling
2 parents 246c105 + 390c888 commit 421d8d6

File tree

19 files changed

+164
-304
lines changed

19 files changed

+164
-304
lines changed

.github/workflows/tox.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: tox
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [windows-latest, ubuntu-latest, macos-latest]
16+
python-version: [2.7, 3.9]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@main
21+
22+
- name: Setup Python
23+
uses: actions/setup-python@main
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install Dependencies
28+
run: |
29+
pip install tox
30+
31+
- name: Run Test
32+
run: |
33+
cd python
34+
tox -e py

.github/workflows/vader.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Vader
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
cfg:
16+
- { editor: vim, neovim: false, version: nightly }
17+
- { editor: vim, neovim: false, version: stable }
18+
- { editor: neovim, neovim: true, version: stable }
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@main
23+
24+
- name: Setup dotnet
25+
uses: actions/setup-dotnet@main
26+
with:
27+
dotnet-version: '3.1.x'
28+
29+
- name: Setup Vim
30+
uses: rhysd/action-setup-vim@v1
31+
with:
32+
neovim: ${{ matrix.cfg.neovim }}
33+
version: ${{ matrix.cfg.version }}
34+
35+
- name: Install Dependencies
36+
run: |
37+
installer/omnisharp-manager.sh -l $HOME/.omnisharp/omnisharp-roslyn
38+
git clone https://github.com/junegunn/vader.vim.git $GITHUB_WORKSPACE/../vader.vim
39+
40+
- name: Run Test
41+
run: |
42+
cd test
43+
vim -esNu vimrc -c 'Vader! *'
44+
if: matrix.cfg.editor == 'vim'
45+
46+
- name: Run Test
47+
run: |
48+
cd test
49+
nvim --headless -Nu vimrc -c 'Vader! *'
50+
env:
51+
VADER_OUTPUT_FILE: /dev/stderr
52+
if: matrix.cfg.editor == 'neovim'

.github/workflows/vint.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Vint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
vint:
11+
name: runner / vint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: vint
16+
uses: reviewdog/action-vint@v1
17+
with:
18+
github_token: ${{ secrets.github_token }}
19+
level: error
20+
reporter: github-pr-review

.travis.yml

-36
This file was deleted.

README.md

+28-50
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,19 @@
22
<img alt="OmniSharp" src="https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/omnisharp-logo-light.png">
33
</h1>
44

5-
[![Travis status](https://api.travis-ci.org/OmniSharp/omnisharp-vim.svg)](https://travis-ci.org/OmniSharp/omnisharp-vim)
6-
[![AppVeyor status](https://ci.appveyor.com/api/projects/status/github/OmniSharp/omnisharp-vim?svg=true)](https://ci.appveyor.com/project/nickspoons/omnisharp-vim)
5+
![Vader status](https://github.com/OmniSharp/omnisharp-vim/actions/workflows/vader.yml/badge.svg)
6+
![Vint status](https://github.com/OmniSharp/omnisharp-vim/actions/workflows/vint.yml/badge.svg)
77

88
OmniSharp-vim is a plugin for Vim to provide IDE like abilities for C#.
99

1010
OmniSharp works on Windows, and on Linux and OS X with Mono.
1111

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.
1713

1814
![Popup Demo](https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/omnisharp-popup-demo.gif)
1915

2016
_(see the wiki [example config](https://github.com/OmniSharp/omnisharp-vim/wiki/Example-config) for a similar configuration to this demo)_
2117

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-
5418
## Features
5519

5620
* Contextual code completion
@@ -78,21 +42,17 @@ Any time `g:OmniSharp_server_stdio` is modified, the server needs to be re-insta
7842
* Code formatter
7943
* Run unit tests and navigate to failing assertions
8044

81-
## Screenshots
82-
#### Auto Complete
83-
![OmniSharp screenshot](https://f.cloud.github.com/assets/667194/514371/dc03e2bc-be56-11e2-9745-c3202335e5ab.png)
45+
## Asynchronous server interactions over stdio
8446

85-
#### Find Symbols
86-
![Find Symbols screenshot](https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/FindTypes.png)
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.
8748

88-
#### Find Usages
89-
![Find Usages screenshot](https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/FindUsages.png)
49+
To use the HTTP server instead, add this to your .vimrc:
9050

91-
#### Code Actions
92-
![Code Actions screenshot](https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/CodeActions.png)
51+
```vim
52+
let g:OmniSharp_server_stdio = 0
53+
```
9354

94-
#### Code Actions Available (see [wiki](https://github.com/OmniSharp/omnisharp-vim/wiki/Code-Actions-Available-flag) for details)
95-
![Code Actions Available](https://user-images.githubusercontent.com/5274565/38906320-1aa2d7c0-430a-11e8-9ee3-40790b7e600e.png)
55+
Any time `g:OmniSharp_server_stdio` is modified, the server needs to be re-installed with `:OmniSharpInstall`.
9656

9757
## Installation
9858
### Plugin
@@ -446,6 +406,24 @@ However "buffer" popups (previewing definitions and implementations) may be conf
446406
- `center`: Centered in the Vim window, filling the entire workspace.
447407

448408

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+
449427
## Configuration
450428

451429
### Example vimrc

appveyor.yml

-5
This file was deleted.

0 commit comments

Comments
 (0)