Updating README with ycmd info
Lots of things changed on the ycmd branch!
This commit is contained in:
parent
cb939dd8e2
commit
d35832da61
@ -44,14 +44,22 @@ Here are the things you should do when creating an issue:
|
|||||||
1. **Write a step-by-step procedure that when performed repeatedly reproduces
|
1. **Write a step-by-step procedure that when performed repeatedly reproduces
|
||||||
your issue.** If we can't reproduce the issue, then we can't fix it. It's
|
your issue.** If we can't reproduce the issue, then we can't fix it. It's
|
||||||
that simple.
|
that simple.
|
||||||
2. **Create a test case for your issue**. This is critical. Don't talk about how
|
2. Put the following options in your vimrc:
|
||||||
|
```
|
||||||
|
let g:ycm_server_use_vim_stdout = 1
|
||||||
|
let g:ycm_server_log_level = 'debug'
|
||||||
|
```
|
||||||
|
Then start gvim/macvim (not console vim) from the console. As you use Vim,
|
||||||
|
you'll see the `ycmd` debug output stream in the console. Attach that to you
|
||||||
|
issue.
|
||||||
|
3. **Create a test case for your issue**. This is critical. Don't talk about how
|
||||||
"when I have X in my file" or similar, _create a file with X in it_ and put
|
"when I have X in my file" or similar, _create a file with X in it_ and put
|
||||||
the contents inside code blocks in your issue description. Try to make this
|
the contents inside code blocks in your issue description. Try to make this
|
||||||
test file _as small as possible_. Don't just paste a huge, 500 line source
|
test file _as small as possible_. Don't just paste a huge, 500 line source
|
||||||
file you were editing and present that as a test. _Minimize_ the file so that
|
file you were editing and present that as a test. _Minimize_ the file so that
|
||||||
the problem is reproduced with the smallest possible amount of test data.
|
the problem is reproduced with the smallest possible amount of test data.
|
||||||
3. **Include your OS and OS version.**
|
4. **Include your OS and OS version.**
|
||||||
4. **Include the output of `vim --version`.**
|
5. **Include the output of `vim --version`.**
|
||||||
|
|
||||||
|
|
||||||
Creating good pull requests
|
Creating good pull requests
|
||||||
|
91
README.md
91
README.md
@ -89,8 +89,9 @@ local binary folder (for example `/usr/local/bin/mvim`) and then symlink it:
|
|||||||
Install YouCompleteMe with [Vundle][].
|
Install YouCompleteMe with [Vundle][].
|
||||||
|
|
||||||
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
|
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
|
||||||
using Vundle and the ycm_core library API has changed (happens rarely), YCM will
|
using Vundle and the ycm_support_libs library APIs have changed (happens
|
||||||
notify you to recompile it. You should then rerun the install process.
|
rarely), YCM will notify you to recompile it. You should then rerun the install
|
||||||
|
process.
|
||||||
|
|
||||||
It's recommended that you have the latest Xcode installed along with the latest
|
It's recommended that you have the latest Xcode installed along with the latest
|
||||||
Command Line Tools (that you install from within Xcode).
|
Command Line Tools (that you install from within Xcode).
|
||||||
@ -136,8 +137,9 @@ from source][vim-build] (don't worry, it's easy).
|
|||||||
Install YouCompleteMe with [Vundle][].
|
Install YouCompleteMe with [Vundle][].
|
||||||
|
|
||||||
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
|
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
|
||||||
using Vundle and the ycm_core library API has changed (happens rarely), YCM will
|
using Vundle and the ycm_support_libs library APIs have changed (happens
|
||||||
notify you to recompile it. You should then rerun the install process.
|
rarely), YCM will notify you to recompile it. You should then rerun the install
|
||||||
|
process.
|
||||||
|
|
||||||
Install development tools and CMake: `sudo apt-get install build-essential cmake`
|
Install development tools and CMake: `sudo apt-get install build-essential cmake`
|
||||||
|
|
||||||
@ -184,8 +186,9 @@ that platform).
|
|||||||
See the _FAQ_ if you have any issues.
|
See the _FAQ_ if you have any issues.
|
||||||
|
|
||||||
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
|
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
|
||||||
using Vundle and the ycm_core library API has changed (happens rarely), YCM will
|
using Vundle and the ycm_support_libs library APIs have changed (happens
|
||||||
notify you to recompile it. You should then rerun the install process.
|
rarely), YCM will notify you to recompile it. You should then rerun the install
|
||||||
|
process.
|
||||||
|
|
||||||
**Please follow the instructions carefully. Read EVERY WORD.**
|
**Please follow the instructions carefully. Read EVERY WORD.**
|
||||||
|
|
||||||
@ -221,8 +224,8 @@ notify you to recompile it. You should then rerun the install process.
|
|||||||
binaries from llvm.org][clang-download] if at all possible. Make sure you
|
binaries from llvm.org][clang-download] if at all possible. Make sure you
|
||||||
download the correct archive file for your OS.
|
download the correct archive file for your OS.
|
||||||
|
|
||||||
4. **Compile the `ycm_core` plugin plugin** (ha!) that YCM needs. This is the
|
4. **Compile the `ycm_support_libs` libraries** that YCM needs. These libs
|
||||||
C++ engine that YCM uses to get fast completions.
|
are the C++ engines that YCM uses to get fast completions.
|
||||||
|
|
||||||
You will need to have `cmake` installed in order to generate the required
|
You will need to have `cmake` installed in order to generate the required
|
||||||
makefiles. Linux users can install cmake with their package manager (`sudo
|
makefiles. Linux users can install cmake with their package manager (`sudo
|
||||||
@ -261,7 +264,7 @@ notify you to recompile it. You should then rerun the install process.
|
|||||||
|
|
||||||
Now that makefiles have been generated, simply run:
|
Now that makefiles have been generated, simply run:
|
||||||
|
|
||||||
make ycm_core
|
make ycm_support_libs
|
||||||
|
|
||||||
For those who want to use the system version of libclang, you would pass
|
For those who want to use the system version of libclang, you would pass
|
||||||
`-DUSE_SYSTEM_LIBCLANG=ON` to cmake _instead of_ the
|
`-DUSE_SYSTEM_LIBCLANG=ON` to cmake _instead of_ the
|
||||||
@ -323,6 +326,13 @@ YCM automatically detects which completion engine would be the best in any
|
|||||||
situation. On occasion, it queries several of them at once, merges the
|
situation. On occasion, it queries several of them at once, merges the
|
||||||
outputs and presents the results to you.
|
outputs and presents the results to you.
|
||||||
|
|
||||||
|
### Client-server architecture
|
||||||
|
|
||||||
|
YCM has a client-server architecture; the Vim part of YCM is only a thin client
|
||||||
|
that talks to the `ycmd` HTTP+JSON server that has the vast majority of YCM
|
||||||
|
logic and functionality. The server is started and stopped automatically as you
|
||||||
|
start and stop Vim.
|
||||||
|
|
||||||
### Completion string ranking
|
### Completion string ranking
|
||||||
|
|
||||||
The subsequence filter removes any completions that do not match the input, but
|
The subsequence filter removes any completions that do not match the input, but
|
||||||
@ -498,6 +508,11 @@ yours truly.
|
|||||||
Commands
|
Commands
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
### The `:YcmRestartServer` command
|
||||||
|
|
||||||
|
If the `ycmd` completion server suddenly stops for some reason, you can restart
|
||||||
|
it with this command.
|
||||||
|
|
||||||
### The `:YcmForceCompileAndDiagnostics` command
|
### The `:YcmForceCompileAndDiagnostics` command
|
||||||
|
|
||||||
Calling this command will force YCM to immediately recompile your file
|
Calling this command will force YCM to immediately recompile your file
|
||||||
@ -832,6 +847,64 @@ Default: `0`
|
|||||||
|
|
||||||
let g:ycm_seed_identifiers_with_syntax = 0
|
let g:ycm_seed_identifiers_with_syntax = 0
|
||||||
|
|
||||||
|
### The `g:ycm_server_use_vim_stdout` option
|
||||||
|
|
||||||
|
By default, the `ycmd` completion server writes logs to logfiles. When this
|
||||||
|
option is set to `1`, the server writes logs to Vim's stdout (so you'll see them
|
||||||
|
in the console).
|
||||||
|
|
||||||
|
Default: `0`
|
||||||
|
|
||||||
|
let g:ycm_server_use_vim_stdout = 0
|
||||||
|
|
||||||
|
### The `g:ycm_server_keep_logfiles` option
|
||||||
|
|
||||||
|
When this option is set to `1`, the `ycmd` completion server will keep the
|
||||||
|
logfiles around after shutting down (they are deleted on shutdown by default).
|
||||||
|
|
||||||
|
To see where the logfiles are, call `:YcmDebugInfo`.
|
||||||
|
|
||||||
|
Default: `0`
|
||||||
|
|
||||||
|
let g:ycm_server_keep_logfiles = 0
|
||||||
|
|
||||||
|
### The `g:ycm_server_log_level` option
|
||||||
|
|
||||||
|
The logging level that the `ycmd` completion server uses. Valid values are the
|
||||||
|
following, from most verbose to least verbose:
|
||||||
|
- `debug`
|
||||||
|
- `info`
|
||||||
|
- `warning`
|
||||||
|
- `error`
|
||||||
|
- `critical`
|
||||||
|
|
||||||
|
Note that `debug` is _very_ verbose.
|
||||||
|
|
||||||
|
Default: `info`
|
||||||
|
|
||||||
|
let g:ycm_server_log_level = 'info'
|
||||||
|
|
||||||
|
### The `g:ycm_server_idle_suicide_seconds` option
|
||||||
|
|
||||||
|
This option sets the number of seconds of `ycmd` server idleness (no requests
|
||||||
|
received) after which the server stops itself. NOTE: the YCM Vim client sends a
|
||||||
|
shutdown request to the server when Vim is shutting down.
|
||||||
|
|
||||||
|
If your Vim crashes for instance, `ycmd` never gets the shutdown command and
|
||||||
|
becomes a zombie process. This option prevents such zombies from sticking around
|
||||||
|
forever.
|
||||||
|
|
||||||
|
The default option is `43200` seconds which is 12 hours. The reason for the
|
||||||
|
interval being this long is to prevent the server from shutting down if you
|
||||||
|
leave your computer (and Vim) turned on during the night.
|
||||||
|
|
||||||
|
The server "heartbeat" that checks whether this interval has passed occurs every
|
||||||
|
10 minutes.
|
||||||
|
|
||||||
|
Default: `43200`
|
||||||
|
|
||||||
|
let g:ycm_server_idle_suicide_seconds = 43200
|
||||||
|
|
||||||
### The `g:ycm_csharp_server_port` option
|
### The `g:ycm_csharp_server_port` option
|
||||||
|
|
||||||
The port number (on `localhost`) on which the OmniSharp server should be
|
The port number (on `localhost`) on which the OmniSharp server should be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user