Git Product home page Git Product logo

ycmd's Introduction

ycmd: a code-completion & comprehension server

Build status Coverage status

ycmd is a server that provides APIs for code-completion and other code-comprehension use-cases like semantic GoTo commands (and others). For certain filetypes, ycmd can also provide diagnostic errors and warnings.

ycmd was originally part of YouCompleteMe's codebase, but has been split out into a separate project so that it can be used in editors other than Vim.

Check the API documentation if you want to implement a client. A good way to learn how to interact with ycmd is by reading through (and running) the example_client.py file. See the README for the examples folder for details on how to run the example client.

Known ycmd clients:

Feel free to send a pull request adding a link to your client here if you've built one.

Building

If you're looking to develop ycmd, see the instructions for running the tests.

This is all for Ubuntu Linux. Details on getting ycmd running on other OS's can be found in YCM's instructions (ignore the Vim-specific parts). Note that ycmd runs on Python 3.8.0+.

First, install the minimal dependencies:

sudo apt install build-essential cmake python3-dev

Next, install the language specific dependencies you need:

  • sudo apt install golang-go for Go.
  • sudo apt install npm for JavaScript and TypeScript.
  • sudo apt install mono-devel for C#.
  • sudo apt install openjdk-8-jre for Java.

When you first clone the repository you'll need to update the submodules:

git submodule update --init --recursive

Then run python3 build.py --all or any of the specific completers listed by python3 build.py --help. This should get you going.

For more detailed instructions on building ycmd, see YCM's instructions (ignore the Vim-specific parts).

Supported compilers

  • GCC 8 and later
  • Clang 7 and later
  • Microsoft Visual Studio 2017 v 15.7 and later

API notes

  • All strings going into and out of the server are UTF-8 encoded.
  • All lines end with \n.
  • All line and column numbers are 1-based, not 0-based. They are also byte offsets, not Unicode codepoint offsets.
  • All file paths are full, absolute paths.
  • All requests to the server must include an HMAC in the x-ycm-hmac HTTP header. The HMAC is computed from the shared secret passed to the server on startup and the request/response body. The digest algorithm is SHA-256. The server will also include the HMAC in its responses; you must verify it before using the response. See example_client.py to see how it's done.
  • API is documented in swagger and published on the website.

How ycmd works

There are several completion engines in ycmd. The most basic one is an identifier-based completer that collects all of the identifiers in the file provided in the completion request, other files of the same filetype that were provided previously and any tags files produced by ctags. This engine is non-semantic.

There are also several semantic engines in YCM. There's clangd-based completer that both provide semantic completion for C-family languages. There's also a Jedi-based completer for semantic completion for Python, an OmniSharp-based completer for C#, a gopls-based completer for Go (using gopls for jumping to definitions), a TSServer-based completer for JavaScript and TypeScript, a jdt.ls-based server for Java, and a RLS-based completer for Rust. More will be added with time.

There are also other completion engines, like the filepath completer (part of the identifier completer).

The server will automatically detect which completion engine would be the best in any situation. On occasion, it queries several of them at once, merges the outputs and presents the results.

Semantic engines are triggered only after semantic "triggers" are inserted in the code. If the request received shows that the user's cursor is after the last character in string foo; foo. in a C# file, this would trigger the semantic engine to examine members of foo because . is a default semantic trigger for C# (triggers can be changed dynamically). If the text were string foo; foo.zoo, semantic completion would still be triggered (the trigger is behind the zoo word the user is typing) and the results would be filtered with the zoo query.

Semantic completion can also be forced by setting force_semantic: true in the JSON data for the completion request, but you should only do this if the user explicitly requested semantic completion with a keyboard shortcut; otherwise, leave it up to ycmd to decide when to use which engine.

The reason why semantic completion isn't always used even when available is because the semantic engines can be slow and because most of the time, the user doesn't actually need semantic completion.

There are two main use-cases for code-completion:

  1. The user knows which name they're looking for, they just don't want to type the whole name.
  2. The user either doesn't know the name they need or isn't sure what the name is. This is also known as the "API exploration" use-case.

The first use case is the most common one and is trivially addressed with the identifier completion engine (which BTW is blazing fast). The second one needs semantic completion.

Completion string filtering

A critical thing to note 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.

Completion string ranking

The subsequence filter removes any completions that do not match the input, but then the sorting system kicks in. It's a bit involved, but roughly speaking "word boundary" (WB) subsequence character matches are "worth" more than non-WB matches. In effect, this means given an input of "gua", the completion "getUserAccount" would be ranked higher in the list than the "Fooguxa" completion (both of which are subsequence matches). A word-boundary character are all capital characters, characters preceded by an underscore and the first letter character in the completion string.

Auto-shutdown if no requests for a while

If the server hasn't received any requests for a while (controlled by the --idle_suicide_seconds ycmd flag), it will shut itself down. This is useful for cases where the process that started ycmd dies without telling ycmd to die too or if ycmd hangs (this should be extremely rare).

If you're implementing a client for ycmd, ensure that you have some sort of keep-alive background thread that periodically pings ycmd (just call the /healthy handler, although any handler will do).

You can also turn this off by passing --idle_suicide_seconds=0, although that isn't recommended.

Exit codes

During startup, ycmd attempts to load the ycm_core library and exits with one of the following return codes if unsuccessful:

  • 3: unexpected error while loading the library;
  • 4: the ycm_core library is missing;
  • 7: the version of the ycm_core library is outdated.
  • 8: server is started with python; recompile with python3.

User-level customization

You can provide settings to ycmd on server startup. There's a default_settings.json file that you can tweak. See the Options section in YCM's User Guide for a description on what each option does. Pass the path to the modified settings file to ycmd as an --options_file=/path/to/file flag. Note that you must set the hmac_secret setting (encode the value with base64). Because the file you are passing contains a secret token, ensure that you are creating the temporary file in a secure way (the mkstemp() Linux system call is a good idea; use something similar for other OS's).

After it starts up, ycmd will delete the settings file you provided after it reads it.

The settings file is something your editor should produce based on values your user has configured. There's also an extra file (.ycm_extra_conf.py) your user is supposed to provide to configure certain semantic completers. More information on it can also be found in the corresponding section of YCM's User Guide.

.ycm_extra_conf.py specification

The .ycm_extra_conf.py module may define the following functions:

Settings( **kwargs )

This function allows users to configure the language completers on a per project basis or globally. Currently, it is required by the libclang-based completer and optional for other completers. The following arguments can be retrieved from the kwargs dictionary and are common to all completers:

  • language: an identifier of the completer that called the function. Its value is python for the Python completer and cfamily for the C-family completer. This argument is useful to configure several completers at once. For instance:

    def Settings( **kwargs ):
      language = kwargs[ 'language' ]
      if language == 'cfamily':
        return {
          # Settings for the libclang and clangd-based completer.
        }
      if language == 'python':
        return {
          # Settings for the Python completer.
        }
      return {}
  • filename: absolute path of the file currently edited.

  • client_data: any additional data supplied by the client application. See the YouCompleteMe documentation for an example.

The return value is a dictionary whose content depends on the completer.

LSP based completers

LSP servers often support user configuration via the initialise request. These are usually presented as options in the UI. Ycmd supports this using the .ycm_extra_conf.py by allowing the user to specify the exact dictionary of settings that are passed in the server initialise message. These options are returned from Settings under the ls key. The python dictionary is converted to json and included verbatim in the LSP initialize request. In order to determine the set of options for a server, consult the server's documentation or package.json file. A config_sections object is a dictionary whose keys are "sections" and values are pieces of settings (usually found in the ls object) corresponding to those sections. This is even more underspecified and requires trial and error to make it work. It is optional and only useful if you explicitly enable workspace/configuration support.

Example of LSP configuration:

def Settings( **kwargs ):
  if kwargs[ 'language' ] == 'java':
    return { 'ls': { 'java.rename.enabled' : False },
             # `config_sections` is not used for java...
             'config_sections': { 'section0': {} }

In addition, ycmd can use any language server, given a file type and a command line. A user option language_server can be used to plug in a LSP server ycmd wouldn't usually know about. The value is a list of dictionaries containing:

  • name: the string representing the name of the server
  • cmdline: the list representing the command line to execute the server (optional; mandatory if port not specified)
  • port: optional. If specified, a TCP connection is used to this port. If set to *, an unused locall port is selected and made availble in the cmdline as ${port} (see below examples).
  • filetypes: list of supported filetypes.
  • project_root_files: Tells ycmd which files indicate project root.
  • capabilities': Overrides the default LSP capabilities of ycmd.
    • If you enable workspace/configuration support, check the extra conf details, relevant to LSP servers.
  • additional_workspace_dirs: Specifies statically known workspaces that should be open on LSP server startup.
  • triggerCharacters: Override the LSP server's trigger characters for completion. This can be useful when the server obnoxiously requests completion on every character or for example on whitespace characters.
{
  "language_server": [ {
    "name": "gopls",
    "cmdline": [ "/path/to/gopls", "-rpc.trace" ],
    "filetypes": [ "go" ],
    "project_root_files": [ "go.mod" ],
    "triggerCharacters": [ "." ]
  } ]
}

Or, to use a TCP connection:

{
  "language_server": [ {
    "name": "godot",
    "port": "6008",
    "filetypes": [ "gdscript" ]
  } ]
}

Or, to use an unused local port, set port to * and use ${port} in the cmdline:

{
  "language_server": [ {
    "name": "someserver",
    "cmdline": [ "/path/to/some/server", "--port", "${port}" ],
    "port": "*",
    "filetypes": [ "somethign" ],
    "project_root_files": [ "somethingfile" ]
  } ]
}

When plugging in a completer in this way, the kwargs[ 'language' ] will be set to the value of the name key, i.e. gopls in the above example.

A number of LSP completers are currently supported without language_server, usch as:

  • Java
  • Rust
  • Go
  • C-family

One can also override the root directory, with project_directory.

def Settings( **kwargs ):
  return { 'project_directory': 'src/' } # The path may be absolute as well.

Note: If an LSP based completer is configured for a language that's supported "built-in", it overrides the built-in support.

C-family settings

The Settings function is called by the libclang and clangd-based completers to get the compiler flags to use when compiling the current file. The absolute path of this file is accessible under the filename key of the kwargs dictionary.

The return value expected by both completers is a dictionary containing the following items:

  • flags: (mandatory for libclang, optional for clangd) a list of compiler flags.

  • include_paths_relative_to_dir: (optional) the directory to which the include paths in the list of flags are relative. Defaults to ycmd working directory for the libclang completer and .ycm_extra_conf.py's directory for the clangd completer.

  • do_cache: (optional) a boolean indicating whether or not the result of this call (i.e. the list of flags) should be cached for this file name. Defaults to True. If unsure, the default is almost always correct.

The libclang-based completer also supports the following items:

  • override_filename: (optional) a string indicating the name of the file to parse as the translation unit for the supplied file name. This fairly advanced feature allows for projects that use a 'unity'-style build, or for header files which depend on other includes in other files.

  • flags_ready: (optional) a boolean indicating that the flags should be used. Defaults to True. If unsure, the default is almost always correct.

A minimal example which simply returns a list of flags is:

def Settings( **kwargs ):
  return {
    'flags': [ '-x', 'c++' ]
  }
Formatting settings

The configuration for Format subcommand can be specified with an extra conf for the java subserver and for the typescript subserver. The formatter options can be found below:

These servers support custom formatting options to be supplied in a different way than the rest. For this purpose the Settings function can return a formatter property.

An example of the formatter configuration would be:

def Settings( **kwargs ):
  return {
    'formatting_options': {
       'org.eclipse.jdt.core.formatter.lineSplit': 30, 
    }
  }
Python settings

The Settings function allows users to specify the Python interpreter and the sys.path used by the completer to provide completion and code comprehension. No additional arguments are passed.

The return value expected by the completer is a dictionary containing the following items:

  • interpreter_path: (optional) path to the Python interpreter. ~ and environment variables in the path are expanded. If not an absolute path, it will be searched through the PATH.

  • sys_path: (optional) list of paths prepended to sys.path.

Usage example:

def Settings( **kwargs ):
  return {
    'interpreter_path': '~/project/virtual_env/bin/python',
    'sys_path': [ '~/project/third_party/module' ]
  }

PythonSysPath( **kwargs )

Optional for Python support.

This function allows further customization of the Python path sys.path. Its parameters are the possible items returned by the Settings function for the Python completer:

  • interpreter_path: path to the Python interpreter.

  • sys_path: list of Python paths from sys.path.

The return value should be the modified list of Python paths.

See ycmd's own .ycm_extra_conf.py for an example.

Global extra conf file specification

The global extra module must expose the same functions as the .ycm_extra_conf.py module with the following additions:

YcmCorePreLoad()

Optional.

This method, if defined, is called by the server prior to importing the c++ python plugin. It is not usually required and its use is for advanced users only.

Shutdown()

Optional.

Called prior to the server exiting cleanly. It is not usually required and its use is for advanced users only.

Backwards compatibility

ycmd's HTTP+JSON interface follows SemVer. While ycmd has seen extensive use over the last several years as part of YCM, the version number is below 1.0 because some parts of the API might change slightly as people discover possible problems integrating ycmd with other editors. In other words, the current API might unintentionally be Vim-specific. We don't want that.

Note that ycmd's internal API's (i.e. anything other than HTTP+JSON) are NOT covered by SemVer and will randomly change underneath you. DON'T interact with the Python/C++/etc code directly!

FAQ

Is HMAC auth for requests/responses really necessary?

Without the HMAC auth, it's possible for a malicious website to impersonate the user. Don't forget that evil.com can send requests to servers listening on localhost if the user visits evil.com in a browser.

This is not merely a theoretical concern; a working proof-of-concept remote code execution exploit was created for ycmd running on localhost. The HMAC auth was added to block this attack vector.

Contributor Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contact

If you have questions about the plugin or need help, please use the ycmd-users mailing list.

The author's homepage is http://val.markovic.io.

License

This software is licensed under the GPL v3 license. © 2015-2019 ycmd contributors

ycmd's People

Contributors

abigagli avatar abutcher-gh avatar akhosravian avatar bstaletic avatar dgel avatar ekfriis avatar fallingdrift avatar haifengkao avatar homu avatar icholy avatar jmarrec avatar jwilm avatar kadircet avatar manishearth avatar mergify[bot] avatar metatheos avatar mibu138 avatar micbou avatar mikeperri avatar mispencer avatar nikklassen avatar ntkme avatar ptrv avatar puremourning avatar theli-ua avatar thisismiller avatar valloric avatar vheon avatar wcn3 avatar zzbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ycmd's Issues

Cache Clang download

Everytime there's a change in ycmd's c++ files, and it's necessary to rebuilt/reinstall through ./install.sh --clang-completer, it's necessary to wait for the clang download, even though it's the same version, since current approach downloads it to /tmp for building.

Suggestion is to let the compressed download in the plugin directory and building on /tmp, and download anew only when absent or newer version adopted.

Use a persistent build dir

I am using the following patch to have a persistent build dir, which should
speeds up consecutive builds a lot - obviously.

I can see that a clean build is likely to cause less problems, but cmake
should handle this, and documentation could be added to remove the build dir
in case of problems.

Think about all the wasted time/energy that's spent when people upgrade ycmd.

There could be a variable at the top of the script to control this behavior, and the method could be applied to the other / more functions.

diff --git i/build.sh w/build.sh
index f9a14ab..6aeb949 100755
--- i/build.sh
+++ w/build.sh
@@ -96,14 +96,16 @@ function num_cores {


 function install {
-  build_dir=`mktemp -d -t ycm_build.XXXXXX`
+  # build_dir=`mktemp -d -t ycm_build.XXXXXX`
+  build_dir=${SCRIPT_DIR}/build
+  mkdir -p ${build_dir}
   pushd "${build_dir}"

   cmake -G "Unix Makefiles" $(python_finder) "$@" . "${SCRIPT_DIR}/cpp"

   make -j $(num_cores) ycm_support_libs
   popd
-  rm -rf "${build_dir}"
+  # rm -rf "${build_dir}"
 }

 function testrun {

License ambiguity

The Readme states that the software is licensed under the GPLv3. Yet, the example client seems to be licensed under the Apache license.

find-usages?

I haven't been able to find any mention of whether ycmd can show usages of a function – if it can't, then this is a feature request :-)

Installation fails on ubuntu 14.04 (x64) due to a failure to identify number of cores

The function num_cores" fails to output a value, resulting in make consuming all resources and crashing.

from "bash -x"

++ num_cores
++ '[' -n ']'
++ num_cpus=
++ echo
+ make -j ycm_support_libs

Replacing

if [ -n ${YCM_CORES} ]; then

with

if [ -n "${YCM_CORES}" ]; then

solves the problem.

GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Licensing for a new completer

If I were to implement a new completer (subclassing the Completer class), would I be required to license my code under the GPLv3? I would prefer to license it under MIT or similar.

Add a Hack completer

For people working with Hack (Facebook's superset of PHP), it's nice to have autocomplete functionality. hhvm's typechecker provides this out of the box (hh_client --auto-complete). There's already a vim plugin that does this, but integrating with ycmd instead gets the functionality to more editors.

Change completion API response to a more general form

This seems too specific to YouCompleteMe vim client. Parameters list should not be merged into the function name.

{
    "detailed_info": "Foo & operator=( const Foo & )\nFoo & operator=( Foo && )\n",
    "extra_menu_info": "Foo &",
    "insertion_text": "operator=",
    "kind": "FUNCTION",
    "menu_text": "operator=( const Foo & )"
}

My desired completions look like:

{
    "kind": "function",
    "name": "myFun",
    "parameters": [{
        "type": "int",
        "name": "number"
    }, {
        "type": "std::string",
        "name": "text"
    }],
    "return_type": "Foo &",
    "docstring": "..."
}

{
    "kind": "variable",
    "name": "a",
    "type": "int"
}

So that clients decide what the insertion text, menu info or whatever is, and clients with different capabilities can all have a chance to make the best completion experience.
I am working on the Atom client and such completions can be used to build snippets and provide function completions with parameter placeholders.

ycmd.handlers.EventNotification should always return valid JSON

Right now ycmd.handlers.EventNotification checks if response_data evaluates to False and, if so, returns a completely empty HTTP body. Otherwise it returns valid JSON of some sort. Since a zero-byte string is invalid JSON, it seems that clients need to have unnecessarily complex parsing to first determine if the response is legitimate JSON.

Is there a reason that this handler shouldn't return valid JSON in all cases? That would simplify my life. As it is, whenever the response_data is false-y (which seems to happen with Python code a lot) I get the empty HTTP body, blindly try to interpret it as JSON, and get a JSON parse error. Rather than fix this at my end I was hoping that we could fix it at the (apparent) source.

More complete client?

Hi.

I was trying to write a Sublime plugin for YCM, with ycmd of course. I was able to build a toy version, but there're still performance issue and a long way to go.

By checking the client in YCM, I found the client for Vim is much more complete and faster, with things like async request, multi-thread pools.

Any plan for providing a more complete editor-agnostic client?

Add a PHP completer

CodeIntel, the code completion engine from Komodo Edit and Komodo IDE, supports completing PHP (and some other languages too). There's already a Sublime Text plugin that uses it, and it includes binaries for the native components for Windows, Mac, and Linux.

The new version of CodeIntel should be coming out soon (Komodo IDE is in beta), and when it does, it will also include Go support.

The Sublime Text plugin with the included binaries and such can be found here: https://github.com/SublimeCodeIntel/SublimeCodeIntel. Basically, ignore everything in the root of the repo except the "arch" and "libs" directories. I'd be willing to maintain a fork of this repository that's just the CodeIntel part if that would make it more interesting to include in YCMD!

Support running omnisharp server without a solution file

From what I can tell, when ycmd uses omnisharp it requires that a solution file (i.e. a .sln file) exists. The ycmd code seems to actively check for such a file, and it refuses to start the server if it can't find one.

However, according to the closing remarks in omnisharp issue 66, you can now start omnisharp by just passing a directory instead of a solution file. It would be nice if ycmd allowed me to use this feature.

FWIW, I need this because I work with C# primarily on OX S (because it hurts more.) This is probably not a really pressing use case for many users, and there are reasonable workarounds like creating .sln files with xamarin studio. Still, if this is simple enough to do, it would be a nice bit of polish for ycmd.

How to make ycmd use the clang compilation database

I'm having trouble getting ycmd to use my clang compilation database. I figure I must need to configure it somehow, but I don't know what needs to be done.

When I send a completion request I get this:

Traceback (most recent call last):
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/handlers.py", line 100, in GetCompletions
    completer.ComputeCandidates( request_data ),
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/completer.py", line 170, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/completer.py", line 185, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 85, in ComputeCandidatesInner
    raise RuntimeError( NO_COMPILE_FLAGS_MESSAGE )
RuntimeError: Still no compile flags, no completions yet.

I've verified that the compilation database exists and works. Tools like 'clang-check' work on the same file, so it should all be in place.
So, do I need to do anything to explicitly ask ycmd to use the compilation database? Or am I perhaps doing something else incorrectly?

Add CodeIntel as a completer for Go, PHP, Perl, Ruby, and Javascript

CodeIntel is the code completion engine from Komodo Edit, and it supports a ton of languages and does a pretty good job at most of them. I'd love to see it integrated with ycmd, and I may end up paying somebody to write the completers for it or I may spend the time to learn how to make it happen myself.

In my fork, I've added CodeIntel as a third party library. I'm not sure how @Valloric will want to go about using it as a completer for so many different languages, so I'm opening this early with the hopes of getting architectural feedback on it.

Semantic triggers / triggers for filetype are not setup when chaining `ycm_auto_trigger` later

With ycm_auto_trigger=0 by default, changing it to 1 won't setup the auto triggers (triggers_for_filetype) afterwards.

The same might apply to 'min_num_of_chars_for_completion', too.

It would be nice if changing these values would get picked up / sent to ycmd from the Vim client. So it's maybe an issue that also (only?) affects YCM.

Code ref: https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py#L106-108

Plans for versionning

Mate do you have any plans for versioning for package managers? Also any plans on making a homebrew package or something?

crashing on SmartOS (solaris variant)

I've tried my best to follow the steps in CONTRIBUTING.md including posting in the ycm-user group: https://groups.google.com/forum/#!topic/ycm-users/H7xSQQcPh8Y But that was weeks ago and it felt like an effort in futility as I received no replies at all :( I hope this project is not dead, I really like this tool. At any rate I'm having some problems on a solaris variant and I think I have it narrowed down to ycmd, specifically the c++ component. Also I have both 32-bit and 64-bit architectures of this OS and it works fine on the 32-bit. I'd be glad to dig for any more information that might be required to help solve this problem, but I'm afraid I've done all I can do with it at this point. There seems to be a lot of moving parts to this thing.

Cannot override/unset defaults for g:ycm_semantic_triggers

Code: https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer_utils.py#L26-L31

user_trigger_map correspondents to the g:ycm_semantic_triggers here, and gets merged with PREPARED_DEFAULT_FILETYPE_TRIGGERS.

Therefore it's not possible anymore to unset/change the filetype triggers for a specific filetype.

Also, this recent change (merging the settings) appears to be not backwards-compatible in that g:ycm_semantic_triggers was taken as-is before, without merging it with the defaults.

YCMD locks files for writing / deleting

Hi,

While writing and working with my sublime text 2 plugin for YCMD, i noticed this bug.
YCMD consistently locks some of my header files, so that i cannot write to them or delete them.
For this problem my plugin only sends an event notification "FileReadyToParse" to YCMD.
As soon as i kill the ycmd process, the files are unlocked.
I suspect the clangcompleter from causing this.

I made 2 example files that causes the problem consistently and will list them below.
For this problem, .ycm_extra_conf.py returns the flags

FLAGS = ['-w',
         '-std=c99',
         '-pedantic-errors']

dummy.c:

#define TEXT_START 6
#include "dummy.h"

int foo( void )
{
    return TRM_TXT_THIS_IS_A_LONG_NAME_0;
}

dummy.h

#define TRM_TXT_THIS_IS_A_LONG_NAME_0 (TEXT_START+1)
#define TRM_TXT_THIS_IS_A_LONG_NAME_1 (TEXT_START+2)
#define TRM_TXT_THIS_IS_A_LONG_NAME_2 (TEXT_START+3)
#define TRM_TXT_THIS_IS_A_LONG_NAME_3 (TEXT_START+4)
#define TRM_TXT_THIS_IS_A_LONG_NAME_4 (TEXT_START+5)
#define TRM_TXT_THIS_IS_A_LONG_NAME_5 (TEXT_START+6)
#define TRM_TXT_THIS_IS_A_LONG_NAME_6 (TEXT_START+7)
#define TRM_TXT_THIS_IS_A_LONG_NAME_7 (TEXT_START+8)
#define TRM_TXT_THIS_IS_A_LONG_NAME_8 (TEXT_START+9)
#define TRM_TXT_THIS_IS_A_LONG_NAME_9 (TEXT_START+10)
#define TRM_TXT_THIS_IS_A_LONG_NAME_10 (TEXT_START+11)
#define TRM_TXT_THIS_IS_A_LONG_NAME_11 (TEXT_START+12)
#define TRM_TXT_THIS_IS_A_LONG_NAME_12 (TEXT_START+13)
#define TRM_TXT_THIS_IS_A_LONG_NAME_13 (TEXT_START+14)
#define TRM_TXT_THIS_IS_A_LONG_NAME_14 (TEXT_START+15)
#define TRM_TXT_THIS_IS_A_LONG_NAME_15 (TEXT_START+16)
#define TRM_TXT_THIS_IS_A_LONG_NAME_16 (TEXT_START+17)
#define TRM_TXT_THIS_IS_A_LONG_NAME_17 (TEXT_START+18)
#define TRM_TXT_THIS_IS_A_LONG_NAME_18 (TEXT_START+19)
#define TRM_TXT_THIS_IS_A_LONG_NAME_19 (TEXT_START+20)
#define TRM_TXT_THIS_IS_A_LONG_NAME_20 (TEXT_START+21)
#define TRM_TXT_THIS_IS_A_LONG_NAME_21 (TEXT_START+22)
#define TRM_TXT_THIS_IS_A_LONG_NAME_22 (TEXT_START+23)
#define TRM_TXT_THIS_IS_A_LONG_NAME_23 (TEXT_START+24)
#define TRM_TXT_THIS_IS_A_LONG_NAME_24 (TEXT_START+25)
#define TRM_TXT_THIS_IS_A_LONG_NAME_25 (TEXT_START+26)
#define TRM_TXT_THIS_IS_A_LONG_NAME_26 (TEXT_START+27)
#define TRM_TXT_THIS_IS_A_LONG_NAME_27 (TEXT_START+28)
#define TRM_TXT_THIS_IS_A_LONG_NAME_28 (TEXT_START+29)
#define TRM_TXT_THIS_IS_A_LONG_NAME_29 (TEXT_START+30)
#define TRM_TXT_THIS_IS_A_LONG_NAME_30 (TEXT_START+31)
#define TRM_TXT_THIS_IS_A_LONG_NAME_31 (TEXT_START+32)
#define TRM_TXT_THIS_IS_A_LONG_NAME_32 (TEXT_START+33)
#define TRM_TXT_THIS_IS_A_LONG_NAME_33 (TEXT_START+34)
#define TRM_TXT_THIS_IS_A_LONG_NAME_34 (TEXT_START+35)
#define TRM_TXT_THIS_IS_A_LONG_NAME_35 (TEXT_START+36)
#define TRM_TXT_THIS_IS_A_LONG_NAME_36 (TEXT_START+37)
#define TRM_TXT_THIS_IS_A_LONG_NAME_37 (TEXT_START+38)
#define TRM_TXT_THIS_IS_A_LONG_NAME_38 (TEXT_START+39)
#define TRM_TXT_THIS_IS_A_LONG_NAME_39 (TEXT_START+40)
#define TRM_TXT_THIS_IS_A_LONG_NAME_40 (TEXT_START+41)
#define TRM_TXT_THIS_IS_A_LONG_NAME_41 (TEXT_START+42)
#define TRM_TXT_THIS_IS_A_LONG_NAME_42 (TEXT_START+43)
#define TRM_TXT_THIS_IS_A_LONG_NAME_43 (TEXT_START+44)
#define TRM_TXT_THIS_IS_A_LONG_NAME_44 (TEXT_START+45)
#define TRM_TXT_THIS_IS_A_LONG_NAME_45 (TEXT_START+46)
#define TRM_TXT_THIS_IS_A_LONG_NAME_46 (TEXT_START+47)
#define TRM_TXT_THIS_IS_A_LONG_NAME_47 (TEXT_START+48)
#define TRM_TXT_THIS_IS_A_LONG_NAME_48 (TEXT_START+49)
#define TRM_TXT_THIS_IS_A_LONG_NAME_49 (TEXT_START+50)
#define TRM_TXT_THIS_IS_A_LONG_NAME_50 (TEXT_START+51)
#define TRM_TXT_THIS_IS_A_LONG_NAME_51 (TEXT_START+52)
#define TRM_TXT_THIS_IS_A_LONG_NAME_52 (TEXT_START+53)
#define TRM_TXT_THIS_IS_A_LONG_NAME_53 (TEXT_START+54)
#define TRM_TXT_THIS_IS_A_LONG_NAME_54 (TEXT_START+55)
#define TRM_TXT_THIS_IS_A_LONG_NAME_55 (TEXT_START+56)
#define TRM_TXT_THIS_IS_A_LONG_NAME_56 (TEXT_START+57)
#define TRM_TXT_THIS_IS_A_LONG_NAME_57 (TEXT_START+58)
#define TRM_TXT_THIS_IS_A_LONG_NAME_58 (TEXT_START+59)
#define TRM_TXT_THIS_IS_A_LONG_NAME_59 (TEXT_START+60)
#define TRM_TXT_THIS_IS_A_LONG_NAME_60 (TEXT_START+61)
#define TRM_TXT_THIS_IS_A_LONG_NAME_61 (TEXT_START+62)
#define TRM_TXT_THIS_IS_A_LONG_NAME_62 (TEXT_START+63)
#define TRM_TXT_THIS_IS_A_LONG_NAME_63 (TEXT_START+64)
#define TRM_TXT_THIS_IS_A_LONG_NAME_64 (TEXT_START+65)
#define TRM_TXT_THIS_IS_A_LONG_NAME_65 (TEXT_START+66)
#define TRM_TXT_THIS_IS_A_LONG_NAME_66 (TEXT_START+67)
#define TRM_TXT_THIS_IS_A_LONG_NAME_67 (TEXT_START+68)
#define TRM_TXT_THIS_IS_A_LONG_NAME_68 (TEXT_START+69)
#define TRM_TXT_THIS_IS_A_LONG_NAME_69 (TEXT_START+70)
#define TRM_TXT_THIS_IS_A_LONG_NAME_70 (TEXT_START+71)
#define TRM_TXT_THIS_IS_A_LONG_NAME_71 (TEXT_START+72)
#define TRM_TXT_THIS_IS_A_LONG_NAME_72 (TEXT_START+73)
#define TRM_TXT_THIS_IS_A_LONG_NAME_73 (TEXT_START+74)
#define TRM_TXT_THIS_IS_A_LONG_NAME_74 (TEXT_START+75)
#define TRM_TXT_THIS_IS_A_LONG_NAME_75 (TEXT_START+76)
#define TRM_TXT_THIS_IS_A_LONG_NAME_76 (TEXT_START+77)
#define TRM_TXT_THIS_IS_A_LONG_NAME_77 (TEXT_START+78)
#define TRM_TXT_THIS_IS_A_LONG_NAME_78 (TEXT_START+79)
#define TRM_TXT_THIS_IS_A_LONG_NAME_79 (TEXT_START+80)
#define TRM_TXT_THIS_IS_A_LONG_NAME_80 (TEXT_START+81)
#define TRM_TXT_THIS_IS_A_LONG_NAME_81 (TEXT_START+82)
#define TRM_TXT_THIS_IS_A_LONG_NAME_82 (TEXT_START+83)
#define TRM_TXT_THIS_IS_A_LONG_NAME_83 (TEXT_START+84)
#define TRM_TXT_THIS_IS_A_LONG_NAME_84 (TEXT_START+85)
#define TRM_TXT_THIS_IS_A_LONG_NAME_85 (TEXT_START+86)
#define TRM_TXT_THIS_IS_A_LONG_NAME_86 (TEXT_START+87)
#define TRM_TXT_THIS_IS_A_LONG_NAME_87 (TEXT_START+88)
#define TRM_TXT_THIS_IS_A_LONG_NAME_88 (TEXT_START+89)
#define TRM_TXT_THIS_IS_A_LONG_NAME_89 (TEXT_START+90)
#define TRM_TXT_THIS_IS_A_LONG_NAME_90 (TEXT_START+91)
#define TRM_TXT_THIS_IS_A_LONG_NAME_91 (TEXT_START+92)
#define TRM_TXT_THIS_IS_A_LONG_NAME_92 (TEXT_START+93)
#define TRM_TXT_THIS_IS_A_LONG_NAME_93 (TEXT_START+94)
#define TRM_TXT_THIS_IS_A_LONG_NAME_94 (TEXT_START+95)
#define TRM_TXT_THIS_IS_A_LONG_NAME_95 (TEXT_START+96)
#define TRM_TXT_THIS_IS_A_LONG_NAME_96 (TEXT_START+97)
#define TRM_TXT_THIS_IS_A_LONG_NAME_97 (TEXT_START+98)
#define TRM_TXT_THIS_IS_A_LONG_NAME_98 (TEXT_START+99)
#define TRM_TXT_THIS_IS_A_LONG_NAME_99 (TEXT_START+100)
#define TRM_TXT_THIS_IS_A_LONG_NAME_100 (TEXT_START+101)
#define TRM_TXT_THIS_IS_A_LONG_NAME_101 (TEXT_START+102)
#define TRM_TXT_THIS_IS_A_LONG_NAME_102 (TEXT_START+103)
#define TRM_TXT_THIS_IS_A_LONG_NAME_103 (TEXT_START+104)
#define TRM_TXT_THIS_IS_A_LONG_NAME_104 (TEXT_START+105)
#define TRM_TXT_THIS_IS_A_LONG_NAME_105 (TEXT_START+106)
#define TRM_TXT_THIS_IS_A_LONG_NAME_106 (TEXT_START+107)
#define TRM_TXT_THIS_IS_A_LONG_NAME_107 (TEXT_START+108)
#define TRM_TXT_THIS_IS_A_LONG_NAME_108 (TEXT_START+109)
#define TRM_TXT_THIS_IS_A_LONG_NAME_109 (TEXT_START+110)
#define TRM_TXT_THIS_IS_A_LONG_NAME_110 (TEXT_START+111)
#define TRM_TXT_THIS_IS_A_LONG_NAME_111 (TEXT_START+112)
#define TRM_TXT_THIS_IS_A_LONG_NAME_112 (TEXT_START+113)
#define TRM_TXT_THIS_IS_A_LONG_NAME_113 (TEXT_START+114)
#define TRM_TXT_THIS_IS_A_LONG_NAME_114 (TEXT_START+115)
#define TRM_TXT_THIS_IS_A_LONG_NAME_115 (TEXT_START+116)
#define TRM_TXT_THIS_IS_A_LONG_NAME_116 (TEXT_START+117)
#define TRM_TXT_THIS_IS_A_LONG_NAME_117 (TEXT_START+118)
#define TRM_TXT_THIS_IS_A_LONG_NAME_118 (TEXT_START+119)
#define TRM_TXT_THIS_IS_A_LONG_NAME_119 (TEXT_START+120)
#define TRM_TXT_THIS_IS_A_LONG_NAME_120 (TEXT_START+121)
#define TRM_TXT_THIS_IS_A_LONG_NAME_121 (TEXT_START+122)
#define TRM_TXT_THIS_IS_A_LONG_NAME_122 (TEXT_START+123)
#define TRM_TXT_THIS_IS_A_LONG_NAME_123 (TEXT_START+124)
#define TRM_TXT_THIS_IS_A_LONG_NAME_124 (TEXT_START+125)
#define TRM_TXT_THIS_IS_A_LONG_NAME_125 (TEXT_START+126)
#define TRM_TXT_THIS_IS_A_LONG_NAME_126 (TEXT_START+127)
#define TRM_TXT_THIS_IS_A_LONG_NAME_127 (TEXT_START+128)
#define TRM_TXT_THIS_IS_A_LONG_NAME_128 (TEXT_START+129)
#define TRM_TXT_THIS_IS_A_LONG_NAME_129 (TEXT_START+130)
#define TRM_TXT_THIS_IS_A_LONG_NAME_130 (TEXT_START+131)
#define TRM_TXT_THIS_IS_A_LONG_NAME_131 (TEXT_START+132)
#define TRM_TXT_THIS_IS_A_LONG_NAME_132 (TEXT_START+133)
#define TRM_TXT_THIS_IS_A_LONG_NAME_133 (TEXT_START+134)
#define TRM_TXT_THIS_IS_A_LONG_NAME_134 (TEXT_START+135)
#define TRM_TXT_THIS_IS_A_LONG_NAME_135 (TEXT_START+136)
#define TRM_TXT_THIS_IS_A_LONG_NAME_136 (TEXT_START+137)
#define TRM_TXT_THIS_IS_A_LONG_NAME_137 (TEXT_START+138)
#define TRM_TXT_THIS_IS_A_LONG_NAME_138 (TEXT_START+139)
#define TRM_TXT_THIS_IS_A_LONG_NAME_139 (TEXT_START+140)
#define TRM_TXT_THIS_IS_A_LONG_NAME_140 (TEXT_START+141)
#define TRM_TXT_THIS_IS_A_LONG_NAME_141 (TEXT_START+142)
#define TRM_TXT_THIS_IS_A_LONG_NAME_142 (TEXT_START+143)
#define TRM_TXT_THIS_IS_A_LONG_NAME_143 (TEXT_START+144)
#define TRM_TXT_THIS_IS_A_LONG_NAME_144 (TEXT_START+145)
#define TRM_TXT_THIS_IS_A_LONG_NAME_145 (TEXT_START+146)
#define TRM_TXT_THIS_IS_A_LONG_NAME_146 (TEXT_START+147)
#define TRM_TXT_THIS_IS_A_LONG_NAME_147 (TEXT_START+148)
#define TRM_TXT_THIS_IS_A_LONG_NAME_148 (TEXT_START+149)
#define TRM_TXT_THIS_IS_A_LONG_NAME_149 (TEXT_START+150)
#define TRM_TXT_THIS_IS_A_LONG_NAME_150 (TEXT_START+151)
#define TRM_TXT_THIS_IS_A_LONG_NAME_151 (TEXT_START+152)
#define TRM_TXT_THIS_IS_A_LONG_NAME_152 (TEXT_START+153)
#define TRM_TXT_THIS_IS_A_LONG_NAME_153 (TEXT_START+154)
#define TRM_TXT_THIS_IS_A_LONG_NAME_154 (TEXT_START+155)
#define TRM_TXT_THIS_IS_A_LONG_NAME_155 (TEXT_START+156)
#define TRM_TXT_THIS_IS_A_LONG_NAME_156 (TEXT_START+157)
#define TRM_TXT_THIS_IS_A_LONG_NAME_157 (TEXT_START+158)
#define TRM_TXT_THIS_IS_A_LONG_NAME_158 (TEXT_START+159)
#define TRM_TXT_THIS_IS_A_LONG_NAME_159 (TEXT_START+160)
#define TRM_TXT_THIS_IS_A_LONG_NAME_160 (TEXT_START+161)
#define TRM_TXT_THIS_IS_A_LONG_NAME_161 (TEXT_START+162)
#define TRM_TXT_THIS_IS_A_LONG_NAME_162 (TEXT_START+163)
#define TRM_TXT_THIS_IS_A_LONG_NAME_163 (TEXT_START+164)
#define TRM_TXT_THIS_IS_A_LONG_NAME_164 (TEXT_START+165)
#define TRM_TXT_THIS_IS_A_LONG_NAME_165 (TEXT_START+166)
#define TRM_TXT_THIS_IS_A_LONG_NAME_166 (TEXT_START+167)
#define TRM_TXT_THIS_IS_A_LONG_NAME_167 (TEXT_START+168)
#define TRM_TXT_THIS_IS_A_LONG_NAME_168 (TEXT_START+169)
#define TRM_TXT_THIS_IS_A_LONG_NAME_169 (TEXT_START+170)
#define TRM_TXT_THIS_IS_A_LONG_NAME_170 (TEXT_START+171)
#define TRM_TXT_THIS_IS_A_LONG_NAME_171 (TEXT_START+172)
#define TRM_TXT_THIS_IS_A_LONG_NAME_172 (TEXT_START+173)
#define TRM_TXT_THIS_IS_A_LONG_NAME_173 (TEXT_START+174)
#define TRM_TXT_THIS_IS_A_LONG_NAME_174 (TEXT_START+175)
#define TRM_TXT_THIS_IS_A_LONG_NAME_175 (TEXT_START+176)
#define TRM_TXT_THIS_IS_A_LONG_NAME_176 (TEXT_START+177)
#define TRM_TXT_THIS_IS_A_LONG_NAME_177 (TEXT_START+178)
#define TRM_TXT_THIS_IS_A_LONG_NAME_178 (TEXT_START+179)
#define TRM_TXT_THIS_IS_A_LONG_NAME_179 (TEXT_START+180)
#define TRM_TXT_THIS_IS_A_LONG_NAME_180 (TEXT_START+181)
#define TRM_TXT_THIS_IS_A_LONG_NAME_181 (TEXT_START+182)
#define TRM_TXT_THIS_IS_A_LONG_NAME_182 (TEXT_START+183)
#define TRM_TXT_THIS_IS_A_LONG_NAME_183 (TEXT_START+184)
#define TRM_TXT_THIS_IS_A_LONG_NAME_184 (TEXT_START+185)
#define TRM_TXT_THIS_IS_A_LONG_NAME_185 (TEXT_START+186)
#define TRM_TXT_THIS_IS_A_LONG_NAME_186 (TEXT_START+187)
#define TRM_TXT_THIS_IS_A_LONG_NAME_187 (TEXT_START+188)
#define TRM_TXT_THIS_IS_A_LONG_NAME_188 (TEXT_START+189)
#define TRM_TXT_THIS_IS_A_LONG_NAME_189 (TEXT_START+190)
#define TRM_TXT_THIS_IS_A_LONG_NAME_190 (TEXT_START+191)
#define TRM_TXT_THIS_IS_A_LONG_NAME_191 (TEXT_START+192)
#define TRM_TXT_THIS_IS_A_LONG_NAME_192 (TEXT_START+193)
#define TRM_TXT_THIS_IS_A_LONG_NAME_193 (TEXT_START+194)
#define TRM_TXT_THIS_IS_A_LONG_NAME_194 (TEXT_START+195)
#define TRM_TXT_THIS_IS_A_LONG_NAME_195 (TEXT_START+196)
#define TRM_TXT_THIS_IS_A_LONG_NAME_196 (TEXT_START+197)
#define TRM_TXT_THIS_IS_A_LONG_NAME_197 (TEXT_START+198)
#define TRM_TXT_THIS_IS_A_LONG_NAME_198 (TEXT_START+199)
#define TRM_TXT_THIS_IS_A_LONG_NAME_199 (TEXT_START+200)
#define TRM_TXT_THIS_IS_A_LONG_NAME_200 (TEXT_START+201)
#define TRM_TXT_THIS_IS_A_LONG_NAME_201 (TEXT_START+202)
#define TRM_TXT_THIS_IS_A_LONG_NAME_202 (TEXT_START+203)
#define TRM_TXT_THIS_IS_A_LONG_NAME_203 (TEXT_START+204)
#define TRM_TXT_THIS_IS_A_LONG_NAME_204 (TEXT_START+205)
#define TRM_TXT_THIS_IS_A_LONG_NAME_205 (TEXT_START+206)
#define TRM_TXT_THIS_IS_A_LONG_NAME_206 (TEXT_START+207)
#define TRM_TXT_THIS_IS_A_LONG_NAME_207 (TEXT_START+208)
#define TRM_TXT_THIS_IS_A_LONG_NAME_208 (TEXT_START+209)
#define TRM_TXT_THIS_IS_A_LONG_NAME_209 (TEXT_START+210)
#define TRM_TXT_THIS_IS_A_LONG_NAME_210 (TEXT_START+211)
#define TRM_TXT_THIS_IS_A_LONG_NAME_211 (TEXT_START+212)
#define TRM_TXT_THIS_IS_A_LONG_NAME_212 (TEXT_START+213)
#define TRM_TXT_THIS_IS_A_LONG_NAME_213 (TEXT_START+214)
#define TRM_TXT_THIS_IS_A_LONG_NAME_214 (TEXT_START+215)
#define TRM_TXT_THIS_IS_A_LONG_NAME_215 (TEXT_START+216)
#define TRM_TXT_THIS_IS_A_LONG_NAME_216 (TEXT_START+217)
#define TRM_TXT_THIS_IS_A_LONG_NAME_217 (TEXT_START+218)
#define TRM_TXT_THIS_IS_A_LONG_NAME_218 (TEXT_START+219)
#define TRM_TXT_THIS_IS_A_LONG_NAME_219 (TEXT_START+220)
#define TRM_TXT_THIS_IS_A_LONG_NAME_220 (TEXT_START+221)
#define TRM_TXT_THIS_IS_A_LONG_NAME_221 (TEXT_START+222)
#define TRM_TXT_THIS_IS_A_LONG_NAME_222 (TEXT_START+223)
#define TRM_TXT_THIS_IS_A_LONG_NAME_223 (TEXT_START+224)
#define TRM_TXT_THIS_IS_A_LONG_NAME_224 (TEXT_START+225)
#define TRM_TXT_THIS_IS_A_LONG_NAME_225 (TEXT_START+226)
#define TRM_TXT_THIS_IS_A_LONG_NAME_226 (TEXT_START+227)
#define TRM_TXT_THIS_IS_A_LONG_NAME_227 (TEXT_START+228)
#define TRM_TXT_THIS_IS_A_LONG_NAME_228 (TEXT_START+229)
#define TRM_TXT_THIS_IS_A_LONG_NAME_229 (TEXT_START+230)
#define TRM_TXT_THIS_IS_A_LONG_NAME_230 (TEXT_START+231)
#define TRM_TXT_THIS_IS_A_LONG_NAME_231 (TEXT_START+232)
#define TRM_TXT_THIS_IS_A_LONG_NAME_232 (TEXT_START+233)
#define TRM_TXT_THIS_IS_A_LONG_NAME_233 (TEXT_START+234)
#define TRM_TXT_THIS_IS_A_LONG_NAME_234 (TEXT_START+235)
#define TRM_TXT_THIS_IS_A_LONG_NAME_235 (TEXT_START+236)
#define TRM_TXT_THIS_IS_A_LONG_NAME_236 (TEXT_START+237)
#define TRM_TXT_THIS_IS_A_LONG_NAME_237 (TEXT_START+238)
#define TRM_TXT_THIS_IS_A_LONG_NAME_238 (TEXT_START+239)
#define TRM_TXT_THIS_IS_A_LONG_NAME_239 (TEXT_START+240)
#define TRM_TXT_THIS_IS_A_LONG_NAME_240 (TEXT_START+241)
#define TRM_TXT_THIS_IS_A_LONG_NAME_241 (TEXT_START+242)
#define TRM_TXT_THIS_IS_A_LONG_NAME_242 (TEXT_START+243)
#define TRM_TXT_THIS_IS_A_LONG_NAME_243 (TEXT_START+244)
#define TRM_TXT_THIS_IS_A_LONG_NAME_244 (TEXT_START+245)
#define TRM_TXT_THIS_IS_A_LONG_NAME_245 (TEXT_START+246)
#define TRM_TXT_THIS_IS_A_LONG_NAME_246 (TEXT_START+247)
#define TRM_TXT_THIS_IS_A_LONG_NAME_247 (TEXT_START+248)
#define TRM_TXT_THIS_IS_A_LONG_NAME_248 (TEXT_START+249)
#define TRM_TXT_THIS_IS_A_LONG_NAME_249 (TEXT_START+250)
#define TRM_TXT_THIS_IS_A_LONG_NAME_250 (TEXT_START+251)
#define TRM_TXT_THIS_IS_A_LONG_NAME_251 (TEXT_START+252)
#define TRM_TXT_THIS_IS_A_LONG_NAME_252 (TEXT_START+253)
#define TRM_TXT_THIS_IS_A_LONG_NAME_253 (TEXT_START+254)
#define TRM_TXT_THIS_IS_A_LONG_NAME_254 (TEXT_START+255)
#define TRM_TXT_THIS_IS_A_LONG_NAME_255 (TEXT_START+256)
#define TRM_TXT_THIS_IS_A_LONG_NAME_256 (TEXT_START+257)
#define TRM_TXT_THIS_IS_A_LONG_NAME_257 (TEXT_START+258)
#define TRM_TXT_THIS_IS_A_LONG_NAME_258 (TEXT_START+259)
#define TRM_TXT_THIS_IS_A_LONG_NAME_259 (TEXT_START+260)
#define TRM_TXT_THIS_IS_A_LONG_NAME_260 (TEXT_START+261)
#define TRM_TXT_THIS_IS_A_LONG_NAME_261 (TEXT_START+262)
#define TRM_TXT_THIS_IS_A_LONG_NAME_262 (TEXT_START+263)
#define TRM_TXT_THIS_IS_A_LONG_NAME_263 (TEXT_START+264)
#define TRM_TXT_THIS_IS_A_LONG_NAME_264 (TEXT_START+265)
#define TRM_TXT_THIS_IS_A_LONG_NAME_265 (TEXT_START+266)
#define TRM_TXT_THIS_IS_A_LONG_NAME_266 (TEXT_START+267)
#define TRM_TXT_THIS_IS_A_LONG_NAME_267 (TEXT_START+268)
#define TRM_TXT_THIS_IS_A_LONG_NAME_268 (TEXT_START+269)
#define TRM_TXT_THIS_IS_A_LONG_NAME_269 (TEXT_START+270)
#define TRM_TXT_THIS_IS_A_LONG_NAME_270 (TEXT_START+271)
#define TRM_TXT_THIS_IS_A_LONG_NAME_271 (TEXT_START+272)
#define TRM_TXT_THIS_IS_A_LONG_NAME_272 (TEXT_START+273)
#define TRM_TXT_THIS_IS_A_LONG_NAME_273 (TEXT_START+274)
#define TRM_TXT_THIS_IS_A_LONG_NAME_274 (TEXT_START+275)
#define TRM_TXT_THIS_IS_A_LONG_NAME_275 (TEXT_START+276)
#define TRM_TXT_THIS_IS_A_LONG_NAME_276 (TEXT_START+277)
#define TRM_TXT_THIS_IS_A_LONG_NAME_277 (TEXT_START+278)
#define TRM_TXT_THIS_IS_A_LONG_NAME_278 (TEXT_START+279)
#define TRM_TXT_THIS_IS_A_LONG_NAME_279 (TEXT_START+280)
#define TRM_TXT_THIS_IS_A_LONG_NAME_280 (TEXT_START+281)
#define TRM_TXT_THIS_IS_A_LONG_NAME_281 (TEXT_START+282)
#define TRM_TXT_THIS_IS_A_LONG_NAME_282 (TEXT_START+283)
#define TRM_TXT_THIS_IS_A_LONG_NAME_283 (TEXT_START+284)
#define TRM_TXT_THIS_IS_A_LONG_NAME_284 (TEXT_START+285)
#define TRM_TXT_THIS_IS_A_LONG_NAME_285 (TEXT_START+286)
#define TRM_TXT_THIS_IS_A_LONG_NAME_286 (TEXT_START+287)
#define TRM_TXT_THIS_IS_A_LONG_NAME_287 (TEXT_START+288)
#define TRM_TXT_THIS_IS_A_LONG_NAME_288 (TEXT_START+289)
#define TRM_TXT_THIS_IS_A_LONG_NAME_289 (TEXT_START+290)
#define TRM_TXT_THIS_IS_A_LONG_NAME_290 (TEXT_START+291)
#define TRM_TXT_THIS_IS_A_LONG_NAME_291 (TEXT_START+292)
#define TRM_TXT_THIS_IS_A_LONG_NAME_292 (TEXT_START+293)
#define TRM_TXT_THIS_IS_A_LONG_NAME_293 (TEXT_START+294)
#define TRM_TXT_THIS_IS_A_LONG_NAME_294 (TEXT_START+295)
#define TRM_TXT_THIS_IS_A_LONG_NAME_295 (TEXT_START+296)
#define TRM_TXT_THIS_IS_A_LONG_NAME_296 (TEXT_START+297)
#define TRM_TXT_THIS_IS_A_LONG_NAME_297 (TEXT_START+298)
#define TRM_TXT_THIS_IS_A_LONG_NAME_298 (TEXT_START+299)
#define TRM_TXT_THIS_IS_A_LONG_NAME_299 (TEXT_START+300)
#define TRM_TXT_THIS_IS_A_LONG_NAME_300 (TEXT_START+301)
#define TRM_TXT_THIS_IS_A_LONG_NAME_301 (TEXT_START+302)
#define TRM_TXT_THIS_IS_A_LONG_NAME_302 (TEXT_START+303)
#define TRM_TXT_THIS_IS_A_LONG_NAME_303 (TEXT_START+304)
#define TRM_TXT_THIS_IS_A_LONG_NAME_304 (TEXT_START+305)
#define TRM_TXT_THIS_IS_A_LONG_NAME_305 (TEXT_START+306)
#define TRM_TXT_THIS_IS_A_LONG_NAME_306 (TEXT_START+307)
#define TRM_TXT_THIS_IS_A_LONG_NAME_307 (TEXT_START+308)
#define TRM_TXT_THIS_IS_A_LONG_NAME_308 (TEXT_START+309)
#define TRM_TXT_THIS_IS_A_LONG_NAME_309 (TEXT_START+310)
#define TRM_TXT_THIS_IS_A_LONG_NAME_310 (TEXT_START+311)
#define TRM_TXT_THIS_IS_A_LONG_NAME_311 (TEXT_START+312)
#define TRM_TXT_THIS_IS_A_LONG_NAME_312 (TEXT_START+313)
#define TRM_TXT_THIS_IS_A_LONG_NAME_313 (TEXT_START+314)
#define TRM_TXT_THIS_IS_A_LONG_NAME_314 (TEXT_START+315)
#define TRM_TXT_THIS_IS_A_LONG_NAME_315 (TEXT_START+316)
#define TRM_TXT_THIS_IS_A_LONG_NAME_316 (TEXT_START+317)
#define TRM_TXT_THIS_IS_A_LONG_NAME_317 (TEXT_START+318)
#define TRM_TXT_THIS_IS_A_LONG_NAME_318 (TEXT_START+319)
#define TRM_TXT_THIS_IS_A_LONG_NAME_319 (TEXT_START+320)
#define TRM_TXT_THIS_IS_A_LONG_NAME_320 (TEXT_START+321)
#define TRM_TXT_THIS_IS_A_LONG_NAME_321 (TEXT_START+322)
#define TRM_TXT_THIS_IS_A_LONG_NAME_322 (TEXT_START+323)
#define TRM_TXT_THIS_IS_A_LONG_NAME_323 (TEXT_START+324)
#define TRM_TXT_THIS_IS_A_LONG_NAME_324 (TEXT_START+325)
#define TRM_TXT_THIS_IS_A_LONG_NAME_325 (TEXT_START+326)
#define TRM_TXT_THIS_IS_A_LONG_NAME_326 (TEXT_START+327)
#define TRM_TXT_THIS_IS_A_LONG_NAME_327 (TEXT_START+328)
#define TRM_TXT_THIS_IS_A_LONG_NAME_328 (TEXT_START+329)
#define TRM_TXT_THIS_IS_A_LONG_NAME_329 (TEXT_START+330)
#define TRM_TXT_THIS_IS_A_LONG_NAME_330 (TEXT_START+331)
#define TRM_TXT_THIS_IS_A_LONG_NAME_331 (TEXT_START+332)
#define TRM_TXT_THIS_IS_A_LONG_NAME_332 (TEXT_START+333)
#define TRM_TXT_THIS_IS_A_LONG_NAME_333 (TEXT_START+334)
#define TRM_TXT_THIS_IS_A_LONG_NAME_334 (TEXT_START+335)
#define TRM_TXT_THIS_IS_A_LONG_NAME_335 (TEXT_START+336)
#define TRM_TXT_THIS_IS_A_LONG_NAME_336 (TEXT_START+337)
#define TRM_TXT_THIS_IS_A_LONG_NAME_337 (TEXT_START+338)
#define TRM_TXT_THIS_IS_A_LONG_NAME_338 (TEXT_START+339)
#define TRM_TXT_THIS_IS_A_LONG_NAME_339 (TEXT_START+340)
#define TRM_TXT_THIS_IS_A_LONG_NAME_340 (TEXT_START+341)
#define TRM_TXT_THIS_IS_A_LONG_NAME_341 (TEXT_START+342)
#define TRM_TXT_THIS_IS_A_LONG_NAME_342 (TEXT_START+343)
#define TRM_TXT_THIS_IS_A_LONG_NAME_343 (TEXT_START+344)
#define TRM_TXT_THIS_IS_A_LONG_NAME_344 (TEXT_START+345)
#define TRM_TXT_THIS_IS_A_LONG_NAME_345 (TEXT_START+346)

How to determine why GoToDefinition is not working?

I'm trying to understand why I can't make "GoToDefinition" work with the clang completer. The general "GoTo" works fine, but it only ever seems to take me to a declaration. I'd like to be able to jump to a definition. Should I expect this to work? If so, how can I figure out what I'm doing wrong?

How to request that the "obvious" extra-conf is loaded during file-ready?

I noticed that OnFileReadyToParse() will look for an extra-conf file when one hasn't been configured. Is there any way that I can request that it be loaded? I'm imagining a flag in the request that says "if there's no config loaded, and if you find one that looks like it matches, load it."

Or perhaps better would be a separate explicit request to load the auto-detected extra-conf, something I could call before sending file-ready.

My thinking is that, if ycmd is already doing these kinds of searches for extra-conf files, then it would be a waste to reimplement it client code...I should just reuse what ycmd's got.

FWIW, here's the traceback that led me to this question:

2014-09-04 07:50:19,558 - INFO - Received event notification
2014-09-04 07:50:19,558 - DEBUG - Event name: FileReadyToParse
2014-09-04 07:50:19,558 - INFO - Adding buffer identifiers for file: /Users/sixtynorth/projects/boost_python_exception/src/boost_python_exception/format_exception.cpp
Traceback (most recent call last):
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/handlers.py", line 70, in EventNotification
    event_handler )( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 199, in OnFileReadyToParse
    flags = self._FlagsForRequest( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 261, in _FlagsForRequest
    return self._flags.FlagsForFile( filename, client_data = client_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/cpp/flags.py", line 49, in FlagsForFile
    module = extra_conf_store.ModuleForSourceFile( filename )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/extra_conf_store.py", line 48, in ModuleForSourceFile
    return Load( ModuleFileForSourceFile( filename ) )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/extra_conf_store.py", line 59, in ModuleFileForSourceFile
    if Load( module_file ):
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/extra_conf_store.py", line 134, in Load
    if not _ShouldLoad( module_file ):
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/extra_conf_store.py", line 117, in _ShouldLoad
    raise UnknownExtraConf( module_file )
UnknownExtraConf: Found /Users/sixtynorth/projects/boost_python_exception/.ycm_extra_conf.py. Load? 

Disable/improve semantic trigger for ft=vim

Given that you cannot change/disable the default triggers (#33), I propose to improve/fix the default for Vim.

Semantic completion (via syntaxcomplete in my case) is rather slow, and it's annoying that it gets triggered when e.g. adding a dot at the end of some comment.

I haven't run in a use case where semantic completion with Vim makes sense (can you provide one?), and therefore propose to not use/configure it by default.

FWIW, I am now using the following (yes, it's meant to overwrite the default):

let g:ycm_filetype_specific_completion_to_disable = {
    \ 'vim': 1,
    \ }

"/event_notification" raises exception with empty file-types list

If I post to /event_notification with an empty filetypes field, the server raises an exception. This isn't a huge problem, and of course bottle keeps things alive, but I figured I'd let you know.

2014-09-03 08:57:40,900 - DEBUG - Event name: FileReadyToParse
Traceback (most recent call last):
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/handlers.py", line 64, in EventNotification
    getattr( SERVER_STATE.GetGeneralCompleter(), event_handler )( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/general/general_completer_store.py", line 90, in OnFileReadyToParse
    completer.OnFileReadyToParse( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/all/identifier_completer.py", line 153, in OnFileReadyToParse
    self.AddBufferIdentifiers( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/all/identifier_completer.py", line 97, in AddBufferIdentifiers
    filetype = request_data[ 'filetypes' ][ 0 ]
TypeError: 'NoneType' object has no attribute '__getitem__'

Redundant libclang.so file with -DUSE_SYSTEM_LIBCLANG=1

When I specify -DUSE_SYSTEM_LIBCLANG=1 to cmake, the resulting files have the following dependencies:

$ ldd ycm_core.so
linux-vdso.so.1 (0x00007ffff7d98000)
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007f9e9caf9000)
libclang.so => /usr/lib/libclang.so (0x00007f9e9bbc4000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f9e9b8b5000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f9e9b5af000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f9e9b399000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f9e9aff6000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f9e9add8000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f9e9abd4000)
libutil.so.1 => /usr/lib/libutil.so.1 (0x00007f9e9a9d1000)
libLLVM-3.6.so => /usr/lib/libLLVM-3.6.so (0x00007f9e9878b000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f9e9d28b000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f9e98575000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f9e9836b000)
libedit.so.0 => /usr/lib/libedit.so.0 (0x00007f9e9812f000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007f9e97eca000)
$ ldd ycm_client_support.so
linux-vdso.so.1 (0x00007ffc54fbf000)
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007fa710882000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa710573000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fa71026e000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fa710057000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fa70fcb4000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fa70fa97000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fa70f892000)
libutil.so.1 => /usr/lib/libutil.so.1 (0x00007fa70f68f000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007fa710f33000)

Does that mean there's no need to copy libclang.so in this line if -DUSE_SYSTEM_LIBCLANG=1 specified?

Issues with system boost

Hi,
I'm a Gentoo maintainer and I tried to perform boost unbundling from ycmd, but I get test failures after I compile ycmd with system boost:

[==========] Running 61 tests from 10 test cases.
[----------] Global test environment set-up.
[----------] 1 test from LetterBitsetFromStringTest
[ RUN      ] LetterBitsetFromStringTest.Basic
[       OK ] LetterBitsetFromStringTest.Basic (0 ms)
[----------] 1 test from LetterBitsetFromStringTest (0 ms total)

[----------] 1 test from IsUppercaseTest
[ RUN      ] IsUppercaseTest.Basic
[       OK ] IsUppercaseTest.Basic (0 ms)
[----------] 1 test from IsUppercaseTest (0 ms total)

[----------] 1 test from IndexForCharTest
[ RUN      ] IndexForCharTest.Basic
[       OK ] IndexForCharTest.Basic (0 ms)
[----------] 1 test from IndexForCharTest (0 ms total)

[----------] 9 tests from IdentifierUtilsTest
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextComments
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextComments (1 ms)
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextSimpleStrings
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextSimpleStrings (0 ms)
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextEscapedQuotesInStrings
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextEscapedQuotesInStrings (0 ms)
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextEscapedSlashesInStrings
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextEscapedSlashesInStrings (0 ms)
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextEscapedQuotesStartStrings
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextEscapedQuotesStartStrings (0 ms)
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextNoMultilineString
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextNoMultilineString (0 ms)
[ RUN      ] IdentifierUtilsTest.RemoveIdentifierFreeTextPythonMultilineString
[       OK ] IdentifierUtilsTest.RemoveIdentifierFreeTextPythonMultilineString (0 ms)
[ RUN      ] IdentifierUtilsTest.ExtractIdentifiersFromTextWorks
[       OK ] IdentifierUtilsTest.ExtractIdentifiersFromTextWorks (0 ms)
[ RUN      ] IdentifierUtilsTest.ExtractIdentifiersFromTagsFileWorks
/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/ycm/tests/IdentifierUtils_test.cpp:223: Failure
Value of: ExtractIdentifiersFromTagsFile( testfile )
Expected: equals { ("c", { ("/foo/goo maa", { "!goo" }), ("/foo/zoo", { "Floo::goo" }) }), ("cpp", { ("/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/build/testdata/bar", { "i1", "fooaaa" }), ("/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/build/testdata/foo", { "i1", "foosy" }) }), ("cs", { ("/m_oo", { "#bleh" }) }) }
  Actual: {}, which doesn't have these expected elements: ("c", { ("/foo/goo maa", { "!goo" }), ("/foo/zoo", { "Floo::goo" }) }), ("cpp", { ("/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/build/testdata/bar", { "i1", "fooaaa" }), ("/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/build/testdata/foo", { "i1", "foosy" }) }), ("cs", { ("/m_oo", { "#bleh" }) })
[  FAILED  ] IdentifierUtilsTest.ExtractIdentifiersFromTagsFileWorks (0 ms)
[----------] 9 tests from IdentifierUtilsTest (1 ms total)

[----------] 16 tests from IdentifierCompleterTest
[ RUN      ] IdentifierCompleterTest.EmptyQueryNoResults
[       OK ] IdentifierCompleterTest.EmptyQueryNoResults (1 ms)
[ RUN      ] IdentifierCompleterTest.NoDuplicatesReturned
[       OK ] IdentifierCompleterTest.NoDuplicatesReturned (0 ms)
[ RUN      ] IdentifierCompleterTest.OneCandidate
[       OK ] IdentifierCompleterTest.OneCandidate (0 ms)
[ RUN      ] IdentifierCompleterTest.ManyCandidateSimple
[       OK ] IdentifierCompleterTest.ManyCandidateSimple (0 ms)
[ RUN      ] IdentifierCompleterTest.SmartCaseFiltering
[       OK ] IdentifierCompleterTest.SmartCaseFiltering (0 ms)
[ RUN      ] IdentifierCompleterTest.FirstCharSameAsQueryWins
[       OK ] IdentifierCompleterTest.FirstCharSameAsQueryWins (0 ms)
[ RUN      ] IdentifierCompleterTest.CompleteMatchForWordBoundaryCharsWins
[       OK ] IdentifierCompleterTest.CompleteMatchForWordBoundaryCharsWins (0 ms)
[ RUN      ] IdentifierCompleterTest.RatioUtilizationTieBreak
[       OK ] IdentifierCompleterTest.RatioUtilizationTieBreak (0 ms)
[ RUN      ] IdentifierCompleterTest.QueryPrefixOfCandidateWins
[       OK ] IdentifierCompleterTest.QueryPrefixOfCandidateWins (0 ms)
[ RUN      ] IdentifierCompleterTest.LowerMatchCharIndexSumWins
[       OK ] IdentifierCompleterTest.LowerMatchCharIndexSumWins (0 ms)
[ RUN      ] IdentifierCompleterTest.ShorterCandidateWins
[       OK ] IdentifierCompleterTest.ShorterCandidateWins (0 ms)
[ RUN      ] IdentifierCompleterTest.SameLowercaseCandidateWins
[       OK ] IdentifierCompleterTest.SameLowercaseCandidateWins (1 ms)
[ RUN      ] IdentifierCompleterTest.PreferLowercaseCandidate
[       OK ] IdentifierCompleterTest.PreferLowercaseCandidate (0 ms)
[ RUN      ] IdentifierCompleterTest.ShorterAndLowercaseWins
[       OK ] IdentifierCompleterTest.ShorterAndLowercaseWins (0 ms)
[ RUN      ] IdentifierCompleterTest.AddIdentifiersToDatabaseFromBufferWorks
[       OK ] IdentifierCompleterTest.AddIdentifiersToDatabaseFromBufferWorks (0 ms)
[ RUN      ] IdentifierCompleterTest.TagsEndToEndWorks
/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/ycm/tests/IdentifierCompleter_test.cpp:259: Failure
Value of: completer.CandidatesForQueryAndType( "fo", "cpp" )
Expected: has 2 elements where
element #0 is equal to "foosy",
element #1 is equal to "fooaaa"
  Actual: {}
[  FAILED  ] IdentifierCompleterTest.TagsEndToEndWorks (0 ms)
[----------] 16 tests from IdentifierCompleterTest (2 ms total)

[----------] 4 tests from TranslationUnitTest
[ RUN      ] TranslationUnitTest.ExceptionThrownOnParseFailure
[       OK ] TranslationUnitTest.ExceptionThrownOnParseFailure (10 ms)
[ RUN      ] TranslationUnitTest.GoToDefinitionWorks
unknown file: Failure
C++ exception with description "std::exception" thrown in the test body.
[  FAILED  ] TranslationUnitTest.GoToDefinitionWorks (13 ms)
[ RUN      ] TranslationUnitTest.GoToDefinitionFails
unknown file: Failure
C++ exception with description "std::exception" thrown in the test body.
[  FAILED  ] TranslationUnitTest.GoToDefinitionFails (1 ms)
[ RUN      ] TranslationUnitTest.GoToDeclarationWorks
unknown file: Failure
C++ exception with description "std::exception" thrown in the test body.
[  FAILED  ] TranslationUnitTest.GoToDeclarationWorks (2 ms)
[----------] 4 tests from TranslationUnitTest (27 ms total)

[----------] 2 tests from ClangCompleterTest
[ RUN      ] ClangCompleterTest.CandidatesForLocationInFile
/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/ycm/tests/ClangCompleter/ClangCompleter_test.cpp:42: Failure
Value of: !completions.empty()
  Actual: false
Expected: true
[  FAILED  ] ClangCompleterTest.CandidatesForLocationInFile (1 ms)
[ RUN      ] ClangCompleterTest.GetDefinitionLocation
/var/tmp/portage/app-vim/youcompleteme-99999999/work/youcompleteme-99999999/third_party/ycmd/cpp/ycm/tests/ClangCompleter/ClangCompleter_test.cpp:60: Failure
Value of: actual_location
  Actual: 16-byte object <00-00 00-00 00-00 00-00 78-37 6C-00 00-00 00-00>
Expected: Location( filename, 1, 8 )
Which is: 16-byte object <01-00 00-00 08-00 00-00 28-EA 6F-01 00-00 00-00>
[  FAILED  ] ClangCompleterTest.GetDefinitionLocation (2 ms)
[----------] 2 tests from ClangCompleterTest (3 ms total)

[----------] 18 tests from GetWordBoundaryCharsTest
[ RUN      ] GetWordBoundaryCharsTest.SimpleOneWord
[       OK ] GetWordBoundaryCharsTest.SimpleOneWord (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UnderscoreInMiddle
[       OK ] GetWordBoundaryCharsTest.UnderscoreInMiddle (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UnderscoreStart
[       OK ] GetWordBoundaryCharsTest.UnderscoreStart (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.ManyUnderscoreStart
[       OK ] GetWordBoundaryCharsTest.ManyUnderscoreStart (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UnderscoreStartAndInMiddle
[       OK ] GetWordBoundaryCharsTest.UnderscoreStartAndInMiddle (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.ManyUnderscoreStartAndInMiddle
[       OK ] GetWordBoundaryCharsTest.ManyUnderscoreStartAndInMiddle (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.SimpleCapitalStart
[       OK ] GetWordBoundaryCharsTest.SimpleCapitalStart (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.SimpleCapitalTwoWord
[       OK ] GetWordBoundaryCharsTest.SimpleCapitalTwoWord (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.SimpleCapitalTwoWordUnderscoreMiddle
[       OK ] GetWordBoundaryCharsTest.SimpleCapitalTwoWordUnderscoreMiddle (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.JavaCase
[       OK ] GetWordBoundaryCharsTest.JavaCase (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UppercaseSequence
[       OK ] GetWordBoundaryCharsTest.UppercaseSequence (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UppercaseSequenceInMiddle
[       OK ] GetWordBoundaryCharsTest.UppercaseSequenceInMiddle (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UppercaseSequenceInMiddleUnderscore
[       OK ] GetWordBoundaryCharsTest.UppercaseSequenceInMiddleUnderscore (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.UppercaseSequenceInMiddleUnderscoreLowercase
[       OK ] GetWordBoundaryCharsTest.UppercaseSequenceInMiddleUnderscoreLowercase (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.AllCapsSimple
[       OK ] GetWordBoundaryCharsTest.AllCapsSimple (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.AllCapsUnderscoreStart
[       OK ] GetWordBoundaryCharsTest.AllCapsUnderscoreStart (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.AllCapsUnderscoreMiddle
[       OK ] GetWordBoundaryCharsTest.AllCapsUnderscoreMiddle (0 ms)
[ RUN      ] GetWordBoundaryCharsTest.AllCapsUnderscoreMiddleAndStart
[       OK ] GetWordBoundaryCharsTest.AllCapsUnderscoreMiddleAndStart (0 ms)
[----------] 18 tests from GetWordBoundaryCharsTest (0 ms total)

[----------] 7 tests from CandidateTest
[ RUN      ] CandidateTest.TextValid
[       OK ] CandidateTest.TextValid (0 ms)
[ RUN      ] CandidateTest.MatchesQueryBitsetWhenMatch
[       OK ] CandidateTest.MatchesQueryBitsetWhenMatch (0 ms)
[ RUN      ] CandidateTest.DoesntMatchQueryBitset
[       OK ] CandidateTest.DoesntMatchQueryBitset (0 ms)
[ RUN      ] CandidateTest.QueryMatchResultCaseInsensitiveIsSubsequence
[       OK ] CandidateTest.QueryMatchResultCaseInsensitiveIsSubsequence (0 ms)
[ RUN      ] CandidateTest.QueryMatchResultCaseInsensitiveIsntSubsequence
[       OK ] CandidateTest.QueryMatchResultCaseInsensitiveIsntSubsequence (0 ms)
[ RUN      ] CandidateTest.QueryMatchResultCaseSensitiveIsSubsequence
[       OK ] CandidateTest.QueryMatchResultCaseSensitiveIsSubsequence (0 ms)
[ RUN      ] CandidateTest.QueryMatchResultCaseSensitiveIsntSubsequence
[       OK ] CandidateTest.QueryMatchResultCaseSensitiveIsntSubsequence (0 ms)
[----------] 7 tests from CandidateTest (1 ms total)

[----------] 2 tests from CandidateRepositoryTest
[ RUN      ] CandidateRepositoryTest.EmptyCandidatesForUnicode
[       OK ] CandidateRepositoryTest.EmptyCandidatesForUnicode (0 ms)
[ RUN      ] CandidateRepositoryTest.EmptyCandidatesForNonPrintable
[       OK ] CandidateRepositoryTest.EmptyCandidatesForNonPrintable (0 ms)
[----------] 2 tests from CandidateRepositoryTest (0 ms total)

[----------] Global test environment tear-down
[==========] 61 tests from 10 test cases ran. (34 ms total)
[  PASSED  ] 54 tests.
[  FAILED  ] 7 tests, listed below:
[  FAILED  ] IdentifierUtilsTest.ExtractIdentifiersFromTagsFileWorks
[  FAILED  ] IdentifierCompleterTest.TagsEndToEndWorks
[  FAILED  ] TranslationUnitTest.GoToDefinitionWorks
[  FAILED  ] TranslationUnitTest.GoToDefinitionFails
[  FAILED  ] TranslationUnitTest.GoToDeclarationWorks
[  FAILED  ] ClangCompleterTest.CandidatesForLocationInFile
[  FAILED  ] ClangCompleterTest.GetDefinitionLocation

 7 FAILED TESTS

My boost version is 1.55.0. I'd really appreciate if you look into this and help me fix tests. When we are done, I will make a patch for optional system boost, like existing -DUSE_SYSTEM_LIBCLANG cmake option. I'm willing to provide any additional info and help you need.

Fuzzy matching for clang completions?

In working on the emacs client, I've been asked if fuzzy completion will work. As I understand it, with a function like this:

int add_two_numbers(int x, int y)  { return x + y; }

I might expect this:

atnu

to generate fuzzy completion to the add_two_numbers function.
From what I can tell, this kind of completion doesn't happen right now, but perhaps I'm doing something wrong. So should I expect this to work? And if so, is there any sort of configuration or special invocation I need to do to enable it?

UnicodeEncodeError in filename completion

When using filename completion for a directory including utf8 filename, like bürokratie, the following error is shown:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128)

The completion however pops up and contains the entries, but when typing the first char of some entry, it gets closed.

The error does not seem to happen with a single-char entry like ü, so it's probably related to some code that handles matching entries.

Traceback (most recent call last):
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 100, in GetCompletions
    completer.ComputeCandidates( request_data ),
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/general/general_completer_store.py", line 83, in ComputeCandidates
    candidates += completer.ComputeCandidates( request_data )
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 161, in ComputeCandidates
    request_data[ 'query' ] )
  File "…/vim/neobundles/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 216, in FilterAndSortCandidates
    ToUtf8IfNeeded( query ) )
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

Code reference: https://github.com/blueyed/ycmd/blob/master/ycmd/completers/completer.py#L214-216

The error seems a bit weird, because it appears to happen with the statement itself, and not e.g. inside the ToUtf8IfNeeded function?!

Java backend

Is there a plan to add support for Java in ycmd?

had to symlink some libs on Arch Linux

On Arch Linux, I had to do

$ ln -s /usr/lib/libncurses.so.5 libtinfo.so.5
$ ln -s /usr/lib/libedit.so libedit.so.2 

to get it running. Maybe this could go in a readme (or ideally ycmd would find the right files, though I don't know how hard that is).

Documentation typo

In the documentation on the front page look at the sentence:

Pass the path to the modified settings file to ycmd as an --options-file=/path/to/file flag

I believe it's --options_file not --options-file

generalize .ycm_extra_conf.py

I was looking around ycmd code and I was getting a bunch of error because clang couldn't find standard header file.

The output of :YcmDebugInfo is

Printing YouCompleteMe debug information...
-- Server has Clang support compiled in: True
-- Clang version: clang version 3.5.0 (tags/RELEASE_350/final)
-- Flags for /Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/Utils.cpp loaded from /Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
/ycm/.ycm_extra_conf.py:
-- ['-Wall', '-Wextra', '-Werror', '-Wc++98-compat', '-Wno-long-long', '-Wno-variadic-macros', '-fexceptions', '-DNDEBUG', '-DUSE_CLANG_COMPLETER', '-std=c++1
1', '-x', 'c++', '-isystem', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/../BoostParts', '-isystem', '/System/Library/Frameworks/Python.f
ramework/Headers', '-isystem', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/../llvm/include', '-isystem', '/Users/vheon/.vim/bundle/YouCom
pleteMe/third_party/ycmd/cpp/ycm/../llvm/tools/clang/include', '-I', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.', '-I', '/Users/vheon/
.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/./ClangCompleter', '-isystem', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/./tests/gmo
ck/gtest', '-isystem', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/./tests/gmock/gtest/include', '-isystem', '/Users/vheon/.vim/bundle/Yo
uCompleteMe/third_party/ycmd/cpp/ycm/./tests/gmock', '-isystem', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/./tests/gmock/include', '-is
ystem', '/usr/include', '-isystem', '/usr/local/include', '-isystem', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
../include/c++/v1', '-isystem', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '-isystem', '/Users/vheon/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../clang_includes']
-- Server running at: http://127.0.0.1:52308
-- Server process ID: 82220
-- Server logfiles:
--   /var/folders/fv/h6qjtq2n4k9dmhgf4r_k__0r0000gn/T/ycm_temp/server_52308_stdout.log
--   /var/folders/fv/h6qjtq2n4k9dmhgf4r_k__0r0000gn/T/ycm_temp/server_52308_stderr.log

But apparently I don't have the include file there. Lately I update my global ycm_extra_conf.py similarly to this one: https://gist.github.com/cpradog/aad88d51001ea83ecfc6. What do you think about doing something like that for the ycmd repo?

Username and password required when start ycmd

I use emacs together with ycmd and they work very well before.
But today when I restart emacs and open a .cpp file, this message shows in the minibuffer and ycmd can't work properlly:
Username [for http://127.0.0.1:53167/healthy]:
Here is the content of buffer ycmd-server

2015-04-23 15:13:04,017 - DEBUG - Global extra conf not loaded or no function YcmCorePreload
serving on http://127.0.0.1:53167
2015-04-23 15:13:04,230 - INFO - Dropping request with bad HMAC.
2015-04-23 15:13:34,028 - INFO - Dropping request with bad HMAC.
2015-04-23 15:14:04,032 - INFO - Dropping request with bad HMAC.
2015-04-23 15:14:34,032 - INFO - Dropping request with bad HMAC.
2015-04-23 15:15:04,032 - INFO - Dropping request with bad HMAC.
2015-04-23 15:15:34,032 - INFO - Dropping request with bad HMAC.
2015-04-23 15:16:04,032 - INFO - Dropping request with bad HMAC.
2015-04-23 15:16:34,029 - INFO - Dropping request with bad HMAC.

Compile under cygwin

Hi,

I managed to compile clang under cygwin (3.5) but it seems not to work correctly. I have a libclang, but there are some more libclang* archives and i have a cygclang.dll. But if using system-clang there are a lot of missing functions/classes during the link process.

Any suggestions how to proceed here?

ycmd not finding C++ headers even when compilation-database is used

When ycmd compiles my C++ files during file-ready notification, the compiler somehow isn't finding all of the headers, including standard headers. I'm using a compilation database, and the commands in there are all correct (i.e. they do the compilation just fine when I run them manually.) This is on OS X.

Something as simple as #include <string> is failing because the compiler can't find string. I know there have been problems in the past where folks weren't setting the flags in .ycm_extra_conf.py correctly, but, again, as far as I can tell my compile-database is correct, and I've verified that it's being used.

My best guess is that the environment in which ycmd is running the compilation somehow isn't configured to see the headers. But even that seems unlikely since I've gone so far as to hard-code the env argument of subprocess.Popen() to exactly the environment of my shell (in which the compilation works fine.)

I'm at a bit of a loss, so any ideas would be great.

libclang: crash detected during parsing

Found with emacs-ycmd - abingham/emacs-ycmd#166

*ycmd-server* buffer

2015-03-27 15:24:30,892 - INFO - Received completion request
 2015-03-27 15:24:30,892 - DEBUG - Using filetype completion: False
 2015-03-27 15:24:31,222 - INFO - Received completion request
 2015-03-27 15:24:31,223 - DEBUG - Using filetype completion: False
 2015-03-27 15:24:31,251 - INFO - Received completion request
 2015-03-27 15:24:31,253 - DEBUG - Using filetype completion: False
 2015-03-27 15:24:32,034 - INFO - Received completion request
 2015-03-27 15:24:32,035 - DEBUG - Using filetype completion: True
 libclang: crash detected during parsing: {
   'source_filename' : '/local/mnt/workspace/naseer/LA.BF64.1/hardware/qcom/display/libhwcomposer/hwc.cpp'
   'command_line_args' : ['-Wall', '-Wextra', '-Wc++98-compat', '-Wno-long-long', '-Wno-variadic-macros', '-fexceptions', '-fno-rtti', '-fno-strict-aliasing', '-fPIE', '-fpic', '-DNDEBUG', '-DANDROID', '-DUSE_CLANG_COMPLETER', '-std=c++11'\
 , '-x c++', '-I/local/mnt/workspace/naseer/LA.BF64.1/ .', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libgralloc', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/l\
 iboverlay', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libhwcomposer', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libcopybit', '-I/local/mnt/workspace/naseer/\
 LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libqdutils', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libexternal', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/d\
 isplay/libqservice', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libvirtual', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libhdmi', '-isystem/local/mnt/workspac\
 e/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/system/core/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/libhardware/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/lib\
 hardware_legacy/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/ril/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/libnativehelper/include', '-isystem/local/mnt/workspace\
 /naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/arch-arm/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/k\
 ernel/common', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/kernel/arch-arm', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libstdc/include', '-isystem/local/mnt/workspace/nase\
 er/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libstdc/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libm/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libm/include/arm'\
 , '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libthread_db/include/', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/frameworks/native/include', '-isystem/local/mnt/workspace/naseer/LA.BF6\
 4.1/ $ANDROID_BUILD_TOP/frameworks/native/opengl/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/frameworks/av/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/frameworks/base/inclu\
 de', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/out/target/product/$TARGET_PRODUCT/obj/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/\
 usr/include', '-isystem', '/local/mnt/workspace/naseer/installs/ycmd/ycmd/../clang_includes'],
   'unsaved_files' : [('/local/mnt/workspace/naseer/LA.BF64.1/hardware/qcom/display/libhwcomposer/hwc.cpp', '...', 37243)],
   'options' : 143,
 }
 Traceback (most recent call last):
   File "/local/mnt/workspace/naseer/installs/ycmd/third_party/bottle/bottle.py", line 861, in _handle
     return route.call(**args)
   File "/local/mnt/workspace/naseer/installs/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
     rv = callback(*a, **ka)
   File "/local/mnt/workspace/naseer/installs/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
     return callback( *args, **kwargs )
   File "/local/mnt/workspace/naseer/installs/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
     body = callback( *args, **kwargs )
   File "/local/mnt/workspace/naseer/installs/ycmd/ycmd/../ycmd/handlers.py", line 100, in GetCompletions
     completer.ComputeCandidates( request_data ),
   File "/local/mnt/workspace/naseer/installs/ycmd/ycmd/../ycmd/completers/completer.py", line 158, in ComputeCandidates
     candidates = self._GetCandidatesFromSubclass( request_data )
   File "/local/mnt/workspace/naseer/installs/ycmd/ycmd/../ycmd/completers/completer.py", line 173, in _GetCandidatesFromSubclass
     raw_completions = self.ComputeCandidatesInner( request_data )
   File "/local/mnt/workspace/naseer/installs/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 101, in ComputeCandidatesInner
     raise RuntimeError( NO_COMPLETIONS_MESSAGE )
 RuntimeError: No completions found; errors in the file?
 2015-03-27 15:24:34,267 - INFO - Received event notification
 2015-03-27 15:24:34,268 - DEBUG - Event name: FileReadyToParse
 2015-03-27 15:24:34,268 - INFO - Adding buffer identifiers for file: /local/mnt/workspace/naseer/LA.BF64.1/hardware/qcom/display/libhwcomposer/hwc.cpp
 libclang: crash detected during parsing: {
   'source_filename' : '/local/mnt/workspace/naseer/LA.BF64.1/hardware/qcom/display/libhwcomposer/hwc.cpp'
   'command_line_args' : ['-Wall', '-Wextra', '-Wc++98-compat', '-Wno-long-long', '-Wno-variadic-macros', '-fexceptions', '-fno-rtti', '-fno-strict-aliasing', '-fPIE', '-fpic', '-DNDEBUG', '-DANDROID', '-DUSE_CLANG_COMPLETER', '-std=c++11'\
 , '-x c++', '-I/local/mnt/workspace/naseer/LA.BF64.1/ .', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libgralloc', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/l\
 iboverlay', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libhwcomposer', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libcopybit', '-I/local/mnt/workspace/naseer/\
 LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libqdutils', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libexternal', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/d\
 isplay/libqservice', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libvirtual', '-I/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/qcom/display/libhdmi', '-isystem/local/mnt/workspac\
 e/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/system/core/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/libhardware/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/lib\
 hardware_legacy/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/hardware/ril/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/libnativehelper/include', '-isystem/local/mnt/workspace\
 /naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/arch-arm/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/k\
 ernel/common', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libc/kernel/arch-arm', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libstdc/include', '-isystem/local/mnt/workspace/nase\
 er/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libstdc/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libm/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libm/include/arm'\
 , '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/bionic/libthread_db/include/', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/frameworks/native/include', '-isystem/local/mnt/workspace/naseer/LA.BF6\
 4.1/ $ANDROID_BUILD_TOP/frameworks/native/opengl/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/frameworks/av/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/frameworks/base/inclu\
 de', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/out/target/product/$TARGET_PRODUCT/obj/include', '-isystem/local/mnt/workspace/naseer/LA.BF64.1/ $ANDROID_BUILD_TOP/out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/\
 usr/include', '-isystem', '/local/mnt/workspace/naseer/installs/ycmd/ycmd/../clang_includes'],
   'unsaved_files' : [('/local/mnt/workspace/naseer/LA.BF64.1/hardware/qcom/display/libhwcomposer/hwc.cpp', '...', 37243)],
   'options' : 143,
 }

Versionized release

Any plan to release ycmd with version? It can be helpful for packaged distribution.

If so, I'm willing to help to create a Homebrew formula for it.

Retry completion once parsing completes

It appears that some of the completers (jedi and clang that I know of) will throw an exception if a completion request comes while parsing is taking place. We see error output like this:

2014-11-01 15:00:06,626 - INFO - Received event notification
2014-11-01 15:00:06,627 - DEBUG - Event name: FileReadyToParse
2014-11-01 15:00:06,627 - INFO - Adding buffer identifiers for file: /Users/sixtynorth/projects/boost_python_exception/src/boost_python_exception/extract_exception_details.cpp
2014-11-01 15:00:07,170 - INFO - Received completion request
2014-11-01 15:00:07,171 - DEBUG - Using filetype completion: True
Traceback (most recent call last):
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/handlers.py", line 100, in GetCompletions
    completer.ComputeCandidates( request_data ),
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/completer.py", line 158, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/completer.py", line 173, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 81, in ComputeCandidatesInner
    raise RuntimeError( PARSING_FILE_MESSAGE )
RuntimeError: Still parsing file, no completions yet.

Would it be possible to have ycmd perform the completion after parsing finishes? Otherwise all of the clients will have to build in logic to deal with this situation, or else ignore it.

I can see arguments in favor of simply ignoring this state. Since parsing may take arbitrarily long, you may not want to make the user wait for the parse to get completion results, i.e. it may be better to simply tell them "parsing in progress. try again later."

build.sh: use python2 to get the version, look for `.so`, ...

With Python3 as default python, it appears that python-config points at Python2, but python at Python3.

The build.sh script should therefore use python2 explicitly when examining the version:
https://github.com/Valloric/ycmd/blob/master/build.sh#L41

which_python=$(python2 -c 'import sys;print(sys.version)' | sed 's/^[ \t]*//')

Apart from that, I wonder if it would not be possible to use the information provided from python-config only?! (python-config --lib and python-config --includes)

FWIW, I am not on "Darwin", but have enabled python_finder for Linux also, because CMake does not pick up the activated python (via pyenv) otherwise.

My changes/fixes are available blueyed@802e4da

About BoostParts build setup

Hello, my name is Manu Sánchez.

I'm currently working in a project related to dependencies management, and I want to integrate Boost libraries into it. The dependencies system is based on CMake. I'm a frequent user of YouCompleteMe, and during my last install I noticed that you have a CMake-based build toolchain for the Boost libraries you use on ycmd.

My question is: Are that cmake builds your own effort, or are based on some external project? After seeing them working I think they would be a good starting point for my job.

Thank you.

Location for emacs client code?

I've started poking around on some emacs client code for ycmd. Do you want that as an entirely separate git repository/project, or do you want to include clients with the ycmd source? Currently I've tucked it into an "elisp" directory at the top level of the ycmd repository, but of course I could put it anywhere you want, including a separate project.

Change HMAC calculation to improve security

Currently, the HMAC for requests and responses is calculated as HMAC(request/response body content). We want to change this to the following, where || stands for concatenation:

  • For client requests: HMAC(HMAC(body) || HMAC(http method) || HMAC(request path)). For example, HMAC(HMAC('foo') || HMAC('GET') || HMAC('/healthy'))
  • For server responses: HMAC(body), so same as before.

We're concatenating nested HMAC values since just doing HMAC(body || method || path) is insecure.

This change will make it harder to perform request replay attacks against ycmd. They currently don't pose a threat, but they might in the future. Also, they can be used as part of a more elaborate ycmd exploit.

This will require changing all the clients that talk to ycmd.

@abingham @Qusic This will probably happen in a few days.

Add endpoint for listing languages that support semantic completion

Currently the emacs-ycmd client hard codes a list of languages for which ycmd supports semantic completion. It would be a bit more future-proof if the client could request that list from ycmd whenever the server is started.

This is far from critical, just a nice-to-have.

Clang Assertion: TemplateIds.empty() && \"Still alive TemplateIdAnnotations around?\"

YCMD server is crashing with the following assertion when I try to edit an hpp file.

OS: Debian 7.4
Python - 2.7.3
Clang version: clang version 3.6.0

#0  0x00007f8652dd9475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007f8652dd9475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f8652ddc6f0 in *__GI_abort () at abort.c:92
#2  0x00007f8652dd2621 in *__GI___assert_fail (assertion=0x7f8650841190 "TemplateIds.empty() && \"Still alive TemplateIdAnnotations around?\"", file=<optimized out>, line=417, function=0x7f8650842200 "virtual clang::Parser::~Parser()") at assert.c:81
#3  0x00007f864ffd0230 in clang::Parser::~Parser() () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#4  0x00007f864ffd0239 in clang::Parser::~Parser() () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#5  0x00007f865071f021 in llvm::CrashRecoveryContext::~CrashRecoveryContext() () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#6  0x00007f864fd67e24 in clang_parseTranslationUnit2 () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#7  0x00007f864fd67e9a in clang_parseTranslationUnit () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#8  0x00007f86514c1f97 in YouCompleteMe::TranslationUnit::TranslationUnit(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#9  0x00007f86514c53dc in _ZN5boost11make_sharedIN13YouCompleteMe15TranslationUnitEJRKSsRKSt6vectorI11UnsavedFileSaIS6_EERKS5_ISsSaISsEERPvEEENS_6detail15sp_if_not_arrayIT_E4typeEDpOT0_ () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#10 0x00007f86514c4e0e in YouCompleteMe::TranslationUnitStore::GetOrCreate(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&, bool&) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#11 0x00007f86514c4fa2 in YouCompleteMe::TranslationUnitStore::GetOrCreate(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#12 0x00007f86514b8bf6 in YouCompleteMe::ClangCompleter::CandidatesForLocationInFile(std::string const&, int, int, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#13 0x00007f865150b0d1 in _object* boost::python::detail::invoke<boost::python::to_python_value<std::vector<YouCompleteMe::CompletionData, std::allocator<YouCompleteMe::CompletionData> > const&>, std::vector<YouCompleteMe::CompletionData, std::allocator<YouCompleteMe::CompletionData> > (YouCompleteMe::ClangCompleter::*)(std::string const&, int, int, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&), boost::python::arg_from_python<YouCompleteMe::ClangCompleter&>, boost::python::arg_from_python<std::string const&>, boost::python::arg_from_python<int>, boost::python::arg_from_python<int>, boost::python::arg_from_python<std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&>, boost::python::arg_from_python<std::vector<std::string, std::allocator<std::string> > const&> >(boost::python::detail::invoke_tag_<false, true>, boost::python::to_python_value<std::vector<YouCompleteMe::CompletionData, std::allocator<YouCompleteMe::CompletionData> > const&> const&, std::vector<YouCompleteMe::CompletionData, std::allocator<YouCompleteMe::CompletionData> > (YouCompleteMe::ClangCompleter::*&)(std::string const&, int, int, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&), boost::python::arg_from_python<YouCompleteMe::ClangCompleter&>&, boost::python::arg_from_python<std::string const&>&, boost::python::arg_from_python<int>&, boost::python::arg_from_python<int>&, boost::python::arg_from_python<std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&>&, boost::python::arg_from_python<std::vector<std::string, std::allocator<std::string> > const&>&) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#14 0x00007f865150b371 in boost::python::detail::caller_arity<6u>::impl<std::vector<YouCompleteMe::CompletionData, std::allocator<YouCompleteMe::CompletionData> > (YouCompleteMe::ClangCompleter::*)(std::string const&, int, int, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&), boost::python::default_call_policies, boost::mpl::vector7<std::vector<YouCompleteMe::CompletionData, std::allocator<YouCompleteMe::CompletionData> >, YouCompleteMe::ClangCompleter&, std::string const&, int, int, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&> >::operator()(_object*, _object*) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#15 0x00007f865151dd2b in boost::python::objects::function::call(_object*, _object*) const () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#16 0x00007f865151df48 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#17 0x00007f865151651b in boost::python::handle_exception_impl(boost::function0<void>) () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#18 0x00007f865151c205 in function_call () from /mathworks/home/phegde/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#19 0x00000000004aab70 in PyEval_EvalFrameEx ()
#20 0x00000000004aad10 in PyEval_EvalFrameEx ()
#21 0x00000000004aad10 in PyEval_EvalFrameEx ()
#22 0x00000000004aad10 in PyEval_EvalFrameEx ()
#23 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#24 0x00000000004b2b97 in ?? ()
#25 0x00000000004ac120 in PyEval_EvalFrameEx ()
#26 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#27 0x00000000004b2b97 in ?? ()
#28 0x00000000004ac120 in PyEval_EvalFrameEx ()
#29 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#30 0x00000000004b2b97 in ?? ()
#31 0x00000000004ac120 in PyEval_EvalFrameEx ()
#32 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#33 0x00000000004b2b97 in ?? ()
#34 0x00000000004ac120 in PyEval_EvalFrameEx ()
#35 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#36 0x00000000004aaa98 in PyEval_EvalFrameEx ()
#37 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#38 0x00000000004aaa98 in PyEval_EvalFrameEx ()
#39 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#40 0x00000000004b2a6c in ?? ()
#41 0x00000000004c4894 in ?? ()
#42 0x00000000004d99dc in ?? ()
#43 0x00000000004aab70 in PyEval_EvalFrameEx ()
#44 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#45 0x00000000004aaa98 in PyEval_EvalFrameEx ()
#46 0x00000000004aad10 in PyEval_EvalFrameEx ()
#47 0x00000000004aad10 in PyEval_EvalFrameEx ()
#48 0x00000000004b1ef8 in PyEval_EvalCodeEx ()
#49 0x00000000004b2a6c in ?? ()
#50 0x00000000004c4894 in ?? ()
#51 0x0000000000471ace in PyEval_CallObjectWithKeywords ()
#52 0x00000000004f8b18 in ?? ()
#53 0x00007f86539d8b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#54 0x00007f8652e830ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Add GoToReferences to Clang completer

I noticed ycmd returned variable completion proposals without their type, I think variable type hint is important. And can ycmd add the feature that finds out all locations an variable/function appears, so variable/function renaming can be implemented.

Doesn't support chinese characters

My file path has chinese characters, I see the error message in /tmp/ycm_temp/server_pid_stderr.log :

2014-08-02 20:04:45,047 - INFO - Received completion request                            
Traceback (most recent call last):                                                      
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)                                                           
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)                                                             
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )                                                  
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )                                                  
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 100, in GetCompletions
    completer.ComputeCandidates( request_data ),                                        
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/general/general_completer_store.py", line 78, in ComputeCandidates
    if not self.ShouldUseNow( request_data ):                                           
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/general/general_completer_store.py", line 61, in ShouldUseNow
    if self._filename_completer.ShouldUseNow( request_data ):                           
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 115, in ShouldUseNow
    if not self.ShouldUseNowInner( request_data ):                                      
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/general/filename_completer.py", line 73, in ShouldUseNowInner
    self.AtIncludeStatementStart( request_data ) ) )                                    
  File "/home/roketyyang/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/general/filename_completer.py", line 63, in AtIncludeStatementStart
    filetypes = request_data[ 'file_data' ][ filepath ][ 'filetypes' ]                  
KeyError: '/home/roketyyang/Work/Linux\xe9\xab\x98\xe6\x80\xa7\xe8\x83\xbd\xe6\x9c\x8d\xe5\x8a\xa1\xe5\x99\xa8\xe7\xbc\x96\xe7\xa8\x8b/backlog.c'

And this error cause ycm doen't work well, please fix it, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.