[READY] Update docs to represent new use_clangd flag
After merge of Valloric/ycmd#1191, `use_clangd` option has changed to binary, this patch updates docs to represent that change.
Needs to be merged after `third_party/ycmd` is updated to contain that PR.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3325)
<!-- Reviewable:end -->
Include the following changes:
- trigger semantic completion when instructed by server;
- simplify LSP completer API for starting server;
- improve Clangd completer initialization;
- ease Clangd completer initialization;
- fix system header search paths on macOS for Objective-C++;
- update Jedi to 0.13.3 and Parso to 0.3.4;
- ignore identifiers returned by TSServer in JavaScript;
- update TSServer to 3.3.3333;
- support -B flag in C-family languages.
[READY] Ensure only loclist or quickfix windows are closed
Fixes#3334.
Note that `autocmd! * <buffer>` is required for location lists because we don't want to remove the autocommand in other location lists. It doesn't matter for the quickfix window since there is only one.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3335)
<!-- Reviewable:end -->
[READY] Allow completion in the command-line window
This implements @puremourning's suggestion from https://github.com/Valloric/YouCompleteMe/pull/1415#issuecomment-460197058 and adds an entry in the FAQ on how to override the `TAB` mapping in the command-line window. Since the `CmdwinEnter` event is triggered instead of `BufEnter` in that window, the `s:OnBufferEnter` function is called for that event too. Also, the contents of that window are empty when the filetype is set the first time so we ignore the `FileType` event in that window. Finally, the `qf` filetype is removed from the `g:ycm_filetype_blacklist` option since the quickfix window is always ignored.
This needs testing as these changes may not work well with plugins that create special buffers. We may have to blacklist the filetype of these buffers.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3316)
<!-- Reviewable:end -->
Update Go's part in full installation guide
# PR Prelude
Thank you for working on YCM! :)
**Please complete these steps and check these boxes (by putting an `x` inside
the brackets) _before_ filing your PR:**
- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [x] I have included tests for the changes in my PR. If not, I have included a
rationale for why I haven't.
- [x] **I understand my PR may be closed if it becomes obvious I didn't
actually perform all of these steps.**
# Why this change is necessary and useful
- The original installation guide missed `go build` in `godef`'s directory, relating issue [here](https://github.com/Valloric/YouCompleteMe/issues/3071#issuecomment-403213723).
- The path of `gocode` and `godef` has been changed, update them in the doc.
I have tested this guide on my Manjaro laptop and it works fine, my go version is `1.11.4`.
(Since the path is too long, the vim help doc looks kind of ugly, maybe the formatting or the
path's presenting way should be changed so that it looks better. I used the `gq` command
in vim and it gave me this.)
[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3315)
<!-- Reviewable:end -->
[READY] Add instructions for clangd into README
# PR Prelude
Thank you for working on YCM! :)
**Please complete these steps and check these boxes (by putting an `x` inside
the brackets) _before_ filing your PR:**
- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [ ] I have included tests for the changes in my PR. If not, I have included a
rationale for why I haven't.
- [x] **I understand my PR may be closed if it becomes obvious I didn't
actually perform all of these steps.**
# Why this change is necessary and useful
clangd-based completer has been introduced into ycmd for a while now. I believe it is time to let users know about it as well. We are also updating clangd's docs and it would be nice to point people using vim into YCM docs for integration. You can see the patch for that one in https://reviews.llvm.org/D56718.
Also you can have a look at the end product of the changes at https://kadircet.github.io/YouCompleteMe
[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3296)
<!-- Reviewable:end -->
[READY] Relax regular expression in DebugInfo test
This makes the `YouCompleteMe_DebugInfo_ServerRunning` test pass whether the libclang completer or the Clangd one are enabled. The `[\w\W]` pattern is used to match everything including newlines.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3313)
<!-- Reviewable:end -->
[READY] Update g:ycm_max_diagnostics_to_display docs
Update the documentation with the complete list of languages affected by the `g:ycm_max_diagnostics_to_display` option and mention that the number of diagnostics is unlimited if the option is set to `0` .
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3301)
<!-- Reviewable:end -->
Include the following changes:
- allow users to configure LSP servers through extra conf;
- add Clangd completer;
- do not default to 32-bit when downloading libclang;
- update requests;
- do not include Clangd with --all;
- add GetType command to Python completer;
- update Boost to 1.69;
- only detail filtered candidates in Python completer;
- include signature to Python candidates;
- only detail filtered candidates in TypeScript completer;
- update Jedi to 0.13.2;
- only detail filtered candidates in Go completer;
- only resolve filtered candidates in LSP completer;
- do not find CMake and Python if not needed;
- do not read LSP settings on every file parse;
- fix system headers search on macOS;
- report Java server startup status correctly;
- make LSP debug info consistent;
- improve LSP project directory detection;
- determine simple subcommands automatically in LSP completer;
- fix LSP server startup when UnknownExtraConf is thrown.
[READY] Restore neovim support
# PR Prelude
Thank you for working on YCM! :)
**Please complete these steps and check these boxes (by putting an `x` inside
the brackets) _before_ filing your PR:**
- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [x] I have included tests for the changes in my PR. If not, I have included a
rationale for why I haven't.
- [x] **I understand my PR may be closed if it becomes obvious I didn't
actually perform all of these steps.**
# Why this change is necessary and useful
[Please explain **in detail** why the changes in this PR are needed.]
[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
Turns out neovim doesn't have `has('python_compiled')`, so we need to check if the user is running neovim before checking `has('python_compiled')`.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3306)
<!-- Reviewable:end -->
[READY] Improve error message when unable to load Python
The current error when Python cannot be loaded
> YouCompleteMe unavailable: requires Vim compiled Python (2.7.1+ or 3.4+) support.
is misleading if Vim has been dynamically compiled against Python but is unable to find the library. See issue https://github.com/Valloric/YouCompleteMe/issues/3300 for instance. We should only return that error if `has( 'python_compiled' )` and `has( 'python3_compiled' )` are both false. Furthermore, we should check if Python 3 is available before Python 2 because on some platforms, only one Python library can be loaded at a time so if Python 2 is loaded first, Python 3 cannot be used.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3303)
<!-- Reviewable:end -->
Check explicitely that Vim is compiled with Python support.
Attempt to load Python 3 before Python 2 since only one can be loaded at
a time on some platforms. Return an appropriate error if unable to load
both.
[READY] Workaround "Invalid channel" errors when NeoVim exits immediately after started
# PR Prelude
Thank you for working on YCM! :)
- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [ ] I have included tests for the changes in my PR. If not, I have included a
rationale for why I haven't.
Dunno how to write a test for such an _intermittent_ issue, sorry
- [x] **I understand my PR may be closed if it becomes obvious I didn't
actually perform all of these steps.**
# Why this change is necessary and useful
The issue was originally reported at https://github.com/neovim/neovim/issues/6840.
If I exit neovim immediately after it starts, there are error messages like this:
```
Error detected while processing function <SNR>96_PollServerReady[1]..<SNR>96_Pyeval[2]..provider#python3#Call:
line 18:
Invalid channel: 3
Error detected while processing function <SNR>96_PollServerReady[7]..<SNR>96_Pyeval[2]..provider#python3#Call:
line 18:
Invalid channel: 3
```
The issue is not always reproducible. Usually I get once in 5 neovim runs. With this patch I don't get these message in 20 neovim runs.
In https://github.com/neovim/neovim/issues/6840#issuecomment-309960751, @micbou mentions that
> Stopping the timers on the `VimLeave` event seems to fix that issue
So, here's my attempt!
[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3292)
<!-- Reviewable:end -->
[READY] Update sign place regex pattern for newer versions
Among other things, [Vim 8.1.0614](162b71479b) changed the output of the `sign place` command by adding the `priority` field:
```
--- Signs ---
Signs for test.cpp:
line=4 id=100000000 name=YcmError priority=10
line=5 id=100000001 name=YcmError priority=10
```
This breaks [the `GetSignsForBuffer` function](7997fc5536/python/ycm/vimsupport.py (L204-L215)) which extract the signs from the output of that command. We need to update the regex pattern used to match the lines of `sign place` for Vim 8.1.0614 or later.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3279)
<!-- Reviewable:end -->
[READY] Fix run_tests.py dependencies
The dependencies are now explicitly added to `PYTHONPATH` in the `run_tests.py` script. Adding the `argparse` module to `sys.path` is not needed anymore.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3266)
<!-- Reviewable:end -->
[READY] Update FAQ entry about outdated libclang
The FAQ entry about libclang being too old is not relevant anymore. Replace it with the `undefined symbol: clang_getCompletionFixIt` error that occurs when ycmd loads a libclang older than 7.0.0.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3269)
<!-- Reviewable:end -->