YouCompleteMe: a code-completion engine for Vim
===============================================
[![Gitter room](https://img.shields.io/gitter/room/Valloric/YouCompleteMe.svg)](https://gitter.im/Valloric/YouCompleteMe)
[![Build status](https://dev.azure.com/YouCompleteMe/YCM/_apis/build/status/ycm-core.YouCompleteMe?branchName=master)](https://dev.azure.com/YouCompleteMe/YCM/_build?definitionId=3&branchName=master)
[![Coverage status](https://img.shields.io/codecov/c/github/ycm-core/YouCompleteMe/master.svg)](https://codecov.io/gh/ycm-core/YouCompleteMe)
Help, Advice, Support
---------------------
Looking for help, advice or support? Having problems getting YCM to work?
First carefully read the [installation instructions](#installation) for your OS.
We recommend you use the supplied `install.py` - the "full" installation guide
is for rare, advanced use cases and most users should use `install.py`.
If the server isn't starting and you're getting a "YouCompleteMe unavailable"
error, check the [Troubleshooting][wiki-troubleshooting] guide.
Next check the [User Guide](#user-guide) section on the semantic completer that
you are using. For C/C++/Objective-C/Objective-C++/CUDA, you _must_ read [this
section](#c-family-semantic-completion).
Finally, check the [FAQ][wiki-faq].
If, after reading the installation and user guides, and checking the FAQ, you're
still having trouble, check the [contacts](#contact) section below for how to
get in touch.
Please do **NOT** go to #vim on Freenode for support. Please contact the
YouCompleteMe maintainers directly using the [contact details](#contact) below.
# Vundle
Please note that the below instructions suggest using Vundle. Currently there
are problems with Vundle, so here are some [alternative instructions](https://github.com/ycm-core/YouCompleteMe/issues/4134#issuecomment-1446235584) using Vim packages.
Contents
--------
- [Intro](#intro)
- [Installation](#installation)
- [Requirements](#requirements)
- [macOS](#macos)
- [Linux 64-bit](#linux-64-bit)
- [Windows](#windows)
- [FreeBSD/OpenBSD](#freebsdopenbsd)
- [Full Installation Guide](#full-installation-guide)
- [Quick Feature Summary](#quick-feature-summary)
- [User Guide](#user-guide)
- [General Usage](#general-usage)
- [Client-Server Architecture](#client-server-architecture)
- [Completion String Ranking](#completion-string-ranking)
- [General Semantic Completion](#general-semantic-completion)
- [Signature Help](#signature-help)
- [Semantic Highlighting](#semantic-highlighting)
- [Inlay Hints](#inlay-hints)
- [C-family Semantic Completion](#c-family-semantic-completion)
- [Java Semantic Completion](#java-semantic-completion)
- [C# Semantic Completion](#c-semantic-completion)
- [Python Semantic Completion](#python-semantic-completion)
- [Rust Semantic Completion](#rust-semantic-completion)
- [Go Semantic Completion](#go-semantic-completion)
- [JavaScript and TypeScript Semantic Completion](#javascript-and-typescript-semantic-completion)
- [Semantic Completion for Other Languages](#semantic-completion-for-other-languages)
- [LSP Configuration](#lsp-configuration)
- [Writing New Semantic Completers](#writing-new-semantic-completers)
- [Diagnostic Display](#diagnostic-display)
- [Diagnostic Highlighting Groups](#diagnostic-highlighting-groups)
- [Symbol Search](#symbol-search)
- [Commands](#commands)
- [YcmCompleter subcommands](#ycmcompleter-subcommands)
- [GoTo Commands](#goto-commands)
- [Semantic Information Commands](#semantic-information-commands)
- [Refactoring Commands](#refactoring-commands)
- [Miscellaneous Commands](#miscellaneous-commands)
- [Functions](#functions)
- [Autocommands](#autocommands)
- [Options](#options)
- [FAQ](#faq)
- [Contributor Code of Conduct](#contributor-code-of-conduct)
- [Contact](#contact)
- [License](#license)
- [Sponsorship](#sponsorship)
Intro
-----
YouCompleteMe is a fast, as-you-type, fuzzy-search code completion,
comprehension and refactoring engine for [Vim][].
It has several completion engines built in and supports any protocol-compliant
Language Server, so can work with practically any language. YouCompleteMe
contains:
- an identifier-based engine that works with every programming language,
- a powerful [clangd][]-based engine that provides native semantic code
completion for C/C++/Objective-C/Objective-C++/CUDA (from now on referred to
as "the C-family languages"),
- a [Jedi][]-based completion engine for Python 2 and 3,
- an [OmniSharp-Roslyn][]-based completion engine for C#,
- a [Gopls][]-based completion engine for Go,
- a [TSServer][]-based completion engine for JavaScript and TypeScript,
- a [rust-analyzer][]-based completion engine for Rust,
- a [jdt.ls][]-based completion engine for Java.
- a [generic Language Server Protocol implementation for any language](#plugging-an-arbitrary-lsp-server)
- and an omnifunc-based completer that uses data from Vim's omnicomplete system
to provide semantic completions for many other languages (Ruby, PHP etc.).
![YouCompleteMe GIF completion demo](https://i.imgur.com/0OP4ood.gif)
Here's an explanation of what happens in the last GIF demo above.
First, realize that **no keyboard shortcuts had to be pressed** to get the list
of completion candidates at any point in the demo. The user just types and the
suggestions pop up by themselves. If the user doesn't find the completion
suggestions relevant and/or just wants to type, they can do so; the completion
engine will not interfere.
When the user sees a useful completion string being offered, they press the TAB
key to accept it. This inserts the completion string. Repeated presses of the
TAB key cycle through the offered completions.
If the offered completions are not relevant enough, the user can continue typing
to further filter out unwanted completions.
A critical thing to notice is that the completion **filtering is NOT based on
the input being a string prefix of the completion** (but that works too). The
input needs to be a _[subsequence][] match_ of a completion. This is a fancy way
of saying that any input characters need to be present in a completion string in
the order in which they appear in the input. So `abc` is a subsequence of
`xaybgc`, but not of `xbyxaxxc`. After the filter, a complicated sorting system
ranks the completion strings so that the most relevant ones rise to the top of
the menu (so you usually need to press TAB just once).
**All of the above works with any programming language** because of the
identifier-based completion engine. It collects all of the identifiers in the
current file and other files you visit (and your tags files) and searches them
when you type (identifiers are put into per-filetype groups).
The demo also shows the semantic engine in use. When the user presses `.`, `->`
or `::` while typing in insert mode (for C++; different triggers are used for
other languages), the semantic engine is triggered (it can also be triggered
with a keyboard shortcut; see the rest of the docs).
The last thing that you can see in the demo is YCM's diagnostic display features
(the little red X that shows up in the left gutter; inspired by [Syntastic][])
if you are editing a C-family file. As the completer engine compiles your file
and detects warnings or errors, they will be presented in various ways. You
don't need to save your file or press any keyboard shortcut to trigger this, it
"just happens" in the background.
**And that's not all...**
YCM might be the only Vim completion engine with the correct Unicode support.
Though we do assume UTF-8 everywhere.
![YouCompleteMe GIF unicode demo](https://user-images.githubusercontent.com/10026824/34471853-af9cf32a-ef53-11e7-8229-de534058ddc4.gif)
YCM also provides [semantic IDE-like features](#quick-feature-summary) in a
number of languages, including:
- displaying signature help (argument