Commit Graph

2520 Commits

Author SHA1 Message Date
zzbot
e412ee465b
Auto merge of #3204 - micbou:fix-flake8, r=bstaletic
[READY] Fix Flake8 errors

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

<!-- 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/3204)
<!-- Reviewable:end -->
2018-11-16 10:15:37 -08:00
micbou
faa019aa53
Merge pull request #3209 from santosh/docs
removes repetitive line
2018-11-01 17:49:24 +01:00
Santosh Kumar
a6f0fb2cbd removes 'below' from text to reduce confusion 2018-11-01 21:34:46 +05:30
micbou
88bdfc01f9
Fix Flake8 errors
Fix invalid escape sequences in string literals. Ignore E301 and W504.
2018-10-26 23:07:38 +02:00
zzbot
f67e5ff27b
Auto merge of #3104 - micbou:omnifunc-convert-strings-dictionaries, r=bstaletic
[READY] Convert strings from omnifunc into dictionaries

Vim allows each item of the list returned by an omnifunc to be either a string
or a dictionary (see `:h complete-items`) but ycmd only supports lists where items are all strings or all
dictionaries. Convert all strings into dictionaries.

Fixes https://github.com/Valloric/YouCompleteMe/issues/3103.
Fixes https://github.com/Valloric/YouCompleteMe/issues/3179

<!-- 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/3104)
<!-- Reviewable:end -->
2018-10-14 10:58:41 -07:00
zzbot
75c3bb6928
Auto merge of #3124 - hackaugusto:type_check_blacklist, r=micbou
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 -->
2018-10-14 09:20:07 -07:00
micbou
926e32d6e5
Simplify AdjustCandidateInsertionText function
Candidates are always dictionaries containing the 'word' key.
2018-10-14 18:07:55 +02:00
micbou
73fea03d78
Convert strings from omnifunc into dictionaries
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.
2018-10-14 18:07:54 +02:00
zzbot
34dee0ebcb
Auto merge of #3163 - micbou:python-path, r=puremourning
[READY] Add minimal dependencies to Python path

Ideally, we shouldn't add anything to the Python path because it can break other plugins written in Python but since the alternative is to tell users to manually install our dependencies, we don't really have a choice (the last thing we want are reports about pip failing to install packages). Still, we can at least only add the dependencies we need:
 - [requests](https://github.com/requests/requests);
 - [pythonfutures](https://github.com/agronholm/pythonfutures) in Python 2;
 - [requests-futures](https://github.com/ross/requests-futures);
 - [frozendict](https://github.com/slezica/python-frozendict);
 - [python-future](https://github.com/PythonCharmers/python-future).

Fixes #3162.

<!-- 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/3163)
<!-- Reviewable:end -->
2018-10-14 07:52:27 -07:00
micbou
040582c107
Add minimal dependencies to Python path
Only add pythonfutures on Python 2. The concurrent.futures module is
part of the standard library on Python 3.
2018-10-14 16:39:01 +02:00
zzbot
a98bc72668
Auto merge of #3176 - micbou:python-docs, r=bstaletic
[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 -->
2018-10-08 08:48:47 -07:00
micbou
0ac80ab619
Update docs about the default version of Python used for completion
Jedi now picks the version of Python running the ycmd server.
2018-10-08 00:05:22 +02:00
zzbot
5c722bbfbb
Auto merge of #3161 - micbou:completer-command-ignore-ft-option, r=puremourning
[READY] Ignore ft= argument from YcmCompleter command

The `ft=` argument of the `YcmCompleter` command is supposed to allow users to specify a completer when running a command. However, this was broken a long time ago in commit 29bb90a6b4. Only the `ycm:ident` value is still supported but it serves no purpose because the identifier completer doesn't define commands. Ignore completely the `ft=` argument and move the logic to the Python layer. Remove the argument from the documentation.

<!-- 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/3161)
<!-- Reviewable:end -->
2018-10-07 12:21:39 -07:00
zzbot
738668319f
Auto merge of #3154 - micbou:reduce-logging-verbosity-connection-error, r=puremourning
[READY] Reduce logging verbosity when a connection error occurs

Logging `ConnectionError` as an exception results in writing a Python traceback of 64 lines in the logs. Not only this messes up the logs, this also considerably increases their size for no good reason. Instead, we should log the exception as an error. This gives us something like
```
2018-09-24 11:19:27,487 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=27810): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x0000000005CC7B70>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
```
which is much more reasonable.

<!-- 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/3154)
<!-- Reviewable:end -->
2018-10-07 11:47:52 -07:00
zzbot
40ff89e8d0
Auto merge of #3175 - micbou:update-ycmd, r=puremourning
[READY] Update ycmd

Include the following changes:
 - PR Valloric/ycmd#1075: remove Node.js workaround for Debian-based distributions;
 - PR Valloric/ycmd#1077: update Boost to 1.68;
 - PR Valloric/ycmd#1078: add semantic trigger for Julia;
 - PR Valloric/ycmd#1081: improve type information on C++ member functions;
 - PR Valloric/ycmd#1086: check if Python headers are installed before building;
 - PR Valloric/ycmd#1088: raise proper exception for commands when file is still being parsed in C-family languages;
 - PR Valloric/ycmd#1098: update Go completer;
 - PR Valloric/ycmd#1099: update regex submodule;
 - PR Valloric/ycmd#1100: add Python path to debugging information;
 - PR Valloric/ycmd#1103: support framework headers completion and code navigation in C-family languages;
 - PR Valloric/ycmd#1107: update Clang to 7.0.0;
 - PR Valloric/ycmd#1109: update jdt.ls to 0.25.0;
 - PR Valloric/ycmd#1110: handle null hover response from language servers;
 - PR Valloric/ycmd#1111: update list of completion kinds defined by LSP;
 - PR Valloric/ycmd#1113: send completion item kinds capability to language servers;
 - PR Valloric/ycmd#1116: update Parso to 0.3.1 and Jedi to 0.13.1.

Closes https://github.com/Valloric/YouCompleteMe/issues/3138.
Closes https://github.com/Valloric/YouCompleteMe/issues/3145.

<!-- 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/3175)
<!-- Reviewable:end -->
2018-10-07 11:16:31 -07:00
micbou
d2ee69d521
Remove ncurses-compat-libs dependency for Fedora
The downloaded libclang on Linux does not depend on terminfo anymore.
2018-10-07 03:24:33 +02:00
micbou
9957e7ba0a
Update semantic triggers in documentation 2018-10-07 03:24:32 +02:00
micbou
6caa49f859
Update ycmd
Include the following changes:
 - remove Node.js workaround for Debian-based distributions;
 - update Boost to 1.68;
 - add semantic trigger for Julia;
 - improve type information on C++ member functions;
 - check if Python headers are installed before building;
 - raise proper exception for commands when file is still being parsed
   in C-family languages;
 - update Go completer;
 - update regex submodule;
 - add Python path to debugging information;
 - support framework headers completion and code navigation in C-family
   languages;
 - update Clang to 7.0.0;
 - update jdt.ls to 0.25.0;
 - handle null hover response from language servers;
 - update list of completion kinds defined by LSP;
 - send completion item kinds capability to language servers;
 - update Parso to 0.3.1 and Jedi to 0.13.1.
2018-10-07 03:15:47 +02:00
micbou
bdc3a66488
Ignore ft= argument from YcmCompleter command
Only the "ycm:ident" value of the ft= argument in the YcmCompleter
command is working. This value forces the use of the identifier
completer which serve no purpose because this completer doesn't define
commands. Ignore completely the ft= argument and move the logic to the
Python layer.
2018-09-28 01:12:23 +02:00
micbou
5e46cdfbbf
Reduce logging verbosity when a connection error occurs 2018-09-24 11:08:07 +02:00
zzbot
e37923a752
Auto merge of #3147 - micbou:update-java-links, r=Valloric
[READY] Update Java links in documentation

The `pom.xml` link is broken (the `java-language-server` branch doesn't exist). Use a specific commit for the Java links so that they can't be affected by a change in ycmd.

<!-- 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/3147)
<!-- Reviewable:end -->
2018-09-20 00:18:34 -07:00
micbou
fa6d089ea9
Update Java links in documentation
Fix pom.xml broken link and use permanent links.
2018-09-20 09:17:09 +02:00
zzbot
9e381ade46
Auto merge of #3140 - micbou:merge-linux-docs, r=Valloric
[READY] Merge Linux distributions instructions

As proposed in https://github.com/Valloric/YouCompleteMe/pull/3055#pullrequestreview-149835682, merge the Ubuntu Linux x64 and Fedora Linux x64 instructions into one section for Linux 64-bit. The result can be seen [here](https://github.com/micbou/YouCompleteMe/tree/merge-linux-docs#linux-64-bit).

I confirmed the required packages for Fedora are `gcc-c++`, `cmake`, `python3-devel` (and `ncurses-compat-libs` for C/C++) by installing the distribution in a VM.

Closes #3069.

<!-- 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/3140)
<!-- Reviewable:end -->
2018-09-19 21:19:56 -07:00
zzbot
a020cbc0fc
Auto merge of #3148 - micbou:toggle-logs-extra-data, r=Valloric
[READY] Include extra data when getting the logs

Include the extra conf data to the debug info request when getting the logfiles.

Fixes https://github.com/Valloric/ycmd/issues/1106.

<!-- 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/3148)
<!-- Reviewable:end -->
2018-09-19 20:48:37 -07:00
micbou
4524d4bfd1
Include extra data when getting the logs
Include the extra conf data to the debug info request when getting the
logfiles.
2018-09-19 21:30:04 +02:00
Augusto F. Hack
0868aef516 added type check for g:ycm_filetype_blacklist 2018-09-09 11:00:16 -03:00
zzbot
487b8ab2b4
Auto merge of #3134 - micbou:fitting-height-wrap, r=micbou
[READY] Set window height according to the wrap option

The height of the quickfix and location list windows is set to fit all entries by assuming that the lines of the entries are always wrapped if they are longer than the window width. This assumption is wrong if `nowrap` is set. In that case, the height should be set to the number of entries.

<!-- 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/3134)
<!-- Reviewable:end -->
2018-09-09 06:39:05 -07:00
zzbot
c3b4884cd3
Auto merge of #3126 - micbou:fix-cursor-position-replace-chunk, r=micbou
[READY] Fix cursor position when replacing chunk

When replacing an area of the buffer with `ReplaceChunk`, we are replacing the whole last line of that area because the Python interface doesn't allow changing only some part of a line. If the cursor is positioned on that line just after the ending column of the replaced area, we expect the cursor to be moved depending on the amount of text replaced. However, since the whole line is replaced, Vim cannot figure where the cursor should be positioned and so the cursor is not moved. This leads to the cursor ending in an unexpected position after a FixIt is applied. Here's an illustration of the issue in TypeScript where an import statement is automatically inserted after selecting a completion:

![fixit-cursor-position-before](https://user-images.githubusercontent.com/10026824/44363871-be1ec400-a4c5-11e8-949b-14ada91bdc5e.gif)

The solution is to manually move the cursor in that case:

![fixit-cursor-position-after](https://user-images.githubusercontent.com/10026824/44364038-3a190c00-a4c6-11e8-8aca-4bc8ccb98edc.gif)

<!-- 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/3126)
<!-- Reviewable:end -->
2018-09-09 05:36:16 -07:00
zzbot
687654cec1
Auto merge of #3125 - micbou:omnifunc-invalid-start-column, r=micbou
[READY] Improve omnifunc compliance when start column is invalid

Contrarily to [what the docs say](3f6a16f022/runtime/doc/insert.txt (L1057-L1058)), [Vim only stops completion if the value returned by the omnifunc is `-3` or `-2`](3f6a16f022/src/edit.c (L5585-L5621)). In other cases, if the value is negative or greater than the current column, the start column is set to the current column; otherwise, the value is used as the start column.

<!-- 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/3125)
<!-- Reviewable:end -->
2018-09-09 04:05:38 -07:00
micbou
d215342f2f
Fix cursor position when replacing chunk
Vim doesn't move the cursor accordingly when its position is on the last line
of the replaced area after its ending column because the whole line is
replaced. The cursor must be manually moved in that case.
2018-09-09 12:38:44 +02:00
micbou
eac2232c22
Improve omnifunc compliance when start column is invalid
Contrarily to what the docs say, Vim only stops completion if the value
returned by the omnifunc is -3 or -2. In other cases, if the value is negative
or greater than the current column, the start column is set to the current
column; otherwise, the value is used as the start column.
2018-09-09 12:34:07 +02:00
zzbot
49237419cc
Auto merge of #3123 - micbou:cuda-docs, r=bstaletic
[READY] Add CUDA to C-family languages in documentation

Add CUDA to the list of C-family languages in the docs and use the "C-family languages" expression when appropriate (instead of enumerating each language).

<!-- 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/3123)
<!-- Reviewable:end -->
2018-09-09 03:08:00 -07:00
micbou
aaa94ba9c9
Merge Linux distributions instructions 2018-09-05 17:37:15 +02:00
micbou
b6583623a0
Set window height according to the wrap option 2018-08-29 22:04:47 +02:00
zzbot
e018777b38
Auto merge of #3117 - micbou:omnifunc-restore-cursor-position, r=micbou
[READY] Restore cursor position after omnifunc calls

An omnifunc may move the cursor position even on the first call, e.g. [`completeR` from the `Nvim-R` plugin](0db20893d3/R/common_global.vim (L3383)). The cursor position is not restored between the two calls because it's unnecessary with the changes from PR #3112.

<!-- 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/3117)
<!-- Reviewable:end -->
2018-08-19 15:04:52 -07:00
micbou
7b3a4aaf04
Add CUDA to C-family languages in documentation 2018-08-19 21:27:21 +02:00
micbou
24ab8ca941
Restore cursor position after omnifunc calls
An omnifunc may move the cursor position even on the first call.
2018-08-19 21:16:52 +02:00
zzbot
a688da3b96
Auto merge of #3120 - micbou:goto-modifiers-version, r=micbou
[READY] Only use command modifiers if available

Command modifiers (see `:h mods`) were added in [Vim 7.4.1898](63a60ded3f (diff-28587d36c24b61c33d4d01601f5974ee)) while we support 7.4.1578 and later.

Fixes https://github.com/Valloric/YouCompleteMe/issues/3105.

<!-- 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/3120)
<!-- Reviewable:end -->
2018-08-19 11:34:44 -07:00
zzbot
9ce35aee91
Auto merge of #3113 - micbou:python-docs, r=micbou
[READY] Update Python documentation and add extra conf file

This PR updates the Python docs and adds a `.ycm_extra_conf.py` file to be able to complete third-party packages in YCM code.

<!-- 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/3113)
<!-- Reviewable:end -->
2018-08-19 10:16:20 -07:00
zzbot
96e80c8de2
Auto merge of #3112 - micbou:omnifunc-start-column, r=micbou
[READY] Move cursor to start column before calling again omnifunc

Vim internally moves the cursor to the start column before calling the omnifunc a second time. This can be confirmed by starting Vim with the following vimrc:
```vim
set nocompatible

function! Omnifunc(findstart, base)
        echom col('.')
	if a:findstart
		if getline('.') == 'foo.ba'
			return 4
		endif
	endif
	return [ 'bar', 'baz']
endfunction

set omnifunc=Omnifunc
```
typing `foo.ba`, and hitting `<C-X><C-O>`. This outputs `7` and `5` on the command line which means that the cursor at column 7 on the first call of the omnifunc is moved to column 5 on the second call.

Since some omnifuncs depend on this to compute the list of candidates (e.g. the one defined by [the LanguageClient-neovim plugin](https://github.com/autozimu/LanguageClient-neovim)), we should reproduce that behavior in YCM.

Fixes https://github.com/Valloric/YouCompleteMe/issues/3099.

<!-- 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/3112)
<!-- Reviewable:end -->
2018-08-19 08:49:46 -07:00
micbou
2f93af0001
Update Python documentation and add extra conf file 2018-08-19 15:31:37 +02:00
zzbot
14ed326842
Auto merge of #3111 - micbou:autoimport-undo-faq, r=micbou
[READY] Add entry in FAQ about automatic import insertion breaking undo

Issue #3054 is fixed in [Vim 8.1.0256 or later](9fa9506853). Mention it in the FAQ.

Closes #3054.

<!-- 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/3111)
<!-- Reviewable:end -->
2018-08-19 06:26:59 -07:00
zzbot
d3ed74eca4
Auto merge of #3108 - micbou:codecov-tests, r=puremourning
[READY] Ignore tests in codecov configuration

I don't know why but codecov includes the `tests` folder in its coverage report since [we migrated to Python 3.7 on AppVeyor](2d213e7ed2). Ignoring the folder in codecov configuration file like [we already do in the ycmd repository](ea58cfcf50/codecov.yml (L16-L25)) fixes the issue.

<!-- 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/3108)
<!-- Reviewable:end -->
2018-08-19 06:01:08 -07:00
micbou
dca5682e21
Move cursor to start column before calling again omnifunc
Vim internally moves the cursor to the start column before calling again the
omnifunc. Some omnifuncs like the one defined by the LanguageClient-neovim
plugin depend on this behavior to compute the list of candidates.
2018-08-16 18:33:36 +02:00
micbou
959d0c4c5f
Only use command modifiers if available
Command modifiers were added in Vim 7.4.1898.
2018-08-14 13:52:25 +02:00
micbou
713515167f
Add entry in FAQ about automatic import insertion breaking undo 2018-08-09 00:42:56 +02:00
micbou
556213717a
Ignore tests in codecov configuration 2018-08-07 15:44:04 +02:00
zzbot
15362d9cb8
Auto merge of #3089 - micbou:tsserver-javascript, r=Valloric
[READY] Update JavaScript support and documentation

This updates the documentation with the proposed changes in https://github.com/Valloric/ycmd/pull/1036#issuecomment-397234687. The Tern instructions are moved to [this wiki page](https://github.com/Valloric/YouCompleteMe/wiki/JavaScript-Semantic-Completion-through-Tern). JavaScript is added to the list of supported filetypes for diagnostics and completion fixits.

<!-- 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/3089)
<!-- Reviewable:end -->
2018-07-25 14:02:12 -07:00
zzbot
1e9c59abfa
Auto merge of #3091 - micbou:completer-command-mods, r=Valloric
[READY] Support modifiers for GoTo commands

This PR allows users to customize how a window is split when running the `GoTo*` commands by prefixing them with the modifiers `:aboveleft`, `:belowright`, `:botright`, etc. (see `:h mods` for the complete list). For instance, to split a window vertically at the right of the screen, one could do:
```viml
:botright vertical YcmCompleter GoTo
```
The `'horizontal-split'` and `'vertical-split'` values of the `g:ycm_goto_buffer_command` option are replaced by `'split'` since a vertical split can be obtained by prefixing the `:vertical` modifier. Those values are still kept for backward compatibility.

A new value is added `'split-or-existing-window'` that is equivalent to `new-or-existing-tab` when the `:tab` modifier is used. Without the `:tab` modifier, the `GoTo*` commands only jump to an existing window if that window is in the current tab page.

Closes https://github.com/Valloric/YouCompleteMe/pull/3090.

<!-- 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/3091)
<!-- Reviewable:end -->
2018-07-25 13:46:18 -07:00
micbou
4e3ae95e9f
Update JavaScript support and documentation 2018-07-25 22:15:01 +02:00