Commit Graph

2379 Commits

Author SHA1 Message Date
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
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
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
zzbot
f379ec103f
Auto merge of #3088 - micbou:settings-docs, r=micbou
[READY] Update C-family documentation

Update documentation to reflect the changes introduced by PRs https://github.com/Valloric/ycmd/pull/1035 and https://github.com/Valloric/ycmd/pull/1057.

<!-- 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/3088)
<!-- Reviewable:end -->
2018-07-25 11:49:35 -07:00
micbou
52c022708c
Update C-family documentation 2018-07-25 20:45:57 +02:00
zzbot
8a911c1a80
Auto merge of #3087 - micbou:filepath-blacklist-docs, r=micbou
[READY] Add g:ycm_filepath_blacklist option to documentation

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

<!-- 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/3087)
<!-- Reviewable:end -->
2018-07-25 11:24:43 -07:00
micbou
87702559f3
Support modifiers for GoTo commands 2018-07-24 18:07:41 +02:00
micbou
31b6d9426a
Add g:ycm_filepath_blacklist option to documentation 2018-07-24 02:14:38 +02:00
zzbot
459b3e620e
Auto merge of #3082 - micbou:update-ycmd, r=Valloric
[READY] Update ycmd

Include the following changes:

 - PR Valloric/ycmd#1028: rewrite Python completer;
 - PR Valloric/ycmd#1035: prioritize compilation database over global extra conf;
 - PR Valloric/ycmd#1036: use TypeScript completer for JavaScript;
 - PR Valloric/ycmd#1038: fix GetDoc command on symbols declared in system headers;
 - PR Valloric/ycmd#1039: handle FlagsForFile returning nothing;
 - PR Valloric/ycmd#1049: update Unicode Standard to 11.0.0;
 - PR Valloric/ycmd#1051: inform user if maximum number of diagnostics is exceeded;
 - PR Valloric/ycmd#1052: add the regex module to sys.path in ycmd exclusively;
 - PR Valloric/ycmd#1056: include Jedi performance improvements;
 - PR Valloric/ycmd#1057: migrate the Clang completer to Settings in extra conf;
 - PR Valloric/ycmd#1058: use node only if tsserver is supposed to run through it;
 - PR Valloric/ycmd#1061: add option to disable the filepath completer.

Documentation will be updated in separate PRs for Valloric/ycmd#1028, Valloric/ycmd#1036, Valloric/ycmd#1057, and Valloric/ycmd#1061.

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

<!-- 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/3082)
<!-- Reviewable:end -->
2018-07-23 15:35:03 -07:00
zzbot
17beac58a3
Auto merge of #3086 - micbou:python-3.7, r=Valloric
[READY] Test Python 3.7 on AppVeyor

<!-- 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/3086)
<!-- Reviewable:end -->
2018-07-23 15:02:20 -07:00
micbou
2d213e7ed2
Test Python 3.7 on AppVeyor 2018-07-23 21:29:48 +02:00
micbou
9b1eb3a038
Update ycmd
Include the following changes:
 - rewrite Python completer;
 - prioritize compilation database over global extra conf;
 - use TypeScript completer for JavaScript;
 - fix GetDoc command on symbols declared in system headers;
 - handle FlagsForFile returning nothing;
 - update Unicode Standard to 11.0.0;
 - inform user if maximum number of diagnostics is exceeded;
 - add the regex module to sys.path in ycmd exclusively;
 - include Jedi performance improvements;
 - migrate the Clang completer to Settings in extra conf;
 - use node only if tsserver is supposed to run through it;
 - add option to disable the filepath completer.
2018-07-20 20:58:09 +02:00
zzbot
e1ead995c1
Auto merge of #3024 - micbou:diagnostic-matches-current-buffer, r=micbou
[READY] Update diagnostic matches for all windows

Since the `getmatches` and `setmatches` Vim functions only allow manipulating matches for the current window, we shouldn't update diagnostic matches if the buffer is not the current window.

<!-- 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/3024)
<!-- Reviewable:end -->
2018-06-20 11:46:15 -07:00
zzbot
e49f817bfe
Auto merge of #3051 - micbou:fix-typos-documentation, r=puremourning
[READY] Fix typos in documentation

Some of them found with `:set spell`.

<!-- 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/3051)
<!-- Reviewable:end -->
2018-06-10 10:57:12 -07:00
micbou
a97bff78d6
Fix typos in documentation 2018-06-10 18:11:17 +02:00
micbou
115f360092
Update matches for all windows 2018-06-03 18:58:09 +02:00
zzbot
c9ff217737
Auto merge of #3032 - micbou:msvc-12-docs, r=micbou
[READY] Remove Visual Studio 12 generator from the docs

Forgot to remove this CMake generator in commit 9392f7fd61.

<!-- 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/3032)
<!-- Reviewable:end -->
2018-06-02 11:33:48 -07:00
zzbot
17f28c68ff
Auto merge of #3013 - bstaletic:anaconda_faq, r=puremourning
[READY] Anaconda python FAQ

# 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

Since the latest anaconda works with YCM, let's just state that it is not supported in the README.

[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

<!-- 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/3013)
<!-- Reviewable:end -->
2018-06-02 09:39:54 -07:00
Boris Staletic
fad5c5be2d Anaconda python FAQ 2018-06-02 16:55:05 +02:00
zzbot
2dcb3e91ad
Auto merge of #3045 - micbou:flake8-ycm, r=puremourning
[READY] Enforce YCM coding style

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

<!-- 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/3045)
<!-- Reviewable:end -->
2018-06-02 07:46:13 -07:00
zzbot
470518075d
Auto merge of #3035 - micbou:show-detailed-diagnostic-none, r=puremourning
[READY] Fix YcmShowDetailedDiagnostic command on line without diagnostic

The `YcmShowDetailedDiagnostic` command raises a `NoneType` exception on a line with no diagnostic;
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "YouCompleteMe/autoload\..\python\ycm\youcompleteme.py", line 663, in ShowDetailedDiagnostic
    if 'message' in detailed_diagnostic:
TypeError: argument of type 'NoneType' is not iterable
```

<!-- 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/3035)
<!-- Reviewable:end -->
2018-06-02 07:21:43 -07:00
zzbot
bdfcb660eb
Auto merge of #3027 - micbou:fix-debug-info-test, r=puremourning
[READY] Fix debug info test on Python 2 with Clang support

Since PR https://github.com/Valloric/ycmd/pull/925, the list of flags returned by ycmd are prefixed with `u` on Python 2.

<!-- 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/3027)
<!-- Reviewable:end -->
2018-06-02 06:06:35 -07:00
micbou
29717194fc
Do not ignore E211 rule from Flake8 2018-05-30 09:21:20 +02:00
micbou
6b4d705238
Add flake8-ycm to test requirements
Fix errors reported by flake8-ycm.
2018-05-30 02:53:28 +02:00
micbou
a7ec7a6cd9
Fix YcmShowDetailedDiagnostic command on line without a diagnostic
The YcmShowDetailedDiagnostic command raises a NoneType exception on a line
with no diagnostic.
2018-05-24 11:52:57 +02:00
zzbot
e5b28f5c32
Auto merge of #3034 - midchildan:add-cuda, r=micbou
Add CUDA 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.
- [ ] 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

This PR follows Valloric/ycmd#1031. The specific changes are listed below:

- enable linting for cuda files
- disable syntastic for cuda files
- update docs

I have not included tests because there are no tests for the C++ counterparts.

[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

<!-- 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/3034)
<!-- Reviewable:end -->
2018-05-24 01:57:09 -07:00
midchildan
2ad0cfc0d8
Update ycmd
Include the following changes:
- fix issues reported by the flake8-comprehension plugin
- fix regex used to complete include statement
- upgrade regex submodule
- cache flags by file and client data
- upgrade jdt.ls to snapshot 0.18.0
- prevent users from modifying extra conf data
- clang-tidy: performance checks
- api: only split lines on line feed characters (\n)
- remove unused enumerate()
- add tests simulating completer's shutdown timing out
- clang tidy support
- add CUDA support
2018-05-24 16:08:28 +09:00
midchildan
23771b379a
Add CUDA support 2018-05-24 14:34:15 +09:00
micbou
6aeaae20a8
Remove Visual Studio 12 generator from the docs 2018-05-22 01:17:06 +02:00
micbou
638ee2e5f8
Fix debug info test on Python 2 with Clang support 2018-05-18 18:20:41 +02:00
zzbot
8e448920c9
Auto merge of #3023 - micbou:mutable-user-options, r=puremourning
[READY] Allow users to change the options by restarting the server

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

<!-- 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/3023)
<!-- Reviewable:end -->
2018-05-15 15:05:55 -07:00
micbou
d16d3cebc4
Allow users to change the options by restarting the server 2018-05-15 23:45:54 +02:00
zzbot
acb015fd1c
Auto merge of #3016 - alexDarcy:doc_freebsd, r=micbou
Updating documentation for FreeBSd 11.x

# 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

The instructions for FreeBSD were not up-to-date. This works for FreeBSD 11.x (the latest). As I've only changed the readme, no tests were run.

[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/3016)
<!-- Reviewable:end -->
2018-05-12 02:47:16 -07:00
Alexis Praga
71a33dde98
Updating documentation for FreeBSd 11.x 2018-05-10 21:14:50 +02:00
zzbot
c027b16ced
Auto merge of #3012 - micbou:issue-template-logs, r=micbou
[READY] Ask users to set the log level to debug when including the contents of the logfiles

When reporting an issue, users may include the contents of the logfiles with the default log level `info`, which is not really useful. Ask them to set the log level to `debug`.

<!-- 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/3012)
<!-- Reviewable:end -->
2018-05-05 07:01:08 -07:00
micbou
d6503b77d1
Update issue template
Ask users to set the log level to debug when including the contents of the
logfiles in an issue report.
2018-05-05 14:36:45 +02:00
zzbot
68611cf851
Auto merge of #3011 - micbou:flake8-comprehensions, r=puremourning
[READY] Fix issues reported by the flake8-comprehensions plugin

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

<!-- 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/3011)
<!-- Reviewable:end -->
2018-05-05 04:45:48 -07:00
micbou
29231e839d
Fix issues reported by flake8-comprehensions 2018-05-03 13:11:19 +02:00
zzbot
36f716db43
Auto merge of #3010 - micbou:update-ycmd, r=bstaletic
[READY] Update ycmd

Include the following changes:

 - PR Valloric/ycmd#919: cache include paths;
 - PR Valloric/ycmd#1013: increase Python 2 requirement to 2.7.1;
 - PR Valloric/ycmd#1015: force MSVC to treat source files as UTF-8 encoded;
 - PR Valloric/ycmd#1017: bundle and compile the regex module;
 - PR Valloric/ycmd#1020: use `sysconfig` instead of `distutils.sysconfig` in build script.

Fixes https://github.com/Valloric/YouCompleteMe/issues/3001.
Fixes https://github.com/Valloric/YouCompleteMe/issues/3007.

<!-- 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/3010)
<!-- Reviewable:end -->
2018-05-02 13:41:44 -07:00
micbou
f76c889608
Add regex compilation step to full instructions 2018-05-02 20:59:30 +02:00
micbou
340492676b
Update ycmd
Include the following changes:
 - cache include paths;
 - increase Python 2 requirement to 2.7.1;
 - force MSVC to treat source files as UTF-8 encoded;
 - bundle and compile the regex module;
 - use sysconfig instead of distutils.sysconfig in build script.
2018-05-02 20:35:26 +02:00
zzbot
2857c1c109
Auto merge of #3004 - micbou:remove-ninja-ci, r=micbou
[READY] Do not install Ninja on CI services

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

<!-- 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/3004)
<!-- Reviewable:end -->
2018-04-30 14:53:12 -07:00
zzbot
d665f817ea
Auto merge of #3006 - micbou:fix-diacritic-table, r=puremourning
[READY] Fix smart matching example in documentation

The smart matching example is wrong: `o` can't match `ø` because `ø` is a letter on its own, not a `o` with a combining mark.

<!-- 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/3006)
<!-- Reviewable:end -->
2018-04-30 07:56:26 -07:00
micbou
0d764b3d10
Use correct example in smart matching table 2018-04-29 12:59:20 +02:00