Commit Graph

127 Commits

Author SHA1 Message Date
zzbot
032281307d
Auto merge of #3296 - kadircet:master, r=micbou
[READY] Add instructions for clangd into README

# 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

clangd-based completer has been introduced into ycmd for a while now. I believe it is time to let users know about it as well. We are also updating clangd's docs and it would be nice to point people using vim into YCM docs for integration. You can see the patch for that one in https://reviews.llvm.org/D56718.

Also you can have a look at the end product of the changes at https://kadircet.github.io/YouCompleteMe

[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/3296)
<!-- Reviewable:end -->
2019-02-16 01:54:52 -08:00
Kadir Cetinkaya
f9b26a066c Add clangd into docs 2019-02-16 10:46:29 +01:00
Boris Staletic
63bcaf30f0 Restore neovim support 2019-01-23 07:56:43 +01: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
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
micbou
06bd763bf0
Increase Python 2 requirement to 2.7.1
Tests are failing on Python 2.7.0 with the exception "TypeError: argument can't
be <type 'unicode'>"
2018-04-25 01:43:46 +02:00
Boris Staletic
605ef42cd6 Drop Python 2.6 and Python 3.3 2018-01-30 18:34:50 +01:00
Ben Jackson
4f555a2c8d Add a more obvious explanation for users of the default system Vim on macOS 2017-07-23 22:17:24 +01:00
micbou
377e472b7e
Add key mappings to close completion menu 2017-06-21 02:58:15 +02:00
micbou
ea48fcffea
Require UTF-8 encoding 2017-06-19 18:00:19 +02:00
zzbot
acf9edeb1c Auto merge of #2656 - micbou:remove-allow-changing-updatetime-option, r=bstaletic
[READY] Completely remove g:ycm_allow_changing_updatetime option

Forgot to remove the `g:ycm_allow_changing_updatetime` option from `plugin/youcompleteme.vim` in PR #2636.

<!-- 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/2656)
<!-- Reviewable:end -->
2017-05-18 20:11:09 -07:00
micbou
07c04f090a
Remove g:ycm_allow_changing_updatetime option 2017-05-19 03:04:18 +02:00
micbou
d44ad0894b
Display diagnostics asynchronously
Use the timers feature to display diagnostics asynchronously instead of waiting
for an autocommand to trigger.
Increase Vim version requirement to 7.4.1578.
Drop the CursorHold and CursorHoldI autocommands.
Parse buffer on the TextChanged autocommand instead of CursorMoved.
2017-05-15 23:57:09 +02:00
micbou
c31152d345
Always defer loading at VimEnter
YCM should start the same whether Vim is running in GUI or not. Otherwise, this
makes it difficult for other plugins to interact with YCM at startup because
they can't predict how YCM will start unless they also check if Vim is running
in GUI which is unreasonable. Since we can't load it at Vim startup because of
a deadlock issue, we should always defer it at the VimEnter event.
2017-03-02 21:48:56 +01:00
micbou
cd79e99746
Use gui_running instead of gui
has('gui') returns 1 even in console Vim if it is compiled with +gui.
2017-02-22 14:20:46 +01:00
Greg Hurrell
878d329e8f Fix whitespace 2017-02-09 14:46:36 -08:00
Greg Hurrell
1e3b7bae51 Don't use VimEnter initialization except when stating gui
This is another attempt at:

https://github.com/Valloric/YouCompleteMe/pull/2473

Which removed the apparently flawed attempt at "lazy" loading of YCM.
While it fails to get the load out of the critical startup path, it
*does* serve the useful purpose when starting up gvim of avoiding a
deadlock situation in gvim.

So, this time, we keep VimEnter, but only for the gui-starting case. We
update the comment to explain what is actually happening. And we can
keep the docs about how to defer loading.
2016-12-16 19:21:09 -08:00
Val Markovic
caa4291a9a
Revert "Auto merge of #2473 - wincent:no-lazy, r=Valloric"
This reverts commit c182c0529b, reversing
changes made to 48b7ccef76.
2016-12-15 21:21:35 -08:00
Greg Hurrell
c22e425e25 Remove non-lazy lazy loading code
As discussed in https://github.com/Valloric/YouCompleteMe/pull/2454,
this code doesn't do what it claims to do on the surface, so we should
delete it.

I'll follow up with a commit to explain in the README how to actually
defer loading of the plug-in.
2016-12-13 23:43:39 -08:00
micbou
b26d395ed1
Remove outdated Syntastic option 2016-12-01 18:13:02 +01:00
micbou
b93c1fd47c
Add client logfile 2016-11-19 18:47:43 +01:00
Francisco Lopes
5576c9cf09 Bump Vim version a bit more to 7.4.143.
Reason:

  A fix has been applied to bring back triggering of TextChangedI events.

- e21b6b2a8d
2016-09-16 17:41:40 -03:00
Francisco Lopes
85bdbdb206 Bump minimun Vim version to 7.4. 2016-09-16 17:41:40 -03:00
Homu
c44489af16 Auto merge of #2084 - lifepillar:packages, r=puremourning
Support lazy loading with :packadd.

- [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

Vim recently has introduced a new feature called 'packages', which
permits, among the rest, to disable automatic loading a plugin at
startup. Plugins that are disabled at startup may be manually loaded
during a session using `:packadd` (see `:h packages`, `:h :packadd`).
Of course, a plugin that is loaded after startup cannot rely on VimEnter
events.

In order to support lazy loading YCM, check whether YCM is sourced
during startup or at a later time. In the former case, define an
autocommand as before; in the latter case, enable YCM immediately.

Why would one want to load YCM lazily? I use YCM only for certain file
types (Python), and I prefer not to have pop up menus appearing
all the time for other file types. In my workflow, I may enable YCM only
if I start Vim for Python coding sessions.

Tests not included because the change is in VimScript code only, and
testing this feature is not trivial.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2084)
<!-- Reviewable:end -->
2016-07-11 06:29:59 +09:00
micbou
b440f682a8 Add error messages when ycmd crashed
Display an error message to the user depending on the status code
returned by the ycmd server.
Remove ycm_core checks in plugin/youcompleteme.vim. These checks are
now done by the ycmd server.
Do not start a separate process to check the core version but rely on
ycmd returning a specific exit code. This slightly improves the Vim
startup time.
2016-05-02 23:08:32 +02:00
Lifepillar
bf63188066 Support lazy loading with :packadd.
Vim recently has introduced a new feature called 'packages', which
permits, among the rest, to disable automatic loading a plugin at
startup. Plugins that are disabled at startup may be manually loaded
during a session using :packadd (see :h packages, :h :packadd). Of
course, a plugin that is loaded after startup cannot rely on VimEnter
events.

In order to support lazy loading YCM, check whether YCM is sourced
during startup or at a later time. In the former case, define an
autocommand as before; in the latter case, enable YCM immediately.
2016-03-26 21:30:24 +02:00
Andrea Cedraro
9e6645f515 Rename ycmd python option
- Rename ycm_path_to_python_interpreter to ycm_ycmd_python_interpreter
- Keep ycm_path_to_python_interpreter backward compatible
2016-03-26 19:15:08 +01:00
Val Markovic
b04870c824 VimL support for py3 2016-02-28 13:54:49 -08:00
Val Markovic
fd0c2cc1d8 Updating to latest ycmd
This includes the using the new API for OmniCompleter.
2016-02-24 17:10:13 -08:00
micbou
186aa6b671 Remove g:ycm_server_use_vim_stdout option
This option does not work like expected. Logs are not written to the
console. It also makes the ycmd server unresponsive on Windows.
2015-10-27 18:19:22 +01:00
Spencer G. Jones
9f568be39a fixup! Add CompleteDone hook, with namespace insertion for C# 2015-08-31 10:51:23 -06:00
Andrea Cedraro
e28c709b99 Disable on large file
closes #1238
2014-12-05 10:32:52 +01:00
Strahinja Val Markovic
78610d2479 Clarified the 'old libs found' error message 2014-05-14 15:05:34 -07:00
Strahinja Val Markovic
89eb916f3d Fixing bug in YCM library detection 2014-05-14 15:02:51 -07:00
Strahinja Val Markovic
f1cf9186cb Error message for old location libs 2014-05-13 14:26:33 -07:00
Val Markovic
9d388ef4b3 Merge pull request #845 from davits/master
Added options to choose GoTo commands buffer...
2014-03-24 12:59:35 -07:00
amdt
02d84a4cbf Restore cpoptions before calling finish
The user's 'cpoptions' are saved and restored when this script finishes
normally, however there are some cases where this script finishes early,
and where the user's 'cpoptions' are not restored beforehand.
2014-03-08 16:52:12 +09:00
davits
40dc235136 Combined same_buffer and buffer_command options. 2014-03-04 14:47:43 +04:00
davits
0102d23bfe Added options to choose whether GoTo commands result should be opened in the new buffer and in which one. 2014-02-23 17:50:51 +04:00
Strahinja Val Markovic
1a33f34ec0 Adding the g:ycm_open_loclist_on_ycm_diags option 2014-01-29 10:59:15 -08:00
Strahinja Val Markovic
b1bba2e201 Changing copyright headers from me to Google
When I initially released this project, I released it under my own copyright. I
have since then worked on it in my 20% time at Google (and want to continue
doing this) and my life becomes much simpler if the copyright is Google's.

From the perspective of how this project is run and managed, **NOTHING**
changes. YCM is not a Google product, merely a project run by someone who just
happens to work for Google.

Please note that the license of the project is **NOT** changing.

People sending in future pull requests will have to sign the Google
[CLA](https://developers.google.com/open-source/cla/individual) (you can sign
online at the bottom of that page) before those pull requests could be merged
in. People who sent in pull requests that were merged in the past will get an
email from me asking them to sign the CLA as well.
2014-01-13 11:08:43 -08:00
Strahinja Val Markovic
5efd920815 Renaming and documenting the new options. 2014-01-08 19:43:21 -08:00
Strahinja Val Markovic
8090373afd Now can populate the loclist like Syntastic 2014-01-08 19:09:40 -08:00
Strahinja Val Markovic
cb359c0b6a New options for controlling the diag ui 2014-01-08 18:43:17 -08:00
Strahinja Val Markovic
6c01881e1a Replaced Syntastic support with YCM-native code
Currently, the only supported Syntastic features are the error signs in the
gutter. Other features will be added in the future.
2014-01-06 15:24:05 -08:00
Strahinja Val Markovic
cf6211055e Removing the server_idle_suicide_seconds option
This option existed so that the user can tweak it if they found the default idle
timeout too short, for instance if they leave their machine on over the weekend.

This use case is now covered by the new YcmdKeepalive system that pings ycmd
every 10 minutes as long as Vim is running. This prevents ycmd shutting down if
one leaves their Vim instance alone for a long time.

Thus the old option is useless now; ycmd now shuts down after 3 hours of
inactivity, which should only ever happen when its corresponding Vim instance
has shut down abnormally.
2013-11-20 12:33:57 -08:00
Leszek Swirski
167f090cac Fix ycm_path_to_python_interpreter getter 2013-11-15 13:46:10 +00:00
Strahinja Val Markovic
450403044b Adding new g:ycm_path_to_python_interpreter option
Fixes #663
2013-11-14 10:50:53 -08:00
Strahinja Val Markovic
4b6b5709bd Bumping the suicide timer to 24 hours 2013-10-29 11:12:55 -07:00