[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 -->
[READY] Fix candidate insertion adjustment
PR https://github.com/Valloric/YouCompleteMe/pull/3208 changed the way completion items are built by always defining all fields and in particular the `abbr` field. This caused a regression with the `AdjustCandidateInsertionText` function because that function checks if the `abbr` field exist which is now always the case. The function should instead check if the `abbr` field is empty.
I changed the order of the fields in the tests to follow the Vim documentation (`word` is defined before `abbr`) and I removed one of the tests since PR https://github.com/Valloric/YouCompleteMe/pull/3104 made it irrelevant.
<!-- 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/3258)
<!-- Reviewable:end -->
[READY] Remove user_options_store dependency
A small step in decoupling YCM and ycmd. Instead of loading the default settings from ycmd, define them directly in the `plugin/youcompleteme.vim` file along the other options. This removes the `frozendict` and `user_options_store` dependencies.
<!-- 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/3243)
<!-- Reviewable:end -->
[READY] Update ycmd
Include the following changes:
- PR Valloric/ycmd#1080: replace Boost canonical function with our own implementation;
- PR Valloric/ycmd#1104: improve filename completer;
- PR Valloric/ycmd#1121: support completion FixIts for C-family languages;
- PR Valloric/ycmd#1122: update jdt.ls to 0.26.0;
- PR Valloric/ycmd#1123: install fixed version of TypeScript in third-party folder;
- PR Valloric/ycmd#1124: only add the necessary directories to Python path.
Fixes#3173.
<!-- 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/3174)
<!-- Reviewable:end -->
[READY] Handle null characters in completion response
The `detailed_info` field may contain null characters e.g. `\x00` in Python docstrings (though it doesn't make sense to use such characters in a docstring). Since these characters cannot be evaluated through `pyeval` (and `py3eval`), we replace them with the symbol used by Vim to display them (`^@`).
This PR also rewrites the `_ConvertCompletionDataToVimData` function by relying on two things:
- [the `insertion_text` field is always defined](600f54de20/ycmd/responses.py (L109));
- [Vim ignores fields with an empty string](833e5dab14/src/edit.c (L2748-L2755)).
I did some measurements and the performance hit is negligible.
Fixes#3207.
<!-- 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/3208)
<!-- Reviewable:end -->
Include the following changes:
- replace Boost canonical function with our own implementation;
- improve filename completer;
- support completion FixIts for C-family languages;
- update jdt.ls to 0.26.0;
- install fixed version of TypeScript in third-party folder;
- only add the necessary directories to Python path.
The completion info field may contain null characters e.g. \x00 in
Python docstrings. These characters cannot be evaluated so they are
removed.
Rewrite the function that convert ycmd completion to Vim completion.
[READY] Recompute starting column on auto-wrapping
When auto-wrapping is enabled (`t` or `c` are present in `formatoptions`), Vim wraps the current line after the completion request is sent but before calling the completefunc. The column where the completion starts is invalid in that case and must be recomputed.
Fixes#2789.
<!-- 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/3192)
<!-- Reviewable:end -->
When auto-wrapping is enabled, Vim wraps the current line after the
completion request is sent but before calling the completefunc. The
starting column returned by the server is invalid in that case and must
be recomputed.
added type check for g:ycm_filetype_blacklist
# PR Prelude
- [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
I made a mistake while configuring ycm and used a list instead of a ditionary for the blacklist, like so:
```vim
let g:ycm_filetype_blacklist = ['python']
```
If the `CursorMoved` autocmd is installed while the configuration is not a dictionary, an error message is raised after every keystroke, this makes fixing the configuration error a bit painful. Error message:
```
Error detected while processing function <SNR>78_OnCursorMovedNormalMode[1]..<SNR>78_AllowedToCompleteInCurrentBuffer[1]..<SNR>78_AllowedToCompleteInBuffer:
line 15:
E715: Dictionary required
```
This PR just adds a check for the type of the variable `g:ycm_filetype_blacklist`, if it's the wrong type a message is printed and the autocmd is not installed. The check was done inside `Enable` to ensure the init.vim had fully executed.
[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/3124)
<!-- Reviewable:end -->
Vim allows each item of the list returned by an omnifunc to be either a string
or a dictionary but ycmd only supports lists where items are all strings or all
dictionaries. Convert all strings into dictionaries.
[READY] Update docs about the default version of Python used for completion
The behavior of `get_default_environment` has been changed in the latest version of Jedi. Instead of picking the latest version of Python available on the system, it now uses the one it's running on i.e. the one running ycmd in our case. See https://github.com/davidhalter/jedi/issues/1196. Update the docs accordingly.
<!-- 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/3176)
<!-- Reviewable:end -->