diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..064c7036 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,63 @@ +version: 2 +aliases: + common: &common + macos: + xcode: 9.0 + update-submodules: &update-submodules + run: + name: Update submodules + command: git submodule update --init --recursive + install-dependencies: &install-dependencies + run: + name: Install dependencies + command: .circleci/install_dependencies.sh + run-tests: &run-tests + run: + name: Run tests + command: ./run_tests.py --coverage + upload-coverage: &upload-coverage + run: + name: Upload coverage + command: bash <(curl -s https://codecov.io/bash) + # Increase the version key to clear the cache. + save-cache: &save-cache + save_cache: + key: v1-ycm-{{ .Environment.CIRCLE_JOB }} + paths: + - ~/Library/Caches/Homebrew + - ~/.cache/pip + - ~/.pyenv + restore-cache: &restore-cache + restore_cache: + key: v1-ycm-{{ .Environment.CIRCLE_JOB }} +jobs: + python2: + <<: *common + steps: + - checkout + - *update-submodules + - *restore-cache + - *install-dependencies + - *save-cache + - *run-tests + - *upload-coverage + environment: + YCMD_PYTHON_VERSION: 2.7 + python3: + <<: *common + steps: + - checkout + - *update-submodules + - *restore-cache + - *install-dependencies + - *save-cache + - *run-tests + - *upload-coverage + environment: + YCMD_PYTHON_VERSION: 3.3 +workflows: + version: 2 + build: + jobs: + - python2 + - python3 diff --git a/.circleci/install_dependencies.sh b/.circleci/install_dependencies.sh new file mode 100755 index 00000000..c25c2527 --- /dev/null +++ b/.circleci/install_dependencies.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +# Exit immediately if a command returns a non-zero status. +set -e + +################ +# Homebrew setup +################ + +# There's a homebrew bug which causes brew update to fail the first time. Run +# it twice to workaround. https://github.com/Homebrew/homebrew/issues/42553 +brew update || brew update + +# List of homebrew formulae to install in the order they appear. +# We require CMake and Ninja for our build and tests, and all the others are +# dependencies of pyenv. +REQUIREMENTS="cmake + ninja + readline + autoconf + pkg-config + openssl" + +# Install CMake, Ninja, and pyenv dependencies. +for pkg in $REQUIREMENTS; do + # Install package, or upgrade it if it is already installed. + brew install $pkg || brew outdated $pkg || brew upgrade $pkg +done + +############## +# Python setup +############## + +PYENV_ROOT="${HOME}/.pyenv" + +if [ ! -d "${PYENV_ROOT}/.git" ]; then + rm -rf ${PYENV_ROOT} + git clone https://github.com/yyuu/pyenv.git ${PYENV_ROOT} +fi +pushd ${PYENV_ROOT} +git fetch --tags +git checkout v1.2.1 +popd + +PATH="${PYENV_ROOT}/bin:${PATH}" + +eval "$(pyenv init -)" + +if [ "${YCMD_PYTHON_VERSION}" == "2.7" ]; then + # We need a recent enough version of Python 2.7 on macOS or an error occurs + # when installing the psutil dependency for our tests. + PYENV_VERSION="2.7.8" +else + PYENV_VERSION="3.3.6" +fi + +# In order to work with ycmd, python *must* be built as a shared library. The +# most compatible way to do this on macOS is with --enable-framework. This is +# set via the PYTHON_CONFIGURE_OPTS option. +export PYTHON_CONFIGURE_OPTS="--enable-framework" + +pyenv install --skip-existing ${PYENV_VERSION} +pyenv rehash +pyenv global ${PYENV_VERSION} + +# Initialize pyenv in other steps. See +# https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables +# and https://github.com/pyenv/pyenv/issues/264 +echo "export PATH=${PYENV_ROOT}/bin:\$PATH +if [ -z \"\${PYENV_LOADING}\" ]; then + export PYENV_LOADING=true + eval \"\$(pyenv init -)\" + unset PYENV_LOADING +fi" >> $BASH_ENV + +pip install -U pip wheel setuptools +pip install -r python/test_requirements.txt + +set +e diff --git a/.travis.yml b/.travis.yml index 680f0a14..290e323b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,4 @@ language: generic -os: - - linux - - osx sudo: false before_install: - git submodule update --init --recursive @@ -20,10 +17,6 @@ env: - YCM_PYTHON_VERSION=2.6 - YCM_PYTHON_VERSION=2.7 - YCM_PYTHON_VERSION=3.3 -matrix: - exclude: - - os: osx - env: YCM_PYTHON_VERSION=2.6 addons: apt: sources: diff --git a/README.md b/README.md index 8a63d3d2..46f8a3f8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ 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://travis-ci.org/Valloric/YouCompleteMe.svg?branch=master)](https://travis-ci.org/Valloric/YouCompleteMe) -[![Build status](https://ci.appveyor.com/api/projects/status/ag9uqwi8s6btwjd8/branch/master?svg=true)](https://ci.appveyor.com/project/Valloric/YouCompleteMe) -[![Coverage Status](https://codecov.io/gh/Valloric/YouCompleteMe/branch/master/graph/badge.svg)](https://codecov.io/gh/Valloric/YouCompleteMe) +[![Gitter room](https://img.shields.io/gitter/room/Valloric/YouCompleteMe.svg)](https://gitter.im/Valloric/YouCompleteMe) +[![Linux build status](https://img.shields.io/travis/Valloric/YouCompleteMe/master.svg?label=Linux)](https://travis-ci.org/Valloric/YouCompleteMe) +[![macOS build status](https://img.shields.io/circleci/project/github/Valloric/YouCompleteMe/master.svg?label=macOS)](https://circleci.com/gh/Valloric/YouCompleteMe) +[![Windows build status](https://img.shields.io/appveyor/ci/Valloric/YouCompleteMe/master.svg?label=Windows)](https://ci.appveyor.com/project/Valloric/YouCompleteMe) +[![Coverage status](https://img.shields.io/codecov/c/github/Valloric/YouCompleteMe/master.svg)](https://codecov.io/gh/Valloric/YouCompleteMe) Help, Advice, Support --------------------- diff --git a/ci/travis/travis_install.linux.sh b/ci/travis/travis_install.linux.sh deleted file mode 100644 index cd4222e5..00000000 --- a/ci/travis/travis_install.linux.sh +++ /dev/null @@ -1,15 +0,0 @@ -# Linux-specific installation - -# We can't use sudo, so we have to approximate the behaviour of setting the -# default system compiler. - -mkdir -p ${HOME}/bin - -ln -s /usr/bin/g++-4.8 ${HOME}/bin/c++ -ln -s /usr/bin/gcc-4.8 ${HOME}/bin/cc - -export PATH=${HOME}/bin:${PATH} - -# In order to work with ycmd, python *must* be built as a shared library. This -# is set via the PYTHON_CONFIGURE_OPTS option. -export PYTHON_CONFIGURE_OPTS="--enable-shared" diff --git a/ci/travis/travis_install.osx.sh b/ci/travis/travis_install.osx.sh deleted file mode 100644 index 3873f93e..00000000 --- a/ci/travis/travis_install.osx.sh +++ /dev/null @@ -1,24 +0,0 @@ -# OS X-specific installation - -# There's a homebrew bug which causes brew update to fail the first time. Run -# it twice to workaround. https://github.com/Homebrew/homebrew/issues/42553 -brew update || brew update - -# List of homebrew formulae to install in the order they appear. -# These are dependencies of pyenv. -REQUIREMENTS="ninja - readline - autoconf - pkg-config - openssl" - -# Install pyenv and dependencies -for pkg in $REQUIREMENTS; do - # Install package, or upgrade it if it is already installed - brew install $pkg || brew outdated $pkg || brew upgrade $pkg -done - -# In order to work with ycmd, python *must* be built as a shared library. The -# most compatible way to do this on OS X is with --enable-framework. This is -# set via the PYTHON_CONFIGURE_OPTS option -export PYTHON_CONFIGURE_OPTS="--enable-framework" diff --git a/ci/travis/travis_install.sh b/ci/travis/travis_install.sh index 111b114f..2014c5ea 100644 --- a/ci/travis/travis_install.sh +++ b/ci/travis/travis_install.sh @@ -7,18 +7,23 @@ set -ev # commands. unset -f cd popd pushd -#################### -# OS-specific setup -#################### +################ +# Compiler setup +################ -# Requirements of OS-specific install: -# - install any software which is not installed by Travis configuration -# - set up everything necessary so that pyenv can build python -source ci/travis/travis_install.${TRAVIS_OS_NAME}.sh +# We can't use sudo, so we have to approximate the behaviour of setting the +# default system compiler. -############# -# pyenv setup -############# +mkdir -p ${HOME}/bin + +ln -s /usr/bin/g++-4.8 ${HOME}/bin/c++ +ln -s /usr/bin/gcc-4.8 ${HOME}/bin/cc + +export PATH=${HOME}/bin:${PATH} + +############## +# Python setup +############## PYENV_ROOT="${HOME}/.pyenv" @@ -43,6 +48,10 @@ else PYENV_VERSION="3.3.6" fi +# In order to work with ycmd, python *must* be built as a shared library. This +# is set via the PYTHON_CONFIGURE_OPTS option. +export PYTHON_CONFIGURE_OPTS="--enable-shared" + pyenv install --skip-existing ${PYENV_VERSION} pyenv rehash pyenv global ${PYENV_VERSION} @@ -54,10 +63,6 @@ python_version=$(python -c 'import sys; print( "{0}.{1}".format( sys.version_inf echo "Checking python version (actual ${python_version} vs expected ${YCM_PYTHON_VERSION})" test ${python_version} == ${YCM_PYTHON_VERSION} -############ -# pip setup -############ - pip install -U pip wheel setuptools pip install -r python/test_requirements.txt diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 83519747..5e42e920 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -4,15 +4,17 @@ Contents ~ 1. Introduction |youcompleteme-introduction| - 2. Intro |youcompleteme-intro| - 3. Installation |youcompleteme-installation| + 2. Help, Advice, Support |youcompleteme-help-advice-support| + 3. Contents |youcompleteme-contents| + 4. Intro |youcompleteme-intro| + 5. Installation |youcompleteme-installation| 1. Mac OS X |youcompleteme-mac-os-x| 2. Ubuntu Linux x64 |youcompleteme-ubuntu-linux-x64| 3. Fedora Linux x64 |youcompleteme-fedora-linux-x64| 4. Windows |youcompleteme-windows| 5. FreeBSD/OpenBSD |youcompleteme-freebsd-openbsd| 6. Full Installation Guide |youcompleteme-full-installation-guide| - 4. Quick Feature Summary |youcompleteme-quick-feature-summary| + 6. Quick Feature Summary |youcompleteme-quick-feature-summary| 1. General (all languages) |youcompleteme-general| 2. C-family languages (C, C++, Objective C, Objective C++) |youcompleteme-c-family-languages| 3. C♯ |youcompleteme-c| @@ -21,13 +23,13 @@ Contents ~ 6. TypeScript |youcompleteme-typescript| 7. JavaScript |youcompleteme-javascript| 8. Rust |youcompleteme-rust| - 5. User Guide |youcompleteme-user-guide| + 7. User Guide |youcompleteme-user-guide| 1. General Usage |youcompleteme-general-usage| 2. Client-Server Architecture |youcompleteme-client-server-architecture| 3. Completion String Ranking |youcompleteme-completion-string-ranking| 4. General Semantic Completion |youcompleteme-general-semantic-completion| 5. C-family Semantic Completion |youcompleteme-c-family-semantic-completion| - 1. Option 1: Use a compilation database [44] |youcompleteme-option-1-use-compilation-database-44| + 1. Option 1: Use a compilation database [46] |youcompleteme-option-1-use-compilation-database-46| 2. Option 2: Provide the flags manually |youcompleteme-option-2-provide-flags-manually| 3. Errors during compilation |youcompleteme-errors-during-compilation| 6. JavaScript Semantic Completion |youcompleteme-javascript-semantic-completion| @@ -42,7 +44,7 @@ Contents ~ 10. Writing New Semantic Completers |youcompleteme-writing-new-semantic-completers| 11. Diagnostic Display |youcompleteme-diagnostic-display| 1. Diagnostic Highlighting Groups |youcompleteme-diagnostic-highlighting-groups| - 6. Commands |youcompleteme-commands| + 8. Commands |youcompleteme-commands| 1. The |:YcmRestartServer| command 2. The |:YcmForceCompileAndDiagnostics| command 3. The |:YcmDiags| command @@ -50,7 +52,7 @@ Contents ~ 5. The |:YcmDebugInfo| command 6. The |:YcmToggleLogs| command 7. The |:YcmCompleter| command - 7. YcmCompleter Subcommands |youcompleteme-ycmcompleter-subcommands| + 9. YcmCompleter Subcommands |youcompleteme-ycmcompleter-subcommands| 1. GoTo Commands |youcompleteme-goto-commands| 1. The |GoToInclude| subcommand 2. The |GoToDeclaration| subcommand @@ -74,13 +76,13 @@ Contents ~ 1. The |RestartServer| subcommand 2. The |ClearCompilationFlagCache| subcommand 3. The |ReloadSolution| subcommand - 8. Functions |youcompleteme-functions| + 10. Functions |youcompleteme-functions| 1. The |youcompleteme#GetErrorCount| function 2. The |youcompleteme#GetWarningCount| function - 9. Autocommands |youcompleteme-autocommands| + 11. Autocommands |youcompleteme-autocommands| 1. The |YcmLocationOpened| autocommand 2. The |YcmQuickFixOpened| autocommand - 10. Options |youcompleteme-options| + 12. Options |youcompleteme-options| 1. The |g:ycm_min_num_of_chars_for_completion| option 2. The |g:ycm_min_num_identifier_candidate_chars| option 3. The |g:ycm_max_num_candidates| option @@ -130,7 +132,7 @@ Contents ~ 47. The |g:ycm_goto_buffer_command| option 48. The |g:ycm_disable_for_files_larger_than_kb| option 49. The |g:ycm_python_binary_path| option - 11. FAQ |youcompleteme-faq| + 13. FAQ |youcompleteme-faq| 1. I used to be able to 'import vim' in '.ycm_extra_conf.py', but now can't |youcompleteme-i-used-to-be-able-to-import-vim-in-.ycm_extra_conf.py-but-now-cant| 2. I get 'ImportError' exceptions that mention 'PyInit_ycm_core' or 'initycm_core' |youcompleteme-i-get-importerror-exceptions-that-mention-pyinit_ycm_core-or-initycm_core| 3. I get a linker warning regarding 'libpython' on Mac when compiling YCM |youcompleteme-i-get-linker-warning-regarding-libpython-on-mac-when-compiling-ycm| @@ -169,17 +171,42 @@ module could not be loaded" |youcompleteme-on-windows-i-get-e887-sorry-this-comm 33. I can't complete python packages in a virtual environment. |youcompleteme-i-cant-complete-python-packages-in-virtual-environment.| 34. I want to defer loading of YouCompleteMe until after Vim finishes booting |i-want-to-defer-loading-of-youcompleteme-until-after-vim-finishes-booting| 35. YCM does not shut down when I quit Vim |youcompleteme-ycm-does-not-shut-down-when-i-quit-vim| - 12. Contributor Code of Conduct |youcompleteme-contributor-code-of-conduct| - 13. Contact |youcompleteme-contact| - 14. License |youcompleteme-license| - 15. References |youcompleteme-references| + 14. Contributor Code of Conduct |youcompleteme-contributor-code-of-conduct| + 15. Contact |youcompleteme-contact| + 16. License |youcompleteme-license| + 17. References |youcompleteme-references| =============================================================================== *youcompleteme-introduction* Introduction ~ -Image: Gitter Room [1] Image: Build Status [3] Image: Build status [5] Image: -Coverage Status [7] +Image: Gitter room [1] Image: Linux build status [3] Image: macOS build status +[5] Image: Windows build status [7] Image: Coverage status [9] + +=============================================================================== + *youcompleteme-help-advice-support* +Help, Advice, Support ~ + +Looking for help, advice or support? Having problems getting YCM to work? + +First carefully read the installation instructions for your OS. We recommend +you use the supplied 'install.py'. + +Next check the User Guide section on the semantic completer that you are using. +For C/C++/Objective C, you _must_ read this section. + +Finally, check the FAQ. + +If, after reading the installation and user guides, and checking the FAQ, +you're still having trouble, check the contacts 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 below. + +=============================================================================== + *youcompleteme-contents* +Contents ~ - Intro - Installation @@ -234,28 +261,28 @@ Vim. It has several completion engines: - an identifier-based engine that works with every programming language, -- a Clang [9]-based engine that provides native semantic code completion for +- a Clang [11]-based engine that provides native semantic code completion for C/C++/Objective-C/Objective-C++ (from now on referred to as "the C-family languages"), -- a Jedi [10]-based completion engine for Python 2 and 3 (using the JediHTTP - [11] wrapper), +- a Jedi [12]-based completion engine for Python 2 and 3 (using the JediHTTP + [13] wrapper), -- an OmniSharp [12]-based completion engine for C#, +- an OmniSharp [14]-based completion engine for C#, -- a combination of Gocode [13] and Godef [14] semantic engines for Go, +- a combination of Gocode [15] and Godef [16] semantic engines for Go, -- a TSServer [15]-based completion engine for TypeScript, +- a TSServer [17]-based completion engine for TypeScript, -- a Tern [16]-based completion engine for JavaScript, +- a Tern [18]-based completion engine for JavaScript, -- a racer [17]-based completion engine for Rust, +- a racer [19]-based completion engine for Rust, - and an omnifunc-based completer that uses data from Vim's omnicomplete system to provide semantic completions for many other languages (Ruby, PHP etc.). - Image: YouCompleteMe GIF demo (see reference [18]) + Image: YouCompleteMe GIF demo (see reference [20]) Here's an explanation of what happens in the short GIF demo above. @@ -274,7 +301,7 @@ 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 [19] match_ of a completion. This is a fancy +input needs to be a _subsequence [21] 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 @@ -293,7 +320,7 @@ 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 [20]) if you are editing a C-family file. As Clang compiles your file +Syntastic [22]) if you are editing a C-family file. As Clang 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. @@ -322,7 +349,7 @@ summary and the full list of completer subcommands to find out what's available for your favourite languages. You'll also find that YCM has filepath completers (try typing './' in a file) -and a completer that integrates with UltiSnips [21]. +and a completer that integrates with UltiSnips [23]. =============================================================================== *youcompleteme-installation* @@ -336,16 +363,16 @@ These instructions (using 'install.py') are the quickest way to install YouCompleteMe, however they may not work for everyone. If the following instructions don't work for you, check out the full installation guide. -Install the latest version of MacVim [22]. Yes, MacVim. And yes, the _latest_. +Install the latest version of MacVim [24]. Yes, MacVim. And yes, the _latest_. If you don't use the MacVim GUI, it is recommended to use the Vim binary that is inside the MacVim.app package ('MacVim.app/Contents/MacOS/Vim'). To ensure -it works correctly copy the 'mvim' script from the MacVim [22] download to your +it works correctly copy the 'mvim' script from the MacVim [24] download to your local binary folder (for example '/usr/local/bin/mvim') and then symlink it: > ln -s /usr/local/bin/mvim vim < -Install YouCompleteMe with Vundle [23]. +Install YouCompleteMe with Vundle [25]. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM @@ -356,8 +383,8 @@ installed along with the latest Command Line Tools (they are installed automatically when you run 'clang' for the first time, or manually by running 'xcode-select --install') -Install CMake. Preferably with Homebrew [24], but here's the stand-alone CMake -installer [25]. +Install CMake. Preferably with Homebrew [26], but here's the stand-alone CMake +installer [27]. _If_ you have installed a Homebrew Python and/or Homebrew MacVim, see the _FAQ_ for details. @@ -374,19 +401,19 @@ Compiling YCM **without** semantic support for C-family languages: < The following additional language support options are available: -- C# support: install Mono with Homebrew [24] or by downloading the Mono Mac - package [26] and add '--cs-completer' when calling './install.py'. +- C# support: install Mono with Homebrew [26] or by downloading the Mono Mac + package [28] and add '--cs-completer' when calling './install.py'. -- Go support: install Go [27] and add '--go-completer' when calling +- Go support: install Go [29] and add '--go-completer' when calling './install.py'. -- TypeScript support: install Node.js and npm [28] then install the +- TypeScript support: install Node.js and npm [30] then install the TypeScript SDK with 'npm install -g typescript'. -- JavaScript support: install Node.js and npm [28] and add '--js-completer' +- JavaScript support: install Node.js and npm [30] and add '--js-completer' when calling './install.py'. -- Rust support: install Rust [29] and add '--rust-completer' when calling +- Rust support: install Rust [31] and add '--rust-completer' when calling './install.py'. To simply compile with everything enabled, there's a '--all' flag. So, to @@ -417,9 +444,9 @@ instructions don't work for you, check out the full installation guide. Make sure you have Vim 7.4.1578 with Python 2 or Python 3 support. Ubuntu 16.04 and later have a Vim that's recent enough. You can see the version of Vim installed by running 'vim --version'. If the version is too old, you may need -to compile Vim from source [30] (don't worry, it's easy). +to compile Vim from source [32] (don't worry, it's easy). -Install YouCompleteMe with Vundle [23]. +Install YouCompleteMe with Vundle [25]. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM @@ -450,19 +477,19 @@ Compiling YCM **without** semantic support for C-family languages: < The following additional language support options are available: -- C# support: install Mono [31] and add '--cs-completer' when calling +- C# support: install Mono [33] and add '--cs-completer' when calling './install.py'. -- Go support: install Go [27] and add '--go-completer' when calling +- Go support: install Go [29] and add '--go-completer' when calling './install.py'. -- TypeScript support: install Node.js and npm [28] then install the +- TypeScript support: install Node.js and npm [30] then install the TypeScript SDK with 'npm install -g typescript'. -- JavaScript support: install Node.js and npm [28] and add '--js-completer' +- JavaScript support: install Node.js and npm [30] and add '--js-completer' when calling './install.py'. -- Rust support: install Rust [29] and add '--rust-completer' when calling +- Rust support: install Rust [31] and add '--rust-completer' when calling './install.py'. To simply compile with everything enabled, there's a '--all' flag. So, to @@ -493,9 +520,9 @@ instructions don't work for you, check out the full installation guide. Make sure you have Vim 7.4.1578 with Python 2 or Python 3 support. Fedora 21 and later have a Vim that's recent enough. You can see the version of Vim installed by running 'vim --version'. If the version is too old, you may need -to compile Vim from source [30] (don't worry, it's easy). +to compile Vim from source [32] (don't worry, it's easy). -Install YouCompleteMe with Vundle [23]. +Install YouCompleteMe with Vundle [25]. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM @@ -521,19 +548,19 @@ Compiling YCM **without** semantic support for C-family languages: < The following additional language support options are available: -- C# support: install Mono [32] and add '--cs-completer' when calling +- C# support: install Mono [34] and add '--cs-completer' when calling './install.py'. -- Go support: install Go [27] and add '--go-completer' when calling +- Go support: install Go [29] and add '--go-completer' when calling './install.py'. -- TypeScript support: install Node.js and npm [28] then install the +- TypeScript support: install Node.js and npm [30] then install the TypeScript SDK with 'npm install -g typescript'. -- JavaScript support: install Node.js and npm [28] and add '--js-completer' +- JavaScript support: install Node.js and npm [30] and add '--js-completer' when calling './install.py'. -- Rust support: install Rust [29] and add '--rust-completer' when calling +- Rust support: install Rust [31] and add '--rust-completer' when calling './install.py'. To simply compile with everything enabled, there's a '--all' flag. So, to @@ -570,18 +597,18 @@ Vim. Look at the features included: '+python/dyn' for Python 2 and '+python3/dyn' for Python 3. Take note of the Vim architecture, i.e. 32 or 64-bit. It will be important when choosing the Python installer. We recommend using a 64-bit client. Daily updated copies of 32-bit and 64-bit Vim with -Python 2 and Python 3 support [33] are available. +Python 2 and Python 3 support [35] are available. Add the line: > set encoding=utf-8 < -to your vimrc [34] if not already present. This option is required by YCM. Note +to your vimrc [36] if not already present. This option is required by YCM. Note that it does not prevent you from editing a file in another encoding than UTF-8. You can do that by specifying the '|++enc|' argument to the ':e' command. -Install YouCompleteMe with Vundle [23]. +Install YouCompleteMe with Vundle [25]. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM @@ -589,7 +616,7 @@ will notify you to recompile it. You should then rerun the install process. Download and install the following software: -- Python 2 or Python 3 [35]. Be sure to pick the version corresponding to +- Python 2 or Python 3 [37]. Be sure to pick the version corresponding to your Vim architecture. It is _Windows x86_ for a 32-bit Vim and _Windows x86-64_ for a 64-bit Vim. We recommend installing Python 3. Additionally, the version of Python you install must match up exactly with the version of @@ -601,12 +628,12 @@ Download and install the following software: Python 3.5. You'll need one or the other installed, matching the version number exactly. -- CMake [25]. Add CMake executable to the PATH environment variable. +- CMake [27]. Add CMake executable to the PATH environment variable. -- Visual Studio [36]. Download the community edition. During setup, select +- Visual Studio [38]. Download the community edition. During setup, select _Desktop development with C++_ in _Workloads_. -- 7-zip 16.04 or later [37]. Required to build YCM with semantic support for +- 7-zip 16.04 or later [39]. Required to build YCM with semantic support for C-family languages. Compiling YCM **with** semantic support for C-family languages: @@ -622,18 +649,18 @@ Compiling YCM **without** semantic support for C-family languages: The following additional language support options are available: - C# support: add '--cs-completer' when calling 'install.py'. Be sure that - the build utility 'msbuild' is in your PATH [38]. + the build utility 'msbuild' is in your PATH [40]. -- Go support: install Go [27] and add '--go-completer' when calling +- Go support: install Go [29] and add '--go-completer' when calling 'install.py'. -- TypeScript support: install Node.js and npm [28] then install the +- TypeScript support: install Node.js and npm [30] then install the TypeScript SDK with 'npm install -g typescript'. -- JavaScript support: install Node.js and npm [28] and add '--js-completer' +- JavaScript support: install Node.js and npm [30] and add '--js-completer' when calling 'install.py'. -- Rust support: install Rust [29] and add '--rust-completer' when calling +- Rust support: install Rust [31] and add '--rust-completer' when calling 'install.py'. To simply compile with everything enabled, there's a '--all' flag. So, to @@ -676,7 +703,7 @@ FreeBSD 10.x comes with clang compiler but not the libraries needed to install. pkg install llvm38 boost-all boost-python-libs clang38 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/llvm38/lib/ < -Install YouCompleteMe with Vundle [23]. +Install YouCompleteMe with Vundle [25]. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM @@ -699,16 +726,16 @@ The following additional language support options are available: - C# support: install Mono and add '--cs-completer' when calling './install.py'. -- Go support: install Go [27] and add '--go-completer' when calling +- Go support: install Go [29] and add '--go-completer' when calling './install.py'. -- TypeScript support: install Node.js and npm [28] then install the +- TypeScript support: install Node.js and npm [30] then install the TypeScript SDK with 'npm install -g typescript'. -- JavaScript support: install Node.js and npm [28] and add '--js-completer' +- JavaScript support: install Node.js and npm [30] and add '--js-completer' when calling './install.py'. -- Rust support: install Rust [29] and add '--rust-completer' when calling +- Rust support: install Rust [31] and add '--rust-completer' when calling './install.py'. To simply compile with everything enabled, there's a '--all' flag. So, to @@ -758,7 +785,7 @@ will notify you to recompile it. You should then rerun the install process. higher. If your version of Vim is not recent enough, you may need to compile Vim - from source [30] (don't worry, it's easy). + from source [32] (don't worry, it's easy). After you have made sure that you have Vim 7.4.1578+, type the following in Vim: ":echo has('python') || has('python3')". The output should be 1. @@ -768,9 +795,9 @@ will notify you to recompile it. You should then rerun the install process. critical because it must match the Python and the YCM libraries architectures. We recommend using a 64-bit Vim. -2. **Install YCM** with Vundle [23] (or Pathogen [39], but Vundle is a +2. **Install YCM** with Vundle [25] (or Pathogen [41], but Vundle is a better idea). With Vundle, this would mean adding a "Plugin - 'Valloric/YouCompleteMe'" line to your vimrc [34]. + 'Valloric/YouCompleteMe'" line to your vimrc [36]. If you don't install YCM with Vundle, make sure you have run 'git submodule update --init --recursive' after checking out the YCM @@ -787,7 +814,7 @@ will notify you to recompile it. You should then rerun the install process. You can use the system libclang _only if you are sure it is version 3.9 or higher_, otherwise don't. Even if it is, we recommend using the - official binaries from llvm.org [40] if at all possible. Make sure you + official binaries from llvm.org [42] if at all possible. Make sure you download the correct archive file for your OS. We **STRONGLY recommend AGAINST use** of the system libclang instead of @@ -800,17 +827,17 @@ will notify you to recompile it. You should then rerun the install process. You will need to have 'cmake' installed in order to generate the required makefiles. Linux users can install cmake with their package manager ('sudo apt-get install cmake' for Ubuntu) whereas other users can - download and install [25] cmake from its project site. Mac users can also - get it through Homebrew [24] with 'brew install cmake'. + download and install [27] cmake from its project site. Mac users can also + get it through Homebrew [26] with 'brew install cmake'. On a Unix OS, you need to make sure you have Python headers installed. On a Debian-like Linux distro, this would be 'sudo apt-get install python- dev python3-dev'. On Mac they should already be present. - On Windows, you need to download and install Python 2 or Python 3 [35]. + On Windows, you need to download and install Python 2 or Python 3 [37]. Pick the version corresponding to your Vim architecture. You will also need Microsoft Visual C++ (MSVC) to build YCM. You can obtain it by - installing Visual Studio [36]. MSVC 12 (Visual Studio 2013), 14 (2015), + installing Visual Studio [38]. MSVC 12 (Visual Studio 2013), 14 (2015), and 15 (2017) are officially supported. Here we'll assume you installed YCM with Vundle. That means that the top- @@ -853,7 +880,7 @@ will notify you to recompile it. You should then rerun the install process. extracted the archive file to folder '~/ycm_temp/llvm_root_dir' (with 'bin', 'lib', 'include' etc. folders right inside that folder). On Windows, you can extract the files from the LLVM+Clang installer using - 7-zip [37]. + 7-zip [39]. **NOTE:** This _only_ works with a _downloaded_ LLVM binary package, not a custom-built LLVM! See docs below for 'EXTERNAL_LIBCLANG_PATH' when @@ -894,28 +921,28 @@ will notify you to recompile it. You should then rerun the install process. 5. Set up support for additional languages, as desired: - - C# support: install Mono on non-Windows platforms [41]. Navigate to + - C# support: install Mono on non-Windows platforms [43]. Navigate to 'YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer' and run msbuild /property:Configuration=Release /property:Platform="Any CPU" /property:TargetFrameworkVersion=v4.5 On Windows, be sure that the build utility 'msbuild' is in your PATH - [38]. + [40]. - - Go support: install Go [27] and add it to your path. Navigate to + - Go support: install Go [29] and add it to your path. Navigate to 'YouCompleteMe/third_party/ycmd/third_party/gocode' and run 'go build'. - TypeScript support: as with the quick installation, simply 'npm install -g typescript' after successfully installing Node.js and npm - [28]. + [30]. - - JavaScript support: install Node.js and npm [28]. Then navigate to + - JavaScript support: install Node.js and npm [30]. Then navigate to 'YouCompleteMe/third_party/ycmd/third_party/tern_runtime' and run 'npm install --production' - - Rust support: install Rust [29]. Navigate to + - Rust support: install Rust [31]. Navigate to 'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo build --release'. @@ -972,7 +999,7 @@ Python ~ - Intelligent auto-completion - Go to declaration/definition, find references (|GoTo|, |GoToReferences|) - View documentation comments for identifiers (|GetDoc|) -- Restart JediHTTP [11] server using a different Python interpreter +- Restart JediHTTP [13] server using a different Python interpreter ------------------------------------------------------------------------------- *youcompleteme-go* @@ -1036,7 +1063,7 @@ General Usage ~ through the completions. Use Shift-TAB to cycle backwards. Note that if you're using console Vim (that is, not Gvim or MacVim) then it's likely that the Shift-TAB binding will not work because the console will not pass - it to Vim. You can remap the keys; see the _Options [42]_ section below. + it to Vim. You can remap the keys; see the _Options [44]_ section below. Knowing a little bit about how YCM works internally will prevent confusion. YCM has several completion engines: an identifier-based completer that collects all @@ -1063,7 +1090,7 @@ and presents the results to you. Client-Server Architecture ~ YCM has a client-server architecture; the Vim part of YCM is only a thin client -that talks to the ycmd HTTP+JSON server [43] that has the vast majority of YCM +that talks to the ycmd HTTP+JSON server [45] that has the vast majority of YCM logic and functionality. The server is started and stopped automatically as you start and stop Vim. @@ -1103,8 +1130,8 @@ analysis. There are 2 methods which can be used to provide compile flags to 'libclang': ------------------------------------------------------------------------------- - *youcompleteme-option-1-use-compilation-database-44* -Option 1: Use a compilation database [44] ~ + *youcompleteme-option-1-use-compilation-database-46* +Option 1: Use a compilation database [46] ~ The easiest way to get YCM to compile your code is to use a compilation database. A compilation database is usually generated by your build system @@ -1112,13 +1139,13 @@ database. A compilation database is usually generated by your build system in your project. For information on how to generate a compilation database, see the clang -documentation [44]. In short: +documentation [46]. In short: - If using CMake, add '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON' when configuring (or add 'set( CMAKE_EXPORT_COMPILE_COMMANDS ON )' to 'CMakeLists.txt') and copy or symlink the generated database to the root of your project. -- If using Ninja, check out the 'compdb' tool ('-t compdb') in its docs [45]. -- If using GNU make, check out Bear [46]. +- If using Ninja, check out the 'compdb' tool ('-t compdb') in its docs [47]. +- If using GNU make, check out Bear [48]. - For other build systems, check out '.ycm_extra_conf.py' below. If no '.ycm_extra_conf.py' is found, and no 'ycm_global_ycm_extra_conf' is @@ -1198,14 +1225,14 @@ libclang for the file 'filename'. That's it! This is actually enough for most projects, but for complex projects it is not uncommon to integrate directly with an existing build system using the full power of the Python language. -For a more elaborate example, see YCM's own '.ycm_extra_conf.py' [47]. You +For a more elaborate example, see YCM's own '.ycm_extra_conf.py' [49]. You should be able to use it _as a starting point_. **Don't** just copy/paste that file somewhere and expect things to magically work; **your project needs different flags**. Hint: just replace the strings in the 'flags' variable with compilation flags necessary for your project. That should be enough for 99% of projects. -You could also consider using YCM-Generator [48] to generate the +You could also consider using YCM-Generator [50] to generate the 'ycm_extra_conf.py' file. ------------------------------------------------------------------------------- @@ -1235,7 +1262,7 @@ Quick start ~ installation guide for details. 2. Create a '.tern-project' file in the root directory of your JavaScript - project, by following the instructions [49] in the Tern [16] + project, by following the instructions [51] in the Tern [18] documentation. 3. Edit a file from your project. @@ -1244,15 +1271,15 @@ Quick start ~ *youcompleteme-explanation* Explanation ~ -JavaScript completion is based on Tern [16]. This completion engine requires a -file named '.tern-project' [49] to exist in the current working directory or a +JavaScript completion is based on Tern [18]. This completion engine requires a +file named '.tern-project' [51] to exist in the current working directory or a directory which is an ancestor of the current working directory when the Tern server is started. YCM starts the Tern server the first time a JavaScript file is edited and uses its directory as the working directory, so the directory of that file at that time needs to be a descendent of the directory containing the '.tern-project' file (or that directory itself). -Alternatively, as described in the Tern documentation [50], a global '.tern- +Alternatively, as described in the Tern documentation [52], a global '.tern- config' file may be used. Multiple Tern servers are not supported. To switch to a different JavaScript @@ -1267,9 +1294,9 @@ Tips and tricks ~ This section contains some advice for configuring '.tern-project' and working with JavaScript files. The canonical reference for correctly configuring Tern -is the Tern documentation [50]. Any issues, improvements, advice, etc. should -be sought from the Tern [16] project. For example, see the list of tern plugins -[51] for the list of plugins which can be enabled in the 'plugins' section of +is the Tern documentation [52]. Any issues, improvements, advice, etc. should +be sought from the Tern [18] project. For example, see the list of tern plugins +[53] for the list of plugins which can be enabled in the 'plugins' section of the '.tern-project' file. ------------------------------------------------------------------------------- @@ -1321,7 +1348,7 @@ Completions and GoTo commands within the current crate and its dependencies should work out of the box with no additional configuration (provided that you built YCM with the '--rust-completer' flag; see the _Installation_ section for details). For semantic analysis inclusive of the standard library, you must -have a local copy of the Rust source code [52]. If using rustup [53], run the +have a local copy of the Rust source code [54]. If using rustup [55], run the following command to download the code: > rustup component add rust-src @@ -1338,10 +1365,10 @@ extract it somewhere, and set the following option so YCM can locate it: Python Semantic Completion ~ Completion and GoTo commands work out of the box with no additional -configuration. Those features are provided by the jedi [10] library which +configuration. Those features are provided by the jedi [12] library which supports a variety of Python versions (2.6, 2.7, 3.2+) as long as it runs in -the corresponding Python interpreter. By default YCM runs jedi [10] with the -same Python interpreter used by the ycmd server [43], so if you would like to +the corresponding Python interpreter. By default YCM runs jedi [12] with the +same Python interpreter used by the ycmd server [45], so if you would like to use a different interpreter, use the following option specifying the Python binary to use. For example, to provide Python 3 completion in your project, set: @@ -1355,9 +1382,9 @@ the PATH. So for example if you set: let g:ycm_python_binary_path = 'python' < YCM will use the first 'python' executable it finds in the PATH to run jedi -[10]. This means that if you are in a virtual environment and you start vim in +[12]. This means that if you are in a virtual environment and you start vim in that directory, the first 'python' that YCM will find will be the one in the -virtual environment, so jedi [10] will be able to provide completions for every +virtual environment, so jedi [12] will be able to provide completions for every package you have in the virtual environment. ------------------------------------------------------------------------------- @@ -1365,17 +1392,17 @@ package you have in the virtual environment. Semantic Completion for Other Languages ~ C-family, C#, Go, JavaScript, Python, Rust, and TypeScript languages are -supported natively by YouCompleteMe using the Clang [9], OmniSharp [12], Gocode -[13]/Godef [14], Tern [16], Jedi [10], racer [17], and TSServer [15] engines, -respectively. Check the installation section for instructions to enable these -features if desired. +supported natively by YouCompleteMe using the Clang [11], OmniSharp [14], +Gocode [15]/Godef [16], Tern [18], Jedi [12], racer [19], and TSServer [17] +engines, respectively. Check the installation section for instructions to +enable these features if desired. YCM will use your 'omnifunc' (see ':h omnifunc' in Vim) as a source for semantic completions if it does not have a native semantic completion engine for your file's filetype. Vim comes with okayish omnifuncs for various languages like Ruby, PHP, etc. It depends on the language. -You can get stellar omnifuncs for Java and Ruby with Eclim [54]. Just make sure +You can get stellar omnifuncs for Java and Ruby with Eclim [56]. Just make sure you have the _latest_ Eclim installed and configured (this means Eclim '>= 2.2.*' and Eclipse '>= 4.2.*'). @@ -1393,7 +1420,7 @@ Writing New Semantic Completers ~ You have two options here: writing an 'omnifunc' for Vim's omnicomplete system that YCM will then use through its omni-completer, or a custom completer for -YCM using the Completer API [55]. +YCM using the Completer API [57]. Here are the differences between the two approaches: @@ -1412,7 +1439,7 @@ Here are the differences between the two approaches: than VimScript. If you want to use the 'omnifunc' system, see the relevant Vim docs with ':h -complete-functions'. For the Completer API, see the API docs [55]. +complete-functions'. For the Completer API, see the API docs [57]. If you want to upstream your completer into YCM's source, you should use the Completer API. @@ -1464,7 +1491,7 @@ current file in Vim's 'locationlist', which can be opened with the ':lopen' and ':lclose' commands (make sure you have set 'let g:ycm_always_populate_location_list = 1' in your vimrc). A good way to toggle the display of the 'locationlist' with a single key mapping is provided by -another (very small) Vim plugin called ListToggle [56] (which also makes it +another (very small) Vim plugin called ListToggle [58] (which also makes it possible to change the height of the 'locationlist' window), also written by yours truly. @@ -1506,7 +1533,7 @@ Commands ~ ------------------------------------------------------------------------------- The *:YcmRestartServer* command -If the ycmd completion server [43] suddenly stops for some reason, you can +If the ycmd completion server [45] suddenly stops for some reason, you can restart it with this command. ------------------------------------------------------------------------------- @@ -1554,7 +1581,7 @@ semantic completion engine. The *:YcmToggleLogs* command This command presents the list of logfiles created by YCM, the ycmd server -[43], and the semantic engine server for the current filetype, if any. One of +[45], and the semantic engine server for the current filetype, if any. One of these logfiles can be opened in the editor (or closed if already open) by entering the corresponding number or by clicking on it with the mouse. Additionally, this command can take the logfile names as arguments. Use the @@ -1932,7 +1959,7 @@ For example: call youcompleteme#GetErrorCount() < Both this function and |youcompleteme#GetWarningCount| can be useful when -integrating YCM with other Vim plugins. For example, a lightline [57] user +integrating YCM with other Vim plugins. For example, a lightline [59] user could add a diagnostics section to their statusline which would display the number of errors and warnings. @@ -1996,11 +2023,11 @@ Options ~ All options have reasonable defaults so if the plug-in works after installation you don't need to change any options. These options can be configured in your -vimrc script [34] by including a line like this: +vimrc script [36] by including a line like this: > let g:ycm_min_num_of_chars_for_completion = 1 < -Note that after changing an option in your vimrc script [34] you have to +Note that after changing an option in your vimrc script [36] you have to restart Vim for the changes to take effect. ------------------------------------------------------------------------------- @@ -2275,13 +2302,13 @@ YCM will not render it. The following filter types are supported: -- "regex": Accepts a string regular expression [58]. This type matches when +- "regex": Accepts a string regular expression [60]. This type matches when the regex (treated as case-insensitive) is found in the diagnostic text. - "level": Accepts a string level, either "warning" or "error." This type matches when the diagnostic has the same level. -**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [58]. +**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [60]. Default: '{}' > @@ -2370,7 +2397,7 @@ from the 'tagfiles()' Vim function which examines the 'tags' Vim option. See YCM will re-index your tags files if it detects that they have been modified. -The only supported tag format is the Exuberant Ctags format [59]. The format +The only supported tag format is the Exuberant Ctags format [61]. The format from "plain" ctags is NOT supported. Ctags needs to be called with the '-- fields=+l' option (that's a lowercase 'L', not a one) because YCM needs the 'language:' field in the tags output. @@ -2407,7 +2434,7 @@ handy; it's a way of sending data from Vim to your 'FlagsForFile' function in your '.ycm_extra_conf.py' file. This option is supposed to be a list of VimScript expression strings that are -evaluated for every request to the ycmd server [43] and then passed to your +evaluated for every request to the ycmd server [45] and then passed to your 'FlagsForFile' function as a 'client_data' keyword argument. For instance, if you set this option to "['v:version']", your 'FlagsForFile' @@ -2436,7 +2463,7 @@ YCM will by default search for an appropriate Python interpreter on your system. You can use this option to override that behavior and force the use of a specific interpreter of your choosing. -**NOTE:** This interpreter is only used for the ycmd server [43]. The YCM +**NOTE:** This interpreter is only used for the ycmd server [45]. The YCM client running inside Vim always uses the Python interpreter that's embedded inside Vim. @@ -2447,7 +2474,7 @@ Default: "''" ------------------------------------------------------------------------------- The *g:ycm_keep_logfiles* option -When this option is set to '1', YCM and the ycmd completion server [43] will +When this option is set to '1', YCM and the ycmd completion server [45] will keep the logfiles around after shutting down (they are deleted on shutdown by default). @@ -2460,7 +2487,7 @@ Default: '0' ------------------------------------------------------------------------------- The *g:ycm_log_level* option -The logging level that YCM and the ycmd completion server [43] use. Valid +The logging level that YCM and the ycmd completion server [45] use. Valid values are the following, from most verbose to least verbose: - 'debug' - 'info' - 'warning' - 'error' - 'critical' @@ -2608,7 +2635,7 @@ The *g:ycm_key_list_stop_completion* option This option controls the key mappings used to close the completion menu. This is useful when the menu is blocking the view, when you need to insert the -'' character, or when you want to expand a snippet from UltiSnips [21] and +'' character, or when you want to expand a snippet from UltiSnips [23] and navigate through it. Default: "['']" @@ -2750,7 +2777,7 @@ It's also possible to use a regular expression as a trigger. You have to prefix your trigger with 're!' to signify it's a regex trigger. For instance, 're!\w+\.' would only trigger after the '\w+\.' regex matches. -**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [58]. +**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [60]. Default: '[see next line]' > @@ -2818,9 +2845,9 @@ Default: 1000 ------------------------------------------------------------------------------- The *g:ycm_python_binary_path* option -This option specifies the Python interpreter to use to run the jedi [10] +This option specifies the Python interpreter to use to run the jedi [12] completion library. Specify the Python interpreter to use to get completions. -By default the Python under which ycmd [43] runs is used (ycmd [43] runs on +By default the Python under which ycmd [45] runs is used (ycmd [45] runs on Python 2.6, 2.7 or 3.3+). Default: "''" @@ -2839,7 +2866,7 @@ FAQ ~ I used to be able to 'import vim' in '.ycm_extra_conf.py', but now can't ~ YCM was rewritten to use a client-server architecture where most of the logic -is in the ycmd server [43]. So the magic 'vim' module you could have previously +is in the ycmd server [45]. So the magic 'vim' module you could have previously imported in your '.ycm_extra_conf.py' files doesn't exist anymore. To be fair, importing the magic 'vim' module in extra conf files was never @@ -2910,7 +2937,7 @@ to the message log if it encounters problems. It's likely you misconfigured something and YCM is complaining about it. Also, you may want to run the |:YcmDebugInfo| command; it will make YCM spew -out various debugging information, including the YCM and ycmd [43] logfile +out various debugging information, including the YCM and ycmd [45] logfile paths and the compile flags for the current file if the file is a C-family language file and you have compiled in Clang support. Logfiles can be opened in the editor using the |:YcmToggleLogs| command. @@ -2968,7 +2995,7 @@ produced. See the full installation guide for help. I'm trying to use a Homebrew Vim with YCM and I'm getting segfaults ~ Something (I don't know what) is wrong with the way that Homebrew configures -and builds Vim. I recommend using MacVim [22]. Even if you don't like the +and builds Vim. I recommend using MacVim [24]. Even if you don't like the MacVim GUI, you can use the Vim binary that is inside the MacVim.app package (it's 'MacVim.app/Contents/MacOS/Vim') and get the Vim console experience. @@ -2978,7 +3005,7 @@ I have a Homebrew Python and/or MacVim; can't compile/SIGABRT when starting ~ You should probably run 'brew rm python; brew install python' to get the latest fixes that should make YCM work with such a configuration. Also rebuild Macvim -then. If you still get problems with this, see issue #18 [60] for suggestions. +then. If you still get problems with this, see issue #18 [62] for suggestions. ------------------------------------------------------------------------------- *youcompleteme-i-get-long_bit-definition-appears-wrong-for-platform-when-compiling* @@ -3077,15 +3104,15 @@ YCM does not read identifiers from my tags files ~ First, put 'let g:ycm_collect_identifiers_from_tags_files = 1' in your vimrc. -Make sure you are using Exuberant Ctags [61] to produce your tags files since -the only supported tag format is the Exuberant Ctags format [59]. The format +Make sure you are using Exuberant Ctags [63] to produce your tags files since +the only supported tag format is the Exuberant Ctags format [61]. The format from "plain" ctags is NOT supported. The output of 'ctags --version' should list "Exuberant Ctags". Ctags needs to be called with the '--fields=+l' (that's a lowercase 'L', not a one) option because YCM needs the 'language:' field in the tags output. -**NOTE:** Exuberant Ctags [61] by default sets language tag for '*.h' files as +**NOTE:** Exuberant Ctags [63] by default sets language tag for '*.h' files as 'C++'. If you have C (not C++) project, consider giving parameter '-- langmap=c:.c.h' to ctags to see tags from '*.h' files. @@ -3154,7 +3181,7 @@ asynchronicity. This feature is available since Vim 7.4.1578. *youcompleteme-nasty-bugs-happen-if-i-have-vim-autoclose-plugin-installed* Nasty bugs happen if I have the 'vim-autoclose' plugin installed ~ -Use the delimitMate [62] plugin instead. It does the same thing without +Use the delimitMate [64] plugin instead. It does the same thing without conflicting with YCM. ------------------------------------------------------------------------------- @@ -3162,7 +3189,7 @@ conflicting with YCM. Is there some sort of YCM mailing list? I have questions ~ If you have questions about the plugin or need help, please use the ycm-users -[63] mailing list, _don't_ create issues on the tracker. The tracker is for bug +[65] mailing list, _don't_ create issues on the tracker. The tracker is for bug reports and feature requests. ------------------------------------------------------------------------------- @@ -3216,7 +3243,7 @@ mismatch in assumptions causes performance problems since Syntastic code isn't optimized for this use case of constant diagnostic refreshing. Poor support for this use case also led to crash bugs in Vim caused by -Syntastic-Vim interactions (issue #593 [64]) and other problems, like random +Syntastic-Vim interactions (issue #593 [66]) and other problems, like random Vim flickering. Attempts were made to resolve these issues in Syntastic, but ultimately some of them failed (for various reasons). @@ -3252,7 +3279,7 @@ paths, prepend '-isystem' to each individual path and append them all to the list of flags you return from your 'FlagsForFile' function in your '.ycm_extra_conf.py' file. -See issue #303 [65] for details. +See issue #303 [67] for details. ------------------------------------------------------------------------------- *youcompleteme-when-i-open-javascript-file-i-get-an-annoying-warning-about-.tern-project-file* @@ -3271,7 +3298,7 @@ When I start vim I get a runtime error saying 'R6034 An application has made ~ an attempt to load the C runtime library incorrectly.' ~ CMake and other things seem to screw up the PATH with their own msvcrXX.dll -versions. [66] Add the following to the very top of your vimrc to remove these +versions. [68] Add the following to the very top of your vimrc to remove these entries from the path. > python << EOF @@ -3296,7 +3323,7 @@ entries from the path. *youcompleteme-i-hear-that-ycm-only-supports-python-2-is-that-true* I hear that YCM only supports Python 2, is that true? ~ -**No.** Both the Vim client and the ycmd server [43] run on Python 2 or 3. If +**No.** Both the Vim client and the ycmd server [45] run on Python 2 or 3. If you work on a Python 3 project, you may need to set |g:ycm_python_binary_path| to the Python interpreter you use for your project to get completions for that version of Python. @@ -3307,20 +3334,20 @@ On Windows I get "E887: Sorry, this command is disabled, the Python's site ~ module could not be loaded" ~ If you are running vim on Windows with Python 2.7.11, this is likely caused by -a bug [67]. Follow this workaround [68] or use a different version (Python +a bug [69]. Follow this workaround [70] or use a different version (Python 2.7.12 does not suffer from the bug). ------------------------------------------------------------------------------- *youcompleteme-i-cant-complete-python-packages-in-virtual-environment.* I can't complete python packages in a virtual environment. ~ -This means that the Python used to run JediHTTP [11] is not the Python of the +This means that the Python used to run JediHTTP [13] is not the Python of the virtual environment you're in. To resolve this you either set |g:ycm_python_binary_path| to the absolute path of the Python binary in your virtual environment or since virtual environment will put that Python executable first in your PATH when the virtual environment is active then if you set |g:ycm_python_binary_path| to just "'python'" it will be found as the -first Python and used to run JediHTTP [11]. +first Python and used to run JediHTTP [13]. ------------------------------------------------------------------------------- *i-want-to-defer-loading-of-youcompleteme-until-after-vim-finishes-booting* @@ -3339,40 +3366,44 @@ In recent versions of Vim, you can install YCM in a folder under *youcompleteme-ycm-does-not-shut-down-when-i-quit-vim* YCM does not shut down when I quit Vim ~ -YCM relies on the 'VimLeave' event to shut down the ycmd server [43]. Some +YCM relies on the 'VimLeave' event to shut down the ycmd server [45]. Some plugins prevent this event from triggering by exiting Vim through an autocommand without using the 'nested' keyword (see ':h autocmd-nested'). One -of these plugins is vim-nerdtree-tabs [69]. You should identify which plugin is +of these plugins is vim-nerdtree-tabs [71]. You should identify which plugin is responsible for the issue and report it to the plugin author. Note that when -this happens, ycmd [43] will automatically shut itself down after 30 minutes. +this happens, ycmd [45] will automatically shut itself down after 30 minutes. =============================================================================== *youcompleteme-contributor-code-of-conduct* Contributor Code of Conduct ~ Please note that this project is released with a Contributor Code of Conduct -[70]. By participating in this project you agree to abide by its terms. +[72]. By participating in this project you agree to abide by its terms. =============================================================================== *youcompleteme-contact* Contact ~ If you have questions about the plugin or need help, please join the Gitter -room [1] or use the ycm-users [63] mailing list. +room [1] or use the ycm-users [65] mailing list. If you have bug reports or feature suggestions, please use the issue tracker -[71]. +[73]. Before you do, please carefully read CONTRIBUTING.md [74] as this asks +for important diagnostics which the team will use to help get you going. The latest version of the plugin is available at http://valloric.github.io/YouCompleteMe/. The author's homepage is http://val.markovic.io. +Please do **NOT** go to #vim on freenode for support. Please contact the +YouCompleteMe maintainers directly using the contact details below. + =============================================================================== *youcompleteme-license* License ~ -This software is licensed under the GPL v3 license [72]. © 2015-2017 +This software is licensed under the GPL v3 license [75]. © 2015-2017 YouCompleteMe contributors =============================================================================== @@ -3382,74 +3413,77 @@ References ~ [1] https://gitter.im/Valloric/YouCompleteMe [2] https://img.shields.io/gitter/room/Valloric/YouCompleteMe.svg [3] https://travis-ci.org/Valloric/YouCompleteMe -[4] https://travis-ci.org/Valloric/YouCompleteMe.svg?branch=master -[5] https://ci.appveyor.com/project/Valloric/YouCompleteMe -[6] https://ci.appveyor.com/api/projects/status/ag9uqwi8s6btwjd8/branch/master?svg=true -[7] https://codecov.io/gh/Valloric/YouCompleteMe -[8] https://codecov.io/gh/Valloric/YouCompleteMe/branch/master/graph/badge.svg -[9] http://clang.llvm.org/ -[10] https://github.com/davidhalter/jedi -[11] https://github.com/vheon/JediHTTP -[12] https://github.com/OmniSharp/omnisharp-server -[13] https://github.com/nsf/gocode -[14] https://github.com/Manishearth/godef -[15] https://github.com/Microsoft/TypeScript/tree/master/src/server -[16] http://ternjs.net -[17] https://github.com/phildawes/racer -[18] http://i.imgur.com/0OP4ood.gif -[19] https://en.wikipedia.org/wiki/Subsequence -[20] https://github.com/scrooloose/syntastic -[21] https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt -[22] https://github.com/macvim-dev/macvim/releases -[23] https://github.com/VundleVim/Vundle.vim#about -[24] http://brew.sh -[25] https://cmake.org/download/ -[26] http://www.mono-project.com/docs/getting-started/install/mac/ -[27] https://golang.org/doc/install -[28] https://docs.npmjs.com/getting-started/installing-node -[29] https://www.rust-lang.org/ -[30] https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source -[31] http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives -[32] http://www.mono-project.com/docs/getting-started/install/linux/#centos-7-fedora-19-and-later-and-derivatives -[33] https://bintray.com/micbou/generic/vim -[34] http://vimhelp.appspot.com/starting.txt.html#vimrc -[35] https://www.python.org/downloads/windows/ -[36] https://www.visualstudio.com/downloads/ -[37] http://www.7-zip.org/download.html -[38] http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-windows-sdk-7-1 -[39] https://github.com/tpope/vim-pathogen#pathogenvim -[40] http://llvm.org/releases/download.html -[41] http://www.mono-project.com/docs/getting-started/install/ -[42] https://github.com/Valloric/YouCompleteMe#options -[43] https://github.com/Valloric/ycmd -[44] http://clang.llvm.org/docs/JSONCompilationDatabase.html -[45] https://ninja-build.org/manual.html -[46] https://github.com/rizsotto/Bear -[47] https://raw.githubusercontent.com/Valloric/ycmd/3ad0300e94edc13799e8bf7b831de8b57153c5aa/cpp/ycm/.ycm_extra_conf.py -[48] https://github.com/rdnetto/YCM-Generator -[49] http://ternjs.net/doc/manual.html#configuration -[50] http://ternjs.net/doc/manual.html#server -[51] http://ternjs.net/doc/manual.html#plugins -[52] https://www.rust-lang.org/downloads.html -[53] https://www.rustup.rs/ -[54] http://eclim.org/ -[55] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py -[56] https://github.com/Valloric/ListToggle -[57] https://github.com/itchyny/lightline.vim -[58] https://docs.python.org/2/library/re.html#regular-expression-syntax -[59] http://ctags.sourceforge.net/FORMAT -[60] https://github.com/Valloric/YouCompleteMe/issues/18 -[61] http://ctags.sourceforge.net/ -[62] https://github.com/Raimondi/delimitMate -[63] https://groups.google.com/forum/?hl=en#!forum/ycm-users -[64] https://github.com/Valloric/YouCompleteMe/issues/593 -[65] https://github.com/Valloric/YouCompleteMe/issues/303 -[66] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022 -[67] https://github.com/vim/vim/issues/717 -[68] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88 -[69] https://github.com/jistr/vim-nerdtree-tabs -[70] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md -[71] https://github.com/Valloric/YouCompleteMe/issues?state=open -[72] http://www.gnu.org/copyleft/gpl.html +[4] https://img.shields.io/travis/Valloric/YouCompleteMe/master.svg?label=Linux +[5] https://circleci.com/gh/Valloric/YouCompleteMe +[6] https://img.shields.io/circleci/project/github/Valloric/YouCompleteMe/master.svg?label=macOS +[7] https://ci.appveyor.com/project/Valloric/YouCompleteMe +[8] https://img.shields.io/appveyor/ci/Valloric/YouCompleteMe/master.svg?label=Windows +[9] https://codecov.io/gh/Valloric/YouCompleteMe +[10] https://img.shields.io/codecov/c/github/Valloric/YouCompleteMe/master.svg +[11] http://clang.llvm.org/ +[12] https://github.com/davidhalter/jedi +[13] https://github.com/vheon/JediHTTP +[14] https://github.com/OmniSharp/omnisharp-server +[15] https://github.com/nsf/gocode +[16] https://github.com/Manishearth/godef +[17] https://github.com/Microsoft/TypeScript/tree/master/src/server +[18] http://ternjs.net +[19] https://github.com/phildawes/racer +[20] http://i.imgur.com/0OP4ood.gif +[21] https://en.wikipedia.org/wiki/Subsequence +[22] https://github.com/scrooloose/syntastic +[23] https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt +[24] https://github.com/macvim-dev/macvim/releases +[25] https://github.com/VundleVim/Vundle.vim#about +[26] http://brew.sh +[27] https://cmake.org/download/ +[28] http://www.mono-project.com/docs/getting-started/install/mac/ +[29] https://golang.org/doc/install +[30] https://docs.npmjs.com/getting-started/installing-node +[31] https://www.rust-lang.org/ +[32] https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source +[33] http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives +[34] http://www.mono-project.com/docs/getting-started/install/linux/#centos-7-fedora-19-and-later-and-derivatives +[35] https://bintray.com/micbou/generic/vim +[36] http://vimhelp.appspot.com/starting.txt.html#vimrc +[37] https://www.python.org/downloads/windows/ +[38] https://www.visualstudio.com/downloads/ +[39] http://www.7-zip.org/download.html +[40] http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-windows-sdk-7-1 +[41] https://github.com/tpope/vim-pathogen#pathogenvim +[42] http://llvm.org/releases/download.html +[43] http://www.mono-project.com/docs/getting-started/install/ +[44] https://github.com/Valloric/YouCompleteMe#options +[45] https://github.com/Valloric/ycmd +[46] http://clang.llvm.org/docs/JSONCompilationDatabase.html +[47] https://ninja-build.org/manual.html +[48] https://github.com/rizsotto/Bear +[49] https://raw.githubusercontent.com/Valloric/ycmd/3ad0300e94edc13799e8bf7b831de8b57153c5aa/cpp/ycm/.ycm_extra_conf.py +[50] https://github.com/rdnetto/YCM-Generator +[51] http://ternjs.net/doc/manual.html#configuration +[52] http://ternjs.net/doc/manual.html#server +[53] http://ternjs.net/doc/manual.html#plugins +[54] https://www.rust-lang.org/downloads.html +[55] https://www.rustup.rs/ +[56] http://eclim.org/ +[57] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py +[58] https://github.com/Valloric/ListToggle +[59] https://github.com/itchyny/lightline.vim +[60] https://docs.python.org/2/library/re.html#regular-expression-syntax +[61] http://ctags.sourceforge.net/FORMAT +[62] https://github.com/Valloric/YouCompleteMe/issues/18 +[63] http://ctags.sourceforge.net/ +[64] https://github.com/Raimondi/delimitMate +[65] https://groups.google.com/forum/?hl=en#!forum/ycm-users +[66] https://github.com/Valloric/YouCompleteMe/issues/593 +[67] https://github.com/Valloric/YouCompleteMe/issues/303 +[68] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022 +[69] https://github.com/vim/vim/issues/717 +[70] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88 +[71] https://github.com/jistr/vim-nerdtree-tabs +[72] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md +[73] https://github.com/Valloric/YouCompleteMe/issues?state=open +[74] https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md +[75] http://www.gnu.org/copyleft/gpl.html vim: ft=help