Commit Graph

2479 Commits

Author SHA1 Message Date
Wang Ruochen
c5b5d50056 update go's part in full installation guide 2019-02-19 17:03:16 +00:00
zzbot
c25e449f4e
Auto merge of #3312 - micbou:update-ycmd, r=bstaletic
[READY] Update ycmd

Include the following changes:

 - PR Valloric/ycmd#1095: allow users to configure LSP servers through extra conf;
 - PR Valloric/ycmd#1118: add Clangd completer;
 - PR Valloric/ycmd#1130: do not default to 32-bit when downloading libclang;
 - PR Valloric/ycmd#1132: update requests;
 - PR Valloric/ycmd#1149: do not include Clangd with `--all`;
 - PR Valloric/ycmd#1151: add `GetType` command to Python completer;
 - PR Valloric/ycmd#1152: update Boost to 1.69;
 - PR Valloric/ycmd#1153: only detail filtered candidates in Python completer;
 - PR Valloric/ycmd#1154: include signature to Python candidates;
 - PR Valloric/ycmd#1155: only detail filtered candidates in TypeScript completer;
 - PR Valloric/ycmd#1156: update Jedi to 0.13.2;
 - PR Valloric/ycmd#1157: only detail filtered candidates in Go completer;
 - PR Valloric/ycmd#1161: only resolve filtered candidates in LSP completer;
 - PR Valloric/ycmd#1164: do not find CMake and Python if not needed;
 - PR Valloric/ycmd#1167: do not read LSP settings on every file parse;
 - PR Valloric/ycmd#1172: fix system headers search on macOS;
 - PR Valloric/ycmd#1174: report Java server startup status correctly;
 - PR Valloric/ycmd#1177: make LSP debug info consistent;
 - PR Valloric/ycmd#1178: improve LSP project directory detection;
 - PR Valloric/ycmd#1179: determine simple subcommands automatically in LSP completer;
 - PR Valloric/ycmd#1181: fix LSP server startup when UnknownExtraConf is thrown.

<!-- 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/3312)
<!-- Reviewable:end -->
2019-01-27 23:33:26 -08:00
zzbot
10f7dea123
Auto merge of #3302 - micbou:highlight-lines-without-gutter, r=puremourning
[READY] Add instruction on how to highlight lines without Vim gutter

Closes https://github.com/Valloric/YouCompleteMe/issues/765.

<!-- 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/3302)
<!-- Reviewable:end -->
2019-01-27 12:46:23 -08:00
zzbot
c1895e7138
Auto merge of #3301 - micbou:unlimited-diagnostics-docs, r=puremourning
[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 -->
2019-01-27 12:31:38 -08:00
micbou
9bf53fba7e
Add GetType subcommand for Python in docs
Be consistent in the order of features between languages.
2019-01-27 16:16:41 +01:00
micbou
7548b209f5
Update ycmd
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.
2019-01-27 14:35:08 +01:00
zzbot
48c3bcc491
Auto merge of #3306 - bstaletic:neovim_has_python_compiled, r=micbou
[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 -->
2019-01-23 01:19:16 -08:00
zzbot
d4e3d85fc0
Auto merge of #3307 - micbou:complete-done-allowed, r=bstaletic
[READY] Do not call OnCompleteDone on blacklisted filetypes

Fixes #3305.

<!-- 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/3307)
<!-- Reviewable:end -->
2019-01-23 00:13:39 -08:00
Boris Staletic
63bcaf30f0 Restore neovim support 2019-01-23 07:56:43 +01:00
micbou
f58d9d607e
Do not call OnCompleteDone on blacklisted filetypes 2019-01-23 00:49:59 +01:00
zzbot
b26ba2681e
Auto merge of #3303 - micbou:python-check, r=micbou
[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 -->
2019-01-22 11:58:10 -08:00
micbou
616c2a2964
Improve error message when unable to load Python
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.
2019-01-22 13:25:06 +01:00
micbou
c8530d0622
Add instruction on how to highlight lines without Vim gutter 2019-01-20 15:16:55 +01:00
micbou
1c11508782
Update g:ycm_max_diagnostics_to_display docs 2019-01-20 13:16:54 +01:00
zzbot
113787cc20
Auto merge of #3292 - yan12125:fix-PollServerReady-errors, r=bstaletic
[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 -->
2019-01-16 09:50:17 -08:00
Chih-Hsuan Yen
67c39a3330
Workaround "Invalid channel" errors when NeoVim exits immediately after started
The idea is from https://github.com/neovim/neovim/issues/6840#issuecomment-309960751

Thanks micbou!
2019-01-17 01:36:22 +08:00
zzbot
ccc06c2c42
Auto merge of #3284 - micbou:requests, r=bstaletic
[READY] Update requests URL

See PR https://github.com/Valloric/ycmd/pull/1169.

<!-- 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/3284)
<!-- Reviewable:end -->
2019-01-05 14:18:10 -08:00
zzbot
85c11d3a87
Auto merge of #3285 - micbou:python-future, r=puremourning
[READY] Support virtualenv and embedded Python

We need to reproduce [the complete python-future insertion logic of `server_utils.py`](07757d4250/ycmd/server_utils.py (L35-L50)) if we want to support virtualenv and embedded Python. See PRs https://github.com/Valloric/ycmd/pull/625 and https://github.com/Valloric/ycmd/pull/786.

I was a little worried on the performance impact of importing the `re` module and compiling the regex so I measured the time spent importing the modules and inserting python-future in `sys.path` and got less than 1ms (~0.5ms) so negligible compared to the whole startup time.

<!-- 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/3285)
<!-- Reviewable:end -->
2019-01-03 12:47:51 -08:00
micbou
3b9fef4e2a
Support virtualenv and embedded Python 2018-12-30 19:01:45 +01:00
micbou
34b010753b
Update requests URL 2018-12-30 17:13:14 +01:00
zzbot
c209cdbbfc
Auto merge of #3279 - micbou:fix-signs, r=puremourning
[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 -->
2018-12-28 00:50:29 -08:00
zzbot
1e37efe648
Auto merge of #3273 - micbou:remove-server-utils-dependency, r=puremourning
[READY] Remove server_utils dependency

<!-- 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/3273)
<!-- Reviewable:end -->
2018-12-28 00:32:59 -08:00
micbou
b0f18804f3
Update sign place regex pattern for newer versions 2018-12-25 14:35:51 +01:00
zzbot
7997fc5536
Auto merge of #3276 - micbou:vim-win-download-url, r=micbou
[READY] Update Vim installer URL for Windows

There is now [a 64-bit Vim installer for Windows](https://github.com/vim/vim-win32-installer/releases).

<!-- 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/3276)
<!-- Reviewable:end -->
2018-12-23 11:03:51 -08:00
zzbot
c88ca8abdf
Auto merge of #3277 - micbou:vim-nerdtree-tabs, r=micbou
[READY] Remove the vim-nerdtree-tabs plugin from FAQ

[vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs) fixed the issue preventing the `VimLeave` event from triggering some time ago. See PR https://github.com/jistr/vim-nerdtree-tabs/pull/92. Remove the plugin from the FAQ.

<!-- 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/3277)
<!-- Reviewable:end -->
2018-12-23 09:51:52 -08:00
micbou
abd8c213cf
Remove vim-nerdtree-tabs from FAQ
The vim-nerdtree-tabs plugin fixed the issue preventing the VimLeave
event from triggering.
2018-12-23 11:41:56 +01:00
zzbot
a53ccefca9
Auto merge of #3275 - micbou:complete-done-omnifunc, r=bstaletic
[READY] Do not apply fixits for omnifunc completion

Fixes #3274.

<!-- 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/3275)
<!-- Reviewable:end -->
2018-12-21 07:46:11 -08:00
micbou
ace4afad38
Update Vim installer URL for Windows 2018-12-21 16:34:27 +01:00
micbou
9091454d18
Do not apply fixits for omnifunc completion 2018-12-21 15:56:31 +01:00
micbou
88504eb44a
Remove server_utils dependency 2018-12-19 13:54:23 +01:00
zzbot
0790dc99b4
Auto merge of #3266 - micbou:fix-run_tests-dependencies, r=micbou
[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 -->
2018-12-11 16:59:43 -08:00
zzbot
5083c8be22
Auto merge of #3265 - micbou:omnifunc-adjust-candidate-insertion-text, r=bstaletic
[READY] Fix insertion adjustment for omnifunc candidates

The assumption that the `abbr` field always exist does not hold when candidates are from Vim's omnifunc.

Fixes #3264.

<!-- 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/3265)
<!-- Reviewable:end -->
2018-12-11 13:38:08 -08:00
zzbot
272c72e1f1
Auto merge of #3269 - micbou:undefined-symbol-fixit, r=micbou
[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 -->
2018-12-11 12:48:40 -08:00
micbou
ee6756bdf4
Update FAQ entry about outdated libclang 2018-12-11 20:19:32 +01:00
micbou
6425e1d96f
Fix run_tests.py dependencies 2018-12-11 07:39:57 +01:00
zzbot
51b6335b24
Auto merge of #3263 - bstaletic:requests_move, r=micbou
[READY] Do not use ycmd/third_party

See Valloric/ycmd#1143

<!-- 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/3263)
<!-- Reviewable:end -->
2018-12-10 17:26:51 -08:00
micbou
6b8349ba8e
Fix insertion adjustment for omnifunc candidates
The abbr field may not be present for candidates returned by Vim's
omnifunc.
2018-12-11 02:15:24 +01:00
Boris Staletic
5c12f5e357 Separate YCM/ycmd submodules 2018-12-11 00:42:39 +01:00
zzbot
80246aa9a2
Auto merge of #3258 - micbou:fix-candidate-insertion-adjustment, r=micbou
[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 -->
2018-12-07 03:31:55 -08:00
micbou
94e70b394e
Fix candidate insertion adjustment
The abbr field is always defined so we need to check its emptiness when
adjusting the candidates insertion text.
2018-12-01 23:59:36 +01:00
zzbot
75bf1738dc
Auto merge of #3247 - micbou:diagnostic-matches-current-window, r=puremourning
[READY] Update diagnostic matches only in current window

Unfortunately, switching windows when updating the diagnostic matches causes too many side-effects like issues #3228 and #3242. Revert PRs https://github.com/Valloric/YouCompleteMe/pull/3024 and https://github.com/Valloric/YouCompleteMe/pull/3229 and only update matches in the current window.

Fixes #3242.

<!-- 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/3247)
<!-- Reviewable:end -->
2018-11-27 12:11:50 -08:00
micbou
3151820ff5
Update diagnostic matches only in current window 2018-11-27 15:44:55 +01:00
zzbot
8216dec954
Auto merge of #3243 - micbou:remove-user-options-store-dependency, r=bstaletic
[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 -->
2018-11-26 19:58:59 -08:00
zzbot
9e0e660bee
Auto merge of #3241 - bstaletic:flakes, r=Valloric
[READY] Run flake8 on scripts in root

See https://github.com/Valloric/ycmd/pull/1135 for reference.

<!-- 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/3241)
<!-- Reviewable:end -->
2018-11-26 17:32:43 -08:00
micbou
f6ec5557c0
Add g:ycm_filter_diagnostics to list of options 2018-11-26 12:51:26 +01:00
micbou
e651d970ed
Remove user_options_store dependency
Directly define the ycmd options in the plugin.
2018-11-26 12:51:01 +01:00
Boris Staletic
24a01864fd Run flake8 on scripts in root 2018-11-23 12:04:49 +01:00
zzbot
8e33c3c644
Auto merge of #3237 - micbou:increase-clang-requirement, r=bstaletic
[READY] Increase libclang version requirement in docs

We need to increase the version requirement to 7.0.0 because of PR https://github.com/Valloric/ycmd/pull/1121.

<!-- 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/3237)
<!-- Reviewable:end -->
2018-11-21 07:08:45 -08:00
micbou
17c9da60f6
Increase libclang version requirement in docs 2018-11-19 19:08:45 +01:00
zzbot
f2d999bbb1
Auto merge of #3229 - micbou:keep-previous-window, r=puremourning
[READY] Preserve previous window when updating matches

Ensure `<c-w>p` still go to the previous window after updating matches for the current buffer.

Fixes #3228.

<!-- 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/3229)
<!-- Reviewable:end -->
2018-11-18 05:48:57 -08:00