Commit Graph

2032 Commits

Author SHA1 Message Date
micbou
d534afbe23 Update to latest ycmd
List of changes:
 - update racerd;
 - add GoTo support for Go completer;
 - add concurrent requests for Typescript completer;
 - fix issue #1953;
 - add GoToReferences support for Typescript completer.
2016-02-07 20:27:08 +01:00
Homu
b8ec993c0a Auto merge of #1964 - icholy:master, r=micbou
Update readme with typescript GoToReferences subcommand

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1964)
<!-- Reviewable:end -->
2016-02-08 03:59:00 +09:00
Ilia Choly
ef47aba62a Update vimdoc 2016-02-06 16:24:47 -05:00
Ilia Choly
66155c3de2 Update readme with typescript GoToReferences subcommand 2016-02-06 14:41:03 -05:00
Homu
a2f0ec1624 Auto merge of #1962 - micbou:python-env, r=Valloric
[READY] Remove interpreter line from Python sources

See PR Valloric/ycmd#346.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1962)
<!-- Reviewable:end -->
2016-02-06 02:15:57 +09:00
micbou
4835b49a89 Remove interpreter line from Python sources 2016-02-05 16:24:03 +01:00
Homu
674db42eef Auto merge of #1954 - micbou:documentation-make-confusion, r=vheon
[READY] Avoid confusion with make command

This sentence may be interpreted as executing the `make` command to move the libaries. See issue #1951. We *make* it clear by using `cmake` instead.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1954)
<!-- Reviewable:end -->
2016-02-04 02:48:45 +09:00
micbou
2cd3d1b9d3 Avoid confusion with make command 2016-02-03 17:51:35 +01:00
Homu
8ee365356f Auto merge of #1928 - vheon:custom-python-jedi, r=puremourning
[READY] Update documentation of latest python completer

I've just wrote down the first things that came to mind. So any feedback on which part to expand or fix is appreciated. Specifically I don't know if would be useful to the user to know that JediHTTP exists and what it does. I fear that explaining would do more harm than good 😕

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1928)
<!-- Reviewable:end -->
2016-02-03 08:20:50 +09:00
Andrea Cedraro
581f58add6 Update documentation of latest python completer 2016-02-03 00:12:00 +01:00
Homu
e66d1f1ddd Auto merge of #1922 - Chiel92:patch-1, r=micbou
Add notes to readme according to #1891.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1922)
<!-- Reviewable:end -->
2016-01-31 10:28:11 +09:00
Chiel ten Brinke
833d30eda8 Update vim docs. 2016-01-29 10:40:34 +01:00
Chiel ten Brinke
40db3c0865 Merge https://github.com/Valloric/YouCompleteMe into patch-1 2016-01-29 09:53:01 +01:00
Chiel ten Brinke
d6ebef3c8d Address review comments. 2016-01-29 09:48:24 +01:00
Strahinja Val Markovic
5ee7bd2c80 Updating TOC in README 2016-01-26 15:54:44 -08:00
Strahinja Val Markovic
0efa668931 Adding an explicit Contributor Code of Conduct
Everything in the CoC was true since the beginning of the project, it
was just implicit and not written down. Now we're making it explicit.
2016-01-26 15:49:58 -08:00
Chiel ten Brinke
4afcbee4a1 Adress minor improvement suggestions. 2016-01-25 10:47:59 +01:00
Chiel ten Brinke
8ebcdb491a Improve the solution for error R6034. 2016-01-25 10:37:08 +01:00
Homu
1201115141 Auto merge of #1927 - micbou:event-notification-test, r=Valloric
[READY] Fix issue in EventNotification tests

While I was reviewing PR #1905, I found an issue with the `EventNotification` tests. It's easy to reproduce. You just need to comment [this line in `python/ycm/youcompleteme.py`](https://github.com/Valloric/YouCompleteMe/blob/master/python/ycm/youcompleteme.py#L508) and run the tests. With this change, the `EventNotification` tests should fail since the second call of `ValidateParseRequest` re-raises the warning. However, tests are still passing because `assert_has_calls` does not check if a call was not made. For example, if `functionA` is called twice, both `assert_has_calls( [ functionA ] )` and `assert_has_calls( [ functionA, functionA ] )` are successful.

To fix this, we just need to check the number of calls using `call_count`. This is done by creating a subclass of `MagicMock` implementing the `assert_has_exact_calls` method and using it in tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1927)
<!-- Reviewable:end -->
2016-01-25 08:26:15 +09:00
Homu
8d5f164feb Auto merge of #1896 - micbou:path-to-python-interpreter, r=Valloric
[READY] Implement new strategy to find the Python interpreter path

See discussion in issue #1891 for details.

Implement a new strategy to find the Python interpreter path:
  - if specified, use `g:ycm_path_to_python_interpreter` option.
  - on UNIX platforms, use `sys.executable` as the path to Python interpreter;
  - on Windows, deduce it from `os.__file__` path (it should always be in the parent folder).

In all cases, check the version (2.6 or 2.7) of the Python interpreter path by running it.

This PR may break things. It needs thorough testing.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1896)
<!-- Reviewable:end -->
2016-01-25 08:24:34 +09:00
micbou
a0943d5d31 Fall back to Python search in PATH 2016-01-23 16:59:13 +01:00
micbou
c92b4ac0ff Fix issue in EventNotification tests
assert_has_calls is not enough to check if a call didn't raise a
warning. We also need to check the number of calls. This is done by
creating a subclass of MagicMock implementing the
assert_has_exact_calls method.
2016-01-21 03:05:15 +01:00
Homu
d05bf551a6 Auto merge of #1929 - micbou:appveyor, r=puremourning
[READY] Update get-pip.py script URL on AppVeyor

This fixes the following error on AppVeyor:
```
You're using an outdated location for the get-pip.py script, please use the one available from https://bootstrap.pypa.io/get-pip.py
```

I also changed the way `get-pip.py` is downloaded. This is now done like in the `ycmd` repository.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1929)
<!-- Reviewable:end -->
2016-01-20 16:28:18 -08:00
micbou
bdf09a7537 Update get-pip.py script URL on AppVeyor
Update also the way get-pip.py script is downloaded.
2016-01-20 22:03:11 +01:00
Homu
f691a5f513 Auto merge of #1916 - mispencer:AddMissingOmniImplemention, r=micbou
Add missing implementation on OmniCompletionRequest

OmniCompletionRequest is missing the RawResponse method, so any attempt to call
it calls the base class method instead. However, since the data structures of
this class and base class are different, this causes an error.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1916)
<!-- Reviewable:end -->
2016-01-18 18:57:22 -08:00
Chiel ten Brinke
01edabda37 Add notes to readme according to #1891. 2016-01-18 10:21:22 +01:00
Spencer G. Jones
c2d473c4ba Add missing implementation on OmniCompletionRequest
OmniCompletionRequest is missing the RawResponse method, so any attempt to call
it calls the base class method instead. However, since the data structures of
this class and base class are different, this causes an error.
2016-01-16 11:36:58 -07:00
Homu
e5e5a6aa7a Auto merge of #1900 - oblitum:update-ycmd, r=Valloric
Updating to latest ycmd

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1900)
<!-- Reviewable:end -->
2016-01-13 13:35:37 +09:00
Francisco Lopes
6f43e32004 Updating to latest ycmd 2016-01-13 00:51:13 -02:00
Homu
ea3e207643 Auto merge of #1899 - oblitum:empty-insertion-text, r=oblitum
Allows empty insertion text.

This is useful for hints for example, whose purpose is information
display solely.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1899)
<!-- Reviewable:end -->
2016-01-13 11:24:41 +09:00
Homu
aed1d817a4 Auto merge of #1898 - mispencer:DontCacheAvailableCheckErrors, r=micbou
Don't cache invalid completer check results

[Lets try this again](https://github.com/Valloric/YouCompleteMe/pull/1897#issuecomment-170978003)

If the check for available completers isn't run because the server isn't
alive, or the check request erred or times out, don't cache the result. Only
cache valid returns.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1898)
<!-- Reviewable:end -->
2016-01-13 08:55:32 +09:00
Francisco Lopes
9fdd465c26 Allows empty insertion text.
This is useful for hints for example, whose purpose is information
display solely.
2016-01-12 21:48:06 -02:00
Spencer G. Jones
1f868a8b47 fixup! Don't cache invalid completer check results 2016-01-12 15:15:29 -07:00
micbou
9a27c990db Fix typo in test 2016-01-12 22:51:15 +01:00
micbou
1cdbe4a770 Add python3 failing tests 2016-01-12 22:48:48 +01:00
micbou
a80846e35d Check Python interpreter pathname
Rename CheckPythonVersion to IsPythonVersionCorrect.
In embedders, sys.executable may contain a Vim path instead of a Python
one. To avoid starting a Vim instance in this case, we check that given
path ends with a Python 2.6 or 2.7 name using a regex.
Add tests for this regex.
2016-01-12 22:36:31 +01:00
Spencer G. Jones
e57178da00 Don't cache invalid completer check results
If the check for available completers isn't run because the server isn't
alive, or the check request erred or times out, don't cache the result. Only
cache valid returns.
2016-01-12 11:58:18 -07:00
micbou
c7e32b3600 Implement new strategy to find Python path 2016-01-12 01:56:29 +01:00
Homu
f25e1c9a48 Auto merge of #1893 - micbou:windows-generators-readme, r=vheon
[READY] Update CMake generators for MSVC in README

Following PR Valloric/ycmd#285, older versions of CMake (< 3.0) don't support the MSVC generator names with the year component but newer versions accept both formats. So, replace the generator names in README.md by the old ones.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1893)
<!-- Reviewable:end -->
2016-01-12 07:16:40 +09:00
Homu
f8b3d6643c Auto merge of #1875 - micbou:server-crash-message, r=puremourning
[READY] Update notifications when ycmd server crashed

Instead of printing the last 30 lines of the `stderr` logfile if the server crashed, we tell the user to run the `:YcmToggleLogs stderr` command to check the logs.

Remove `SERVER_CRASH_MESSAGE_SAME_STDERR` message because we are always using the `stderr` logfile since PR #1753. Also, console ouput cannot be used to see the logs.

Simplify `_NotifyUserIfServerCrashed` method by using `CheckFilename` function from `vimsupport` module.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1875)
<!-- Reviewable:end -->
2016-01-12 05:15:22 +09:00
micbou
1805b88864 Update Windows generators in README 2016-01-11 13:05:55 +01:00
Strahinja Val Markovic
135923a40a Mentioning the need for racer flag in Rust section
This covers users that have already installed YCM before and are looking
to set up Rust completion. They're unlikely to start reading from the
Installation section, so we mention the need for the new build flag to
prevent "why doesn't it work for me" confusion.
2016-01-09 10:30:30 -08:00
Strahinja Val Markovic
21b6ced3b5 Updating to latest ycmd 2016-01-09 00:47:24 -08:00
Homu
3bed9f2570 Auto merge of #1888 - jwilm:rust-lang-support, r=Valloric
Add support for the Rust programming language

Support for the Rust programming language is added using ycmd's racerd completer. This PR contains documentation for using the Rust completer and an update to the ycmd submodule.

## TODO
- [x] Update ycmd submodule once Valloric/ycmd#268 lands

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1888)
<!-- Reviewable:end -->
2016-01-09 12:31:43 +09:00
Joe Wilm
210db41a42 fixup! Update ycmd 2016-01-08 07:49:56 -08:00
Joe Wilm
0a4bd8ddf2 Fix Windows install.py invocations in README.md 2016-01-08 07:28:49 -08:00
Joe Wilm
9494b76bc2 Update ycmd 2016-01-07 09:21:35 -08:00
Joe Wilm
a74a4cbd7a Add support for the Rust programming language 2016-01-07 08:52:15 -08:00
Homu
4168a829ac Auto merge of #1876 - puremourning:fix-goto-references, r=micbou
[READY] Fix GoTo lists arriving at the wrong column.

## Problem

When a `GoTo` command returns a list of destinations, such as declarations and definitions in Python and references in JavaScript, we pop the Vim quick fix list with a list of destinations. however, we always jump to the character before the actual declaration/definition.

## Resolution

Vim's QuickFix lists require 1-based columns, which is what is returned from ycmd's commands, so don't subtract 1 from the column number.

As noted in the comments, the Vim documentation for `setqflist` is somewhat vague about this "byte offset", but it is confirmed to mean "1-based column number" both in testing and in `:help getqflist`.

## Manual testing

Tested this with the Tern completer (`:YcmCompleter GoToReferences`) and Jedi completer (`:YcmCompleter GoToDeclaration`). For the Jedi completer, use something like:

```python
x = 1
if False:
  x = 2
else:
  x = 3

print( str(x) )
```

Then `:YcmCompleter GoToDeclaration` on `x`. This returns a list, which pops up the quick fix window.

*Previous behaviour*

Previously, the jump would go to the character before the actual declaration (i.e. the `<space>` before `x` in each line)

## Automated testing

Just some simple execution of the changed code, proving that we don't take 1 from the column.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/1876)
<!-- Reviewable:end -->
2016-01-05 08:22:06 +09:00
Ben Jackson
134b06b65e Fix GoTo lists arriving at the wrong column.
Vim's QuickFix lists require 1-based columns, which is what is returned
from ycmd's commands.

 As noted in the comments, the Vim documentation for setqflist is
somewhat vague about this "byte offset", but it is confirmed to mean
"1-based column number" both in testing and in :help getqflist.
2016-01-04 23:04:13 +00:00