{"id":13572607,"url":"https://github.com/OmniSharp/omnisharp-vim","last_synced_at":"2025-04-04T10:30:58.481Z","repository":{"id":800020,"uuid":"1503507","full_name":"OmniSharp/omnisharp-vim","owner":"OmniSharp","description":"Vim omnicompletion (intellisense) and more for C#","archived":false,"fork":false,"pushed_at":"2025-01-30T01:46:48.000Z","size":9913,"stargazers_count":1752,"open_issues_count":26,"forks_count":167,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-04-03T14:42:10.074Z","etag":null,"topics":["csharp","omnisharp","omnisharp-roslyn","vim","vim-plugins"],"latest_commit_sha":null,"homepage":"http://www.omnisharp.net","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OmniSharp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-03-20T16:12:11.000Z","updated_at":"2025-04-03T14:22:49.000Z","dependencies_parsed_at":"2024-12-19T00:03:05.738Z","dependency_job_id":"8ef08c02-28ff-4e26-81db-a35ab7be245d","html_url":"https://github.com/OmniSharp/omnisharp-vim","commit_stats":{"total_commits":1442,"total_committers":111,"mean_commits":12.99099099099099,"dds":0.6560332871012482,"last_synced_commit":"4ffba1ae5399cb211f6003ec5e39212c9cf6b9f4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmniSharp%2Fomnisharp-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmniSharp%2Fomnisharp-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmniSharp%2Fomnisharp-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmniSharp%2Fomnisharp-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OmniSharp","download_url":"https://codeload.github.com/OmniSharp/omnisharp-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247160308,"owners_count":20893807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","omnisharp","omnisharp-roslyn","vim","vim-plugins"],"created_at":"2024-08-01T14:01:28.161Z","updated_at":"2025-04-04T10:30:58.393Z","avatar_url":"https://github.com/OmniSharp.png","language":"Vim Script","funding_links":[],"categories":["Resources","Vim Script","Vim script"],"sub_categories":["Tools"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg alt=\"OmniSharp\" src=\"https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/omnisharp-logo-light.png\"\u003e\n\u003c/h1\u003e\n\n![Vader status](https://github.com/OmniSharp/omnisharp-vim/actions/workflows/vader.yml/badge.svg)\n![Vint status](https://github.com/OmniSharp/omnisharp-vim/actions/workflows/vint.yml/badge.svg)\n\nOmniSharp-vim is a plugin for Vim to provide IDE like abilities for C#.\n\nOmniSharp works on Windows, Linux and MacOS.\n\nThe 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.\n\n![Popup Demo](https://raw.github.com/OmniSharp/omnisharp-vim/gh-pages/omnisharp-popup-demo.gif)\n\n _(see the wiki [example config](https://github.com/OmniSharp/omnisharp-vim/wiki/Example-config) for a similar configuration to this demo)_\n\n## Features\n\n* Contextual code completion\n  * Code documentation and type lookup, displayed in popups or the preview window, when available (depends on installed SDKs)\n  * Completion Sources are provided for:\n    * [asyncomplete-vim](https://github.com/prabirshrestha/asyncomplete.vim)\n    * [coc.nvim](https://github.com/neoclide/coc.nvim)\n    * [ncm2](https://github.com/ncm2/ncm2)\n    * [deoplete](https://github.com/Shougo/deoplete.nvim)\n  * Completion snippets are supported. e.g. Console.WriteLine(TAB) (ENTER) will complete to Console.WriteLine(string value) and expand a dynamic snippet, this will place you in SELECT mode and the first method argument will be selected. \n    * Requires [UltiSnips](https://github.com/SirVer/ultisnips) and supports standard C-x C-o completion as well as completion/autocompletion plugins such as [asyncomplete-vim](https://github.com/prabirshrestha/asyncomplete.vim), [Supertab](https://github.com/ervandew/supertab), [Neocomplete](https://github.com/Shougo/neocomplete.vim) etc.\n    * Requires `set completeopt-=preview` when using [Neocomplete](https://github.com/Shougo/neocomplete.vim) because of a compatibility issue with [UltiSnips](https://github.com/SirVer/ultisnips). \n\n* Jump to the definition of a type/variable/method\n* Find symbols interactively (uses selector plugin by default: [fzf](https://github.com/junegunn/fzf), [vim-clap](https://github.com/liuchengxu/vim-clap), [CtrlP](https://github.com/ctrlpvim/ctrlp.vim) or [unite.vim](https://github.com/Shougo/unite.vim))\n* Find implementations/derived types\n* Find usages (optionally uses selector plugin: [fzf](https://github.com/junegunn/fzf) or [vim-clap](https://github.com/liuchengxu/vim-clap))\n* Contextual code actions (unused usings, use var....etc.) (uses selector plugin by default: [fzf](https://github.com/junegunn/fzf), [vim-clap](https://github.com/liuchengxu/vim-clap), [CtrlP](https://github.com/ctrlpvim/ctrlp.vim) or [unite.vim](https://github.com/Shougo/unite.vim))\n* Find code issues (unused usings, use base type where possible....etc.) (requires plugin: [ALE](https://github.com/dense-analysis/ale) or [Syntastic](https://github.com/vim-syntastic/syntastic))\n* Find all code issues in solution and populate the quickfix window\n* Fix using statements for the current buffer (sort, remove and add any missing using statements where possible)\n* Rename refactoring\n* Full semantic highlighting\n* Code error checking\n* Code formatter\n* Run unit tests and navigate to failing assertions\n\n## Asynchronous server interactions over stdio\n\nFor 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.\n\nTo use the HTTP server instead, add this to your .vimrc:\n\n```vim\nlet g:OmniSharp_server_stdio = 0\n```\n\nAny time `g:OmniSharp_server_stdio` is modified, the server needs to be re-installed with `:OmniSharpInstall`.\n\n## Installation\n### Plugin\nInstall the Vim plugin using your preferred plugin manager:\n\n| Plugin Manager                                       | Command                                                                              |\n|------------------------------------------------------|--------------------------------------------------------------------------------------|\n| [Vim-plug](https://github.com/junegunn/vim-plug)     | `Plug 'OmniSharp/omnisharp-vim'`                                                     |\n| [Vundle](https://github.com/gmarik/vundle)           | `Bundle 'OmniSharp/omnisharp-vim'`                                                   |\n| [NeoBundle](https://github.com/Shougo/neobundle.vim) | `NeoBundle 'OmniSharp/omnisharp-vim'`                                                |\n\n... or git:\n\n| ['runtimepath'](http://vimhelp.appspot.com/options.txt.html#%27runtimepath%27) handler | Command                                            |\n|------------------------------------------------------|--------------------------------------------------------------------------------------|\n| [Vim 8.0+ Native packages](http://vimhelp.appspot.com/repeat.txt.html#packages) | `$ git clone https://github.com/OmniSharp/omnisharp-vim ~/.vim/pack/plugins/start/omnisharp-vim` |\n| [Pathogen](https://github.com/tpope/vim-pathogen)    | `$ git clone https://github.com/OmniSharp/omnisharp-vim ~/.vim/bundle/omnisharp-vim`     |\n\nIf not using a plugin manager such as Vim-plug (which does this automatically), make sure your .vimrc contains these lines:\n\n```vim\nfiletype indent plugin on\nsyntax enable\n```\n\n### Server\nOmniSharp-vim depends on the [OmniSharp-Roslyn](https://github.com/OmniSharp/omnisharp-roslyn) server. The first time OmniSharp-vim tries to open a C# file, it will check for the presence of the server, and if not found it will ask if it should be downloaded. Answer `y` and the latest version will be downloaded and extracted to `~/.cache/omnisharp-vim/omnisharp-roslyn`, ready to use. *Note:* Requires [`curl`](https://curl.haxx.se/) or [`wget`](https://www.gnu.org/software/wget/) on Linux, macOS, Cygwin and WSL.\n\nRunning the command `:OmniSharpInstall` in vim will also install/upgrade to the latest OmniSharp-roslyn release.\nTo install a particular release, including pre-releases, specify the version number like this:\n\n```vim\n:OmniSharpInstall v1.35.2\n```\n\n*Note:* These methods depend on the `g:OmniSharp_server_stdio` variable to decide which OmniSharp-roslyn server to download. If you are unsure, try using the default stdio option first, and only fall back to HTTP if you have problems.\n\n* **vim8.0+ or neovim**: Use the stdio server, it is used asynchronously and there is no python requirement.\n\n* **\u003c vim8.0**: Use the HTTP server. Your vim must have python (2 or 3) support, and you'll need either [vim-dispatch](https://github.com/tpope/vim-dispatch) or [vimproc.vim](https://github.com/Shougo/vimproc.vim) to be installed\n\n```vim\n\" Use the stdio version of OmniSharp-roslyn - this is the default\nlet g:OmniSharp_server_stdio = 1\n\n\" Use the HTTP version of OmniSharp-roslyn:\nlet g:OmniSharp_server_stdio = 0\n```\n\n#### Manual installation\nTo install the server manually, first decide which version (stdio or HTTP) you wish to use, as described above.\nDownload the latest release for your platform from the [OmniSharp-roslyn releases](https://github.com/OmniSharp/omnisharp-roslyn/releases) page.\nFor stdio on a 64-bit Windows system, the `omnisharp.win-x64.zip` package should be downloaded, whereas Mac users wanting to use the HTTP version should select `omnisharp.http-osx.tar.gz` etc.\n\nExtract the binaries and configure your vimrc with the path to the `run` script (Linux and Mac) or `OmniSharp.exe` file (Window), e.g.:\n\n```vim\nlet g:OmniSharp_server_path = 'C:\\OmniSharp\\omnisharp.win-x64\\OmniSharp.exe'\n```\n```vim\nlet g:OmniSharp_server_path = '/home/me/omnisharp/omnisharp.http-linux-x64/run'\n```\n\n#### Windows Subsystem for Linux (WSL)\nOmniSharp-roslyn can function perfectly well in WSL using linux binaries, if the environment is correctly configured (see [OmniSharp-roslyn](https://github.com/OmniSharp/omnisharp-roslyn) for requirements).\nHowever, if you have the .NET Framework installed in Windows, you may have better results using the Windows binaries.\nTo do this, let OmniSharp-vim know that you are operating in WSL mode (indicating that file paths need to be translated by OmniSharp-vim from Unix-Windows and back:\n\n```vim\nlet g:OmniSharp_translate_cygwin_wsl = 1\n```\n\nRunning `:OmniSharpInstall` from WSL when `g:OmniSharp_translate_cygwin_wsl = 1` results in the Windows version of OmniSharp-roslyn being installed to the standard Windows location `%LocalAppData%\\omnisharp-vim\\omnisharp-roslyn`.\n\n#### Windows: Cygwin\nThe automatic installation script for cygwin downloads the *Windows* OmniSharp-roslyn release. OmniSharp-vim detects that it is running in a cygwin environment and automatically enables Windows/cygwin file path translations by setting the default value of `g:OmniSharp_translate_cygwin_wsl` to `1`.\n\n**Note:** The Windows stdio server unfortunately does not work from cygwin, so when cygwin is detected (`has('win32unix')`) the HTTP server is used by default.\n\n#### Linux and MacOS\nThe default version of OmniSharp-roslyn requires `mono` on Linux and MacOS.\nThe roslyn server [releases](https://github.com/OmniSharp/omnisharp-roslyn/releases) come with an embedded `mono`, but this can be overridden to use the installed `mono` by setting `g:OmniSharp_server_use_mono` in your vimrc.\nSee [The Mono Project](https://www.mono-project.com/download/stable/) for installation details.\n\n```vim\n    let g:OmniSharp_server_use_mono = 1\n```\n\nAny time `g:OmniSharp_server_use_mono` is modified, the server needs to be re-installed with `:OmniSharpInstall`.\n\n#### Native net6.0\nFrom version 1.38.0 of OmniSharp-roslyn, a dotnet native net6.0 server version is available.\nTo use this version, set `g:OmniSharp_server_use_net6` in your vimrc before installing the server.\n\n```vim\n    let g:OmniSharp_server_use_net6 = 1\n```\n\n##### libuv\nFor the HTTP server, OmniSharp-Roslyn also requires [libuv](http://libuv.org/) on Linux and Mac. This is typically a simple install step, e.g. `brew install libuv` on Mac, `apt-get install libuv1-dev` on debian/Ubuntu, `pacman -S libuv` on arch linux, `dnf install libuv libuv-devel` on Fedora/CentOS, etc.\n\nPlease note that if your distro has a \"dev\" package (`libuv1-dev`, `libuv-devel` etc.) then you will probably need it.\n\n**Note:** This is **not** necessary for the default stdio version of OmniSharp-roslyn.\n\n### Install Python (HTTP only)\nInstall python 3 or 2: [python downloads](https://www.python.org/downloads/).\nMake sure that you pick correct version of Python to match your vim's architecture (32-bit python for 32-bit vim, 64-bit python for 64-bit vim).\n\nVerify that Python is working inside Vim with\n\n```vim\n:echo has('python3') || has('python')\n```\n\n**Note:** If you are using the default stdio version of OmniSharp-roslyn, you do not need python.\n\n### Asynchronous command execution\nOmniSharp-vim can start the server only if any of the following criteria is met:\n\n* Vim with job control API is used (8.0+)\n* neovim with job control API is used\n* [vim-dispatch](https://github.com/tpope/vim-dispatch) is installed\n* [vimproc.vim](https://github.com/Shougo/vimproc.vim) is installed\n\n### (optional) Install ALE\n\nIf [ALE](https://github.com/dense-analysis/ale) is installed, it will automatically be used to asynchronously check your code for errors.\n\nNo further configuration is necessary. However, be aware that ALE supports multiple C# linters, and will run all linters that are available on your system. To limit ALE to only use OmniSharp (recommended), add this to your .vimrc:\n\n```vim\nlet g:ale_linters = {\n\\ 'cs': ['OmniSharp']\n\\}\n```\n\n### (optional) Install syntastic\nThe vim plugin [syntastic](https://github.com/vim-syntastic/syntastic) can be used if you don't have ALE.\nConfigure it to work with OmniSharp with the following line in your vimrc.\n\n```vim\nlet g:syntastic_cs_checkers = ['code_checker']\n```\n\n### (optional) Install fzf, vim-clap, ctrlp.vim or unite.vim\nIf one of these plugins is detected, it will be used as the selector for Code Actions and Find Symbols features:\n\n- [fzf](https://github.com/junegunn/fzf)\n- [vim-clap](https://github.com/liuchengxu/vim-clap)\n- [CtrlP](https://github.com/ctrlpvim/ctrlp.vim)\n- [unite.vim](https://github.com/Shougo/unite.vim)\n\nIf you have installed more than one, or you prefer to use native vim functionality (command line, quickfix window etc.) rather than a selector plugin, you can choose an option with the `g:OmniSharp_selector_ui` variable.\n\n```vim\nlet g:OmniSharp_selector_ui = 'fzf'    \" Use fzf\nlet g:OmniSharp_selector_ui = 'clap'   \" Use vim-clap\nlet g:OmniSharp_selector_ui = 'ctrlp'  \" Use ctrlp.vim\nlet g:OmniSharp_selector_ui = 'unite'  \" Use unite.vim\nlet g:OmniSharp_selector_ui = ''       \" Use vim - command line, quickfix etc.\n```\n\nTo use fzf or vim-clap as a selector for `:OmniSharpFindUsages` results instead of the quickfix list, configure it explicitly:\n\n```vim\nlet g:OmniSharp_selector_findusages = 'fzf'\nlet g:OmniSharp_selector_findusages = 'clap'\n```\n\n## How to use\nBy default, the server is started automatically when you open a .cs file.\nIt tries to detect your solution file (.sln) and starts the OmniSharp-roslyn server, passing the path to the solution file.\n\nIn vim8 and neovim, the server is started invisibly by a vim job.\nIn older versions of vim, the server will be started in different ways depending on whether you are using vim-dispatch in tmux, or are using vim-proc, gvim or running vim in a terminal.\n\nThis behaviour can be disabled by setting `let g:OmniSharp_start_server = 0` in your vimrc.\nYou can then start the server manually from within vim with `:OmniSharpStartServer`.\n\nTo get completions, open a C# file from your solution within Vim and press `\u003cC-x\u003e\u003cC-o\u003e` (that is ctrl x followed by ctrl o) in Insert mode, or use a completion or autocompletion plugin.\n\nTo use the other features, you'll want to create key bindings for them. See the example vimrc below for more info.\n\nSee the [wiki](https://github.com/OmniSharp/omnisharp-vim/wiki) for more custom configuration examples.\n\n## Semantic Highlighting\nOmniSharp-roslyn can provide highlighting information about every symbol of the document.\n\nTo highlight a document, use command `:OmniSharpHighlight`.\nBy default, `.cs` files are automatically highlighted when entering a buffer and leaving insert mode.\nTo disable automatic highlighting, add this to your .vimrc:\n\n```vim\nlet g:OmniSharp_highlighting = 0\n```\n\nTo update highlighting after all text changes, even while in insert mode, use `g:OmniSharp_highlighting = 3` instead.\n\nThe `g:OmniSharp_highlight_groups` dictionary is used to configure highlighting:\n\n```vim\nlet g:OmniSharp_highlight_groups = {\n\\ 'Comment': 'NonText',\n\\ 'XmlDocCommentName': 'Identifier',\n\\ 'XmlDocCommentText': 'NonText'\n\\}\n```\n\nThe `:OmniSharpHighlightEcho` command can be used to find out what type of symbol is under the cursor.\nSee the [wiki](https://github.com/OmniSharp/omnisharp-vim/wiki/Highlighting-configuration) for the full list of symbol types, and configuration details.\n\n**Note:** Full semantic highlighting uses Vim's text properties and neovim's namespaces, and is only available when using the stdio server, not for HTTP server usage.\nCheck the [wiki](https://github.com/OmniSharp/omnisharp-vim/wiki/Highlighting-configuration#legacy-highlighting) for how to configure the simpler regex-highlighting when using the HTTP server, or older Vim/neovims.\n\n## Diagnostics\n\nDiagnostics are returned from OmniSharp-roslyn in various ways - via linting plugins such as ALE or Syntastic, and using the `:OmniSharpGlobalCodeCheck` command.\nThese diagnostics come from roslyn and roslyn analyzers, and as such they can be managed at the server level in 2 ways - using [rulesets](https://roslyn-analyzers.readthedocs.io/en/latest/config-analyzer.html), and using an [.editorconfig](https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019) file.\n\nHowever, not all diagnostics can only be managed by an `.editorconfig` file, and rulesets are not always a good solution as they involve modifying `.csproj` files, which might not suit your project policies - not all project users necessarily use the same analyzers.\n\nOmniSharp-vim provides a global override dictionary, where any diagnostic can be marked as having severity `E`rror, `W`arning or `I`nfo, and for ALE/Syntastic users, a `'subtype': 'Style'` may be specified.\nDiagnostics may be ignored completely by setting their `'type'` to `'None'`, in which case they will not be passed to linters, and will not be displayed in `:OmniSharpGlobalCodeCheck` results.\n\n```vim\n\" IDE0010: Populate switch - display in ALE as `Info`\n\" IDE0055: Fix formatting - display in ALE as `Warning` style error\n\" CS8019: Duplicate of IDE0005\n\" RemoveUnnecessaryImportsFixable: Generic warning that an unused using exists\nlet g:OmniSharp_diagnostic_overrides = {\n\\ 'IDE0010': {'type': 'I'},\n\\ 'IDE0055': {'type': 'W', 'subtype': 'Style'},\n\\ 'CS8019': {'type': 'None'},\n\\ 'RemoveUnnecessaryImportsFixable': {'type': 'None'}\n\\}\n```\n\nTo find the relevent diagnostic ID, it can be included in diagnostic descriptions (ALE/Syntastic messages and `:OmniSharpGlobalCodeCheck` results) by setting `g:OmniSharp_diagnostic_showid` to 1 - either in your .vimrc, or temporarily via the Vim command line:\n\n```vim\nlet g:OmniSharp_diagnostic_showid = 1\n```\n\n*Note:* Diagnostic overrides are only available in stdio mode, not HTTP mode.\n\nAnother method for filtering out diagnostic results is via path exclusion using `g:OmniSharp_diagnostic_exclude_paths`.\nThis variable is a list of regular expressions that will exclude paths that have a match to any of its entries:\n\n```vim\nlet g:OmniSharp_diagnostic_exclude_paths = [\n\\ 'obj\\\\',\n\\ '[Tt]emp\\\\',\n\\ '\\.nuget\\\\',\n\\ '\\\u003cAssemblyInfo\\.cs\\\u003e'\n\\]\n```\n\n## Popups\n\nWhen a recent enough Vim or neovim is used, OmniSharp-vim will use Vim's popup windows or neovim's floating windows in certain situations:\n\n* `:OmniSharpDocumentation`\n* `:OmniSharpSignatureHelp`\n* `:OmniSharpPreviewDefinition` (including metadata)\n* `:OmniSharpPreviewImplementation`\n* completion documentation (Vim only)\n\nOmniSharp-vim will use popups by default for Vims/neovims which support them.\nTo disable popups completely, set `g:OmniSharp_popup` to `0`:\n\n```vim\nlet g:OmniSharp_popup = 0\n```\n\n### Popup mappings\n\nApart from the insert-completion documentation window, all popups are closeable/scrollable using these mappings:\n\n| Action name               | Default mapping |\n|---------------------------|-----------------|\n| `close` (Gvim, neovim)    | `\u003cEsc\u003e`, `gq`   |\n| `close` (terminal Vim) \\* | `gq`            |\n| `lineDown`                | `\u003cC-e\u003e`         |\n| `lineUp`                  | `\u003cC-y\u003e`         |\n| `halfPageDown`            | `\u003cC-d\u003e`         |\n| `halfPageUp`              | `\u003cC-u\u003e`         |\n| `pageDown`                | `\u003cC-f\u003e`         |\n| `pageUp`                  | `\u003cC-b\u003e`         |\n\nAdditionally, the signature-help popup window provides the following mappings for navigating through method signatures and selected parameters:\n\n| Action name    | Default mapping |\n|----------------|-----------------|\n| `sigNext`      | `\u003cC-j\u003e`         |\n| `sigPrev`      | `\u003cC-k\u003e`         |\n| `sigParamNext` | `\u003cC-l\u003e`         |\n| `sigParamPrev` | `\u003cC-h\u003e`         |\n\nThese mappings are all configurable, and you can assign more than one mapping for an action.\nSo to use e.g. `CTRL-N` and `CTRL-P` to navigate between signatures instead of `CTRL-J` and `CTRL-K`, and to use either `CTRL-E`/`CTRL-Y` or `j`/`k` for single line scrolling, use `g:OmniSharp_popup_mappings` like this:\n\n```vim\nlet g:OmniSharp_popup_mappings = {\n\\ 'sigNext': '\u003cC-n\u003e',\n\\ 'sigPrev': '\u003cC-p\u003e',\n\\ 'lineDown': ['\u003cC-e\u003e', 'j'],\n\\ 'lineUp': ['\u003cC-y\u003e', 'k']\n\\}\n```\n\nPopups can be closed by using the `close` action mapping (`gq` or `\u003cEsc\u003e` by default), and also by simply navigating to another line.\n\n\\* **NOTE:** Vim in the terminal does _not_ have a default `\u003cEsc\u003e` `close` mapping, because `\u003cEsc\u003e` mappings interfere with escape codes in terminal Vim, meaning that key-codes such as arrow keys and `\u003cPageUp\u003e`/`\u003cPageDown\u003e` do not work as expected.\nTherefore, terminal Vim only has the `gq` mapping.\nGvim and neovim handle escape codes differently, so are not affected, and have both `gq` and `\u003cEsc\u003e` as default `close` mappings.\n\nIf you are happy with this limitation and prefer to use `\u003cEsc\u003e` anyway, configure it in `g:OmniSharp_popup_mappings`:\n\n```vim\nlet g:OmniSharp_popup_mappings.close = '\u003cEsc\u003e'\n```\n\n### Popup options\n\nVim and neovim have different options for styling popups, due to the different ways the editors have implemented this feature.\n\n#### Popup styling for Vim\n\nThe popup options from [:help popup_create-arguments](http://vimhelp.appspot.com/popup.txt.html#popup_create-arguments) can be used to style Vim popups.\nBy default, Vim uses the `Pmenu` highlight group, with no border or padding.\n\nAdd a rounded border and padding, and use the `Normal` highlight group for the window and the `Special` highlight group for the border like this:\n\n```vim\nlet g:OmniSharp_popup_options = {\n\\ 'highlight': 'Normal',\n\\ 'padding': [1],\n\\ 'border': [1],\n\\ 'borderchars': ['─', '│', '─', '│', '╭', '╮', '╯', '╰'],\n\\ 'borderhighlight': ['Special']\n\\}\n```\n\nSee the `:help` link above for options for border characters, border highlight groups etc.\n\n#### Popup styling for neovim\n\nThe `g:OmniSharp_popup_options` dictionary is a set of window options which can be set for the popup.\nThe dictionary may also contain an additional property, `'border'`, which is used as the `config.border` property passed to [:help nvim_open_win()](https://neovim.io/doc/user/api.html#nvim_open_win()).\n\nEnable pseudo-transparency, add a rounded border and change the highlight groups from the default `NormalFloat` with `FloatBorder` border to `Normal` and `Special` border like this:\n\n```vim\nlet g:OmniSharp_popup_options = {\n\\ 'winblend': 30,\n\\ 'winhl': 'Normal:Normal,FloatBorder:Special',\n\\ 'border': 'rounded'\n\\}\n```\n\n### Popup position\n\nThe \"documentation\" popups (including signature help) are always opened as close as possible to the cursor.\nHowever \"buffer\" popups (previewing definitions and implementations) may be configured to open in different ways, using the `g:OmniSharp_popup_position` value:\n\n- `atcursor`: (default) Next to the cursor. Height expands to display as much as possible, so this may result in a very high window.\n- `peek`: Opens below or above the cursor, with the full width of the current window. Looks like a split, without altering window layout.\n- `center`: Centered in the Vim window, filling the entire workspace.\n\n\n## Run unit tests\n\nIt is possible to run unit tests via OmniSharp-roslyn, with success/failures listed in the quickfix window for easy navigation:\n\n```vim\n\" Run the current unit test (the cursor should be on/inside the test method)\n:OmniSharpRunTest\n\n\" Debug the current unit test (This will not populate the quickfix list with the result)\n:OmniSharpDebugTest\n\n\" Run all unit tests in the current file\n:OmniSharpRunTestsInFile\n\n\" Run all unit tests in the current file, and file `tests/test1.cs`\n:OmniSharpRunTestsInFile % tests/test1.cs\n```\n\n**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.\n\n## Debugging\n\nUsing Vimspector, you can debug C# projects and tests.\nFor debugging tests see the [Run unit tests](#run-unit-tests) section.\n\n```vim\n\" Starts vimspector with an ad-hoc config that will debug the current project\n:OmniSharpDebugProject\n\n\" Create a .vimspector config that you can use to debug the current project and\n\" change as needed.\n:OmniSharpCreateDebugConfig\n```\n\n\n## Configuration\n\n### Example vimrc\n\nBelow is an example .vimrc for getting started with OmniSharp-vim.\nFor a more complete example with autocompletion, fzf integration, statusline indicators etc., have a look at the [Example config](https://github.com/OmniSharp/omnisharp-vim/wiki/Example-config) in the wiki.\n\n```vim\n\" Use the vim-plug plugin manager: https://github.com/junegunn/vim-plug\n\" Remember to run :PlugInstall when loading this vimrc for the first time, so\n\" vim-plug downloads the plugins listed.\nsilent! if plug#begin('~/.vim/plugged')\nPlug 'OmniSharp/omnisharp-vim'\nPlug 'dense-analysis/ale'\ncall plug#end()\nendif\n\n\" Don't autoselect first omnicomplete option, show options even if there is only\n\" one (so the preview documentation is accessible). Remove 'preview', 'popup'\n\" and 'popuphidden' if you don't want to see any documentation whatsoever.\n\" Note that neovim does not support `popuphidden` or `popup` yet:\n\" https://github.com/neovim/neovim/issues/10996\nif has('patch-8.1.1880')\n  set completeopt=longest,menuone,popuphidden\n  \" Highlight the completion documentation popup background/foreground the same as\n  \" the completion menu itself, for better readability with highlighted\n  \" documentation.\n  set completepopup=highlight:Pmenu,border:off\nelse\n  set completeopt=longest,menuone,preview\n  \" Set desired preview window height for viewing documentation.\n  set previewheight=5\nendif\n\n\" Tell ALE to use OmniSharp for linting C# files, and no other linters.\nlet g:ale_linters = { 'cs': ['OmniSharp'] }\n\naugroup omnisharp_commands\n  autocmd!\n\n  \" Show type information automatically when the cursor stops moving.\n  \" Note that the type is echoed to the Vim command line, and will overwrite\n  \" any other messages in this space including e.g. ALE linting messages.\n  autocmd CursorHold *.cs OmniSharpTypeLookup\n\n  \" The following commands are contextual, based on the cursor position.\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e gd \u003cPlug\u003e(omnisharp_go_to_definition)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosfu \u003cPlug\u003e(omnisharp_find_usages)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosfi \u003cPlug\u003e(omnisharp_find_implementations)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eospd \u003cPlug\u003e(omnisharp_preview_definition)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eospi \u003cPlug\u003e(omnisharp_preview_implementations)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eost \u003cPlug\u003e(omnisharp_type_lookup)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosd \u003cPlug\u003e(omnisharp_documentation)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosfs \u003cPlug\u003e(omnisharp_find_symbol)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosfx \u003cPlug\u003e(omnisharp_fix_usings)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cC-\\\u003e \u003cPlug\u003e(omnisharp_signature_help)\n  autocmd FileType cs imap \u003csilent\u003e \u003cbuffer\u003e \u003cC-\\\u003e \u003cPlug\u003e(omnisharp_signature_help)\n\n  \" Navigate up and down by method/property/field\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e [[ \u003cPlug\u003e(omnisharp_navigate_up)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e ]] \u003cPlug\u003e(omnisharp_navigate_down)\n  \" Find all code errors/warnings for the current solution and populate the quickfix window\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosgcc \u003cPlug\u003e(omnisharp_global_code_check)\n  \" Contextual code actions (uses fzf, vim-clap, CtrlP or unite.vim selector when available)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosca \u003cPlug\u003e(omnisharp_code_actions)\n  autocmd FileType cs xmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosca \u003cPlug\u003e(omnisharp_code_actions)\n  \" Repeat the last code action performed (does not use a selector)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eos. \u003cPlug\u003e(omnisharp_code_action_repeat)\n  autocmd FileType cs xmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eos. \u003cPlug\u003e(omnisharp_code_action_repeat)\n\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eos= \u003cPlug\u003e(omnisharp_code_format)\n\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosnm \u003cPlug\u003e(omnisharp_rename)\n\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosre \u003cPlug\u003e(omnisharp_restart_server)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eosst \u003cPlug\u003e(omnisharp_start_server)\n  autocmd FileType cs nmap \u003csilent\u003e \u003cbuffer\u003e \u003cLeader\u003eossp \u003cPlug\u003e(omnisharp_stop_server)\naugroup END\n\n\" Enable snippet completion, using the ultisnips plugin\n\" let g:OmniSharp_want_snippet=1\n```\n\n## Contributing\n\nPull requests welcome!\n\nWe have slack room as well. [Get yourself invited](https://omnisharp.herokuapp.com/) and make sure to join the `#vim` channel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOmniSharp%2Fomnisharp-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOmniSharp%2Fomnisharp-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOmniSharp%2Fomnisharp-vim/lists"}