This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+tools/ycmd
2016-06-12 21:49:07 -04:00
..
global_conf.py
packages.el Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
README.org Provide more details for ycmd installation and configuration 2016-06-12 21:49:07 -04:00

YCMD layer

Description

This layer adds emacs-ycmd support.

Install

Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add ycmd to the existing dotspacemacs-configuration-layers list in this file.

YCMD

  1. Install the ycm server. Installation instructions can be found here.
  2. Set the ycmd-server-command variable to reflect the path to the installation:

    (setq ycmd-server-command '("python" "/path/to/YouCompleteMe/third_party/ycmd/ycmd"))
  3. Instead of .clang_complete ycmd uses a .ycm_extra_conf.py file.
  4. Whitelist the file by adding the following to .spacemacs:

    ;; In this example we whitelist everything in the Develop folder
    (setq ycmd-extra-conf-whitelist '("~/Develop/*"))
  5. The completion is not going to work automatically until we actually force it:

    (setq ycmd-force-semantic-completion t)

Other Requirements

This package requires the auto-completion layer in order to get actual completion. The syntax-checking layer is required for flycheck support.

Configuration

By default this layer only activates ycmd for c++-mode.

If you want ycmd support in other modes you might just want to add it for specific languages like:

(add-hook 'c++-mode-hook 'ycmd-mode)

Key Bindings

Adds SPC m g g go to definition binding to c++-mode as well as SPC m g G for the more imprecise but faster version.