Commit Graph

2433 Commits

Author SHA1 Message Date
Ben Jackson
7c2b7b7ef3 Update subcommmands supported for typescript 2015-09-13 13:01:11 +01:00
Homu
a4f7d02a3b Auto merge of #1676 - micbou:fix-it-chunks-sorting, r=Valloric
Correct FixIt chunks sorting

While playing with FixIts in C++, I found the following issue. When fixing the third line in the code:
```cpp
template<int Value> struct CT { template<typename> struct Inner; };

CT<10 >> 2> ct; // expected-warning{{require parentheses}}
```
the following result is obtained:
```cpp
CT<1(0 >> 2)> ct; // expected-warning{{require parentheses}}
```
which is obviously wrong.

The issue is YouCompleteMe does not replace the chunks in the right order. It starts by adding the closing parenthesis, add one to the delta and inserts the opening parenthesis in the wrong place cause of the delta.

We actually use the expression `str(line) + ',' + str(column)` to sort the chunks by line then column whereas it should simply be `(line, column)`.

This PR fixes this issue, adds two tests which are failing in the current version, refactors the `_HandleFixitResponse` function and cleans up code.
2015-09-13 13:48:54 +09:00
Homu
9d8e85d363 Auto merge of #1677 - puremourning:add-clang-brief-to-preview, r=Valloric
Show docs from clang completer in preview window

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

We add the detailed_info (which is the function definiton) followed by the brief comment if supplied.

I added a test for the method, which is now reasonably complex.
2015-09-13 13:28:09 +09:00
Ben Jackson
5cfd6376c6 Show docs from clang completer in preview window
We add the detailed_info (which is the function definiton)
followed by the brief comment
2015-09-12 20:51:04 +01:00
micbou
8c17995bee Correct FixIt chunks sorting 2015-09-12 18:14:06 +02:00
micbou
17f5f20cd6 Add chunks sorting tests 2015-09-12 18:14:05 +02:00
micbou
2c72a3c598 Clean code in vimsupport tests 2015-09-12 18:14:04 +02:00
micbou
33316d8bf8 Refactor _HandleFixitResponse function 2015-09-12 18:13:54 +02:00
Spencer G. Jones
df73ca6b66 Update g:ycm_csharp_insert_namespace_expr documention 2015-09-11 17:14:09 -06:00
Spencer G. Jones
391b3df3b7 Update mimimum version in documention 2015-09-10 10:12:59 -06:00
Spencer G. Jones
28e318c0bb fixup! To determine which completion prompted CompleteDone, look at the new variable if vim is recent enough. 2015-09-10 09:18:48 -06:00
Spencer G. Jones
af4aaa1d17 fixup! To determine which completion prompted CompleteDone, look at the new variable if vim is recent enough. 2015-09-09 09:08:41 -06:00
Spencer G. Jones
9f134c4dd0 To determine which completion prompted CompleteDone, look at the new variable if vim is recent enough. 2015-09-09 08:27:15 -06:00
Strahinja Val Markovic
a2808ee3ff Updating to latest ycmd 2015-09-01 19:51:16 -07:00
Homu
886787ff17 Auto merge of #1662 - micbou:table-of-contents, r=Valloric
Update table of contents in README

Remove Project Management entry.
2015-09-02 11:18:12 +09:00
micbou
9fc26130ef Update table of contents in README
Remove Project Management entry.
2015-09-02 01:54:05 +02:00
Spencer G. Jones
9f568be39a fixup! Add CompleteDone hook, with namespace insertion for C# 2015-08-31 10:51:23 -06:00
Homu
f94b342989 Auto merge of #1659 - puremourning:cwd-filetype-completer, r=Valloric
Pass cwd to completer for filename completions

Required for https://github.com/Valloric/ycmd/pull/210. Please see that PR for functional and testing details.
2015-08-31 02:58:30 +09:00
Homu
042fea73f8 Auto merge of #1657 - micbou:travis-badge, r=Valloric
Use SVG Travis badge instead of PNG

Because badges need consideration (and it [still](https://github.com/Valloric/ycmd/pull/207) looks better).
2015-08-31 02:16:44 +09:00
Spencer G. Jones
dd27184970 Add CompleteDone hook, with namespace insertion for C#
Add a new vim hook on CompleteDone. This hook is called when a
completions is selected.

When forcing semantic completion with the keybind, C# completions can
return a list of importable types. These types are from namespaces which
havn't been imported, and thus are not valid to use without also adding
their namespace's import statement. This change makes YCM automatically
insert the necessary using statement to import that namespace on
completion completion. In the case there are multiple possible
namespaces, it prompts you to choose one.
2015-08-28 10:05:46 -06:00
Spencer G. Jones
7e9333a9c2 VimVersionAtLeast was not "at least" for minor/major version differences 2015-08-28 08:26:04 -06:00
micbou
dab5ab1d72 Use SVG Travis badge 2015-08-28 00:44:51 +02:00
Ben Jackson
fa32819d4f Pass cwd to completer for filename completions 2015-08-26 23:41:40 +01:00
Homu
b5bf25564c Auto merge of #1646 - FooSoft:master, r=Valloric
Fixing install script

Fixing issue #1645 where the `subprocess.call` was being incorrectly used, preventing install. Also made `install.py` be executable so that you can run it directly from shell instead of having to execute `python install.py`
2015-08-26 13:11:44 +09:00
Alex Yatskov
36ad5510e5 Make install.py be executable 2015-08-25 13:15:52 +09:00
Alex Yatskov
1348c0a53d Fixing install script. 2015-08-25 13:13:27 +09:00
Homu
b7e9871801 Auto merge of #1644 - micbou:python-run-tests, r=Valloric
[Windows support] Convert run_tests script to python

By converting run_tests script to python, we can run tests on Windows.
2015-08-25 10:17:34 +09:00
Homu
d7f641c3d1 Auto merge of #1642 - micbou:windows-support, r=Valloric
[Windows support] Convert the install script to python

Allow Windows users to run the script. 

Documentation updated.
2015-08-25 10:02:08 +09:00
micbou
0588c23c70 Update Travis configuration 2015-08-23 23:27:13 +02:00
micbou
c99aa85de2 Convert run_tests script to python
Translate the run_tests.sh script in python to make it platform independent.
2015-08-23 23:27:02 +02:00
micbou
7d87bc3f82 Update documentation 2015-08-23 20:12:24 +02:00
micbou
1b40d683be Convert the install script to python
Translate the install.sh script in python to make it platform independent.
Keep install.sh as a wrapper of install.py to not break scripts that
depend on it.
2015-08-23 20:12:16 +02:00
Homu
cc94a96c9d Auto merge of #1641 - RyuKojiro:bashless, r=Valloric
Removed the bash dependency that install.sh had

People like me use YCM on machines that don't have bash, and it's nice to not have to add it unnecessarily. This removes the bash dependency for installation.
2015-08-22 13:49:11 +09:00
Daniel Loffgren
dd143bcaaa install.sh now works without bash, and preserves the trap functionality via exits 2015-08-21 03:22:09 +09:00
Strahinja Val Markovic
689b4e15a5 Rewording the YCM readme intro section
It's time to break the semantic language support up into bullets.
2015-08-18 20:11:39 -07:00
Strahinja Val Markovic
5fb4146a49 Updating to latest ycmd 2015-08-18 20:07:46 -07:00
Homu
33621d409b Auto merge of #1632 - puremourning:general-completions-when-no-semantic, r=Valloric
If errors are returned in addition to completion suggestions, print them

Needed for https://github.com/Valloric/ycmd/pull/198

This maintains the previous client behaviour when the semantic completer throws an exception.
2015-08-19 11:30:30 +09:00
Ben Jackson
258951ece4 If errors are returned in addition to completion suggestions, print them 2015-08-17 01:13:20 +01:00
Homu
9430aee4b3 Auto merge of #1628 - puremourning:update-vim-doc, r=Valloric
Update vim help

Includes recent changes including FixIt and some other minor tweaks
2015-08-17 00:52:33 +09:00
Ben Jackson
c73b4aa529 Update vim help
Includes recent changes including FixIt and some other minor tweaks
2015-08-15 00:55:23 +01:00
Homu
b88739001c Auto merge of #1612 - icholy:master, r=Valloric
Note TypeScript support in README
2015-08-13 09:12:03 +09:00
Ilia Choly
b1ad8bba48 Note TypeScript support in README 2015-08-12 00:36:44 -04:00
Strahinja Val Markovic
c5a5145082 Updating to latest ycmd 2015-08-05 17:14:45 -07:00
Homu
c946aa5fd4 Auto merge of #1555 - puremourning:fixit, r=Valloric
[RFC] YCM Client support for FixIt commands

This change provides the client-side support in YouCompleteMe for vim providing a new :YcmFixIt command which applies changes to the vim buffer to implement trivial fixes to common coding errors where the completer provides instructions on how to fix a diagnostic. A note is added "(FixIt)" to the diagnostic text echo'd in vim when a FixIt is available.

While this may seem out of the scope of ycmd/YouCompleteMe (as a completion engine), I think it is a really useful feature, and provided straight out of libclang. so I'm sending this slightly incomplete PR (along with the associated ycmd change) to see what the appetite is within the user and maintainer community, and to get feedback on the approach.

I know that I need to write some tests, and perhaps tidy up some TODOs, but I would really appreciate any feedback on the approach. Also, I should confess that I haven't yet run the existing tests as I'm having trouble getting them to run on my mac. Hoping that travis will help me out :)

I know I also need to update the readme.

Testing has been performed manually by going through the list of .c, .cpp and .m files in clang's tests/FixIt folder and ensuring that by hitting :YcmFixIt (actually "@:" a lot!) on each diagnostic, the diagnostic went away (assuming a FixIt was available). I also mangled a number of the clang test such that the fix was spread across multiple lines, etc.

I also haven't tested this with completers other than clang completer (due to having trouble one with diagnostics getting them to work) , but of course I will prior to this being ready to merge.

I also understand that adding the vim modelines might be divisive, but the standard in this project doesn't match my usual setting :) Happy to remove them if people react angrily.

Once again thanks for the time and a great (and improving!) product.

I have signed the CLA

Demo:
![ycmfixit](https://cloud.githubusercontent.com/assets/10584846/8396802/8fce516c-1dad-11e5-91e7-a26253e489fd.gif)
2015-08-06 06:31:08 +09:00
Ben Jackson
98c4d712b4 YouCompleteMe client support for FixIt subcommands 2015-08-05 22:09:07 +01:00
Homu
baaa8be65c Auto merge of #1619 - micbou:trigger-issues, r=Valloric
Fix trigger issues

Fix issues #1597 and #1598. These issues should contain enough information to understand the changes.

Thanks to @wladston.
2015-08-05 03:32:02 +09:00
Strahinja Val Markovic
337d1c1fb9 Doc update: no need to sign the Google CLA anymore 2015-08-03 16:35:30 -07:00
micbou
037bd0f6f1 Fix trigger issues
Fix the following cases where the completion is not triggered for
the next typed character:
 - moving vertically in insert mode,
 - removing a character and entering insert mode.
2015-08-03 22:32:57 +02:00
Homu
ef6892210a Auto merge of #1594 - wladston:master, r=Valloric
Updating default semantic hooks.

The documentation was updated to be in sync with ycmd @bfcfa21,
regarding default semantic hooks defined in ycmd's completer_utils.py.
2015-08-04 01:48:52 +09:00
Wladston Viana Ferreira Filho
0812cd815d Updating default semantic hooks.
The documentation was updated to be in sync with ycmd @bfcfa21,
regarding default semantic hooks defined in ycmd's completer_utils.py.
2015-07-22 23:21:36 -03:00