Commit Graph

87 Commits

Author SHA1 Message Date
Andrea Cedraro
fbdf7cc85e Reverse if logic in UpdateDiagnosticInterface 2015-06-15 16:08:56 +02:00
Andrea Cedraro
3dd24201f3 Revert "Revert "Check the server end point for available completer""
This reverts commit f5e2fc6958.
2015-06-15 16:08:56 +02:00
Andrea Cedraro
4104f7be82 Push check for NativeFiletypeCompletionUsable down
Another way in which the commit d768447 forced the client to wait for
the server to start was the UpdateDiagnosticNotifications call from the
FileReadyToParse which is called right after a buffer is loaded. In any
way if we don't have any previous FileReadyToParse request done for the
current file we bail out, so we we can wait for a FileReadyToParse
response to be available before asking if a completer is usable for the
current filetype.

ref: #1529
2015-06-15 16:08:56 +02:00
Andrea Cedraro
77947accf3 Disable completion if any of current filetypes is disable
Fixes #1531
2015-06-12 13:04:03 +02:00
Strahinja Val Markovic
f5e2fc6958 Revert "Check the server end point for available completer"
This reverts commit d7684470a2.

Fixes #1529
2015-06-11 12:37:40 -07:00
Andrea Cedraro
d7684470a2 Check the server end point for available completer
Previously we were checking if the `hook.py` file existed for the given
filetype. ycmd has an endpoint for checking if given a filetype a
semantic completer is available. To avoid redundant requests we cache
those requests for every filetype. A semantic engine cannot be added
*after* the ycmd server is started so to avoid redundant requests we
cache those requests for every filetype and we clear the cache at server
setup, in this way if we issue a `YcmRestartServer` command the server
will be setup again and if a semantic completer is available we can use
it. Should fix #1284.
2015-06-09 13:09:25 +02:00
Strahinja Val Markovic
24bbcf8811 Fix KeyError on no 'no_proxy' env var 2014-09-11 15:19:26 -07:00
Matthias Bilger
d3adb3faf1 Append to no_proxy instead of overwrite
Overwriting no_proxy may cause some trouble for other plugins using network in environments with proxy exceptions, e.g. vim-fugitive
2014-09-11 07:22:27 +02:00
Strahinja Val Markovic
32e3494d6e Handling os.getcwd() throwing an exception.
This can happen if the CWD has been deleted.

Fixes #1129
2014-08-20 13:40:17 -07:00
Strahinja Val Markovic
a5b750703f Comment update 2014-08-19 13:59:33 -07:00
Alexandre Fonseca
09379b3ff6 Allow '*' in ycm_filetype_specific_completion_to_disable.
I love YCM's auto popup with keyword completion when power typing but
would rather not have semantic completion activate unless I really want
it to (most semantic completers are somewhat slow and sometimes end up
breaking my flow). When in API exploration mode, I don't mind having
to press C-Space to force completion and wait a bit more.

Unless I'm mistaken, the current code does not allow wildcards in the
specification of filetypes on which to disable automatic semantic
completion. This change allows the use of '*' to disable automatic
semantic completion in all files.
2014-06-30 15:36:37 +02:00
Strahinja Val Markovic
9100044afc Refactored completion request creation
- OmniCompleter is now more similar to other Completers.
- CompletionRequest doesn't store start_column anymore.
- Calling BuildRequestData only once per request.
2014-05-27 17:38:34 -07:00
Strahinja Val Markovic
3d733dca2d :YcmCompleter<TAB> now won't print traceback
If there's no semantic completer set for the current filetype,
:YcmCompleter<TAB> would print an ugly traceback. Ugh.

Fixes #989.
2014-05-22 14:12:51 -07:00
Jan Vcelak
5916226f06 use IPv4 to connect to ycmd 2014-05-21 22:40:47 +02:00
Strahinja Val Markovic
d7195f6f19 Fixing race condition on server crash
Crash handling code tried to read stderr log file, but the file can be deleted
by the server befor we get to look at it. In such a case, we post a different
error message (without the log output).

Point is we do our best to get the error output if the user doesn't have
g:ycm_server_keep_logfiles set. If we can't get the logfile, oh well. We tell
the user to set that flag if they care.

Fixes #974.
2014-05-16 19:26:46 -07:00
Strahinja Val Markovic
a69bbb3009 Updating code to work with new ycmd location 2014-05-13 13:09:19 -07:00
Strahinja Val Markovic
e965e02847 Client/server communication now uses HMAC for auth
This is to prevent a convoluted exploit that can trigger remote code execution.
2014-04-25 11:07:08 -07:00
Strahinja Val Markovic
7a4f5a4a53 Minor var naming changes 2014-03-19 10:27:34 -07:00
unknown
404c167525 Removed communicate call. Moved log file handling to the server daemon 2014-03-02 00:14:14 -06:00
unknown
a4e28157c4 Added call to communicate() after terminating server 2014-02-26 22:23:29 -06:00
Strahinja Val Markovic
825b3055e5 Force ignoring of SIGINT for YCM client
This reduces fallout of pressing ctrl-c in Vim.
2014-01-29 10:18:07 -08:00
rxwen
62949c42ed flush the options_file before start the ycmd server
- There are cases on windows that the ycmd will read an empty options
  file. So, flush the options file before start the ycmd server
2014-01-14 22:05:03 +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
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
209d22cfdb DiagnosticInterface now uses server diag objects 2014-01-06 15:24:06 -08:00
Strahinja Val Markovic
c9e9a640ac Echoing diag text on when cursor on diag line 2014-01-06 15:24:05 -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
7fac081bea Merge branch 'fix-omnisharp-launch' of https://github.com/nop00/YouCompleteMe into nop00-fix-omnisharp-launch 2013-12-24 18:47:45 -08:00
Strahinja Val Markovic
1edf22357f Try to cleanup files only if they stil exist
Fixes #738
2013-12-20 13:01:48 -08:00
nop
bc9a283be6 New wrapper function around subprocess.Popen
New wrapper function around subprocess.Popen that handles stdin
correctly when on Windows (see issue #637)
2013-12-11 13:41:04 +01:00
Daniel Hahler
3e5e34b633 Only notify about a server crash once
Fixes #715
2013-12-09 22:27:11 +01: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
Strahinja Val Markovic
0226ba4c90 ycmd using Vim stdin on Windows
This resolves YCM crash problems. Fixes #637.
2013-11-07 14:53:15 -08:00
Strahinja Val Markovic
aa0ccdb925 Better client notice when ycmd crashes
Now we only show the last 30 lines of stderr instead of everything in it which
was not very useful. We also tell the user about :YcmRestartServer.
2013-11-04 11:15:03 -08:00
Strahinja Val Markovic
9ea0c39279 Forcing requests to ycmd to ignore local proxies
Fixes #641
2013-11-04 10:34:42 -08:00
Strahinja Val Markovic
6e782508b3 Now possible to sent Vim data to FlagsForFile func
Fixes #612.
2013-10-26 16:22:43 -07:00
Strahinja Val Markovic
4af2ba0faa Option "shutdown_secs" is now "suicide_secs"
Calling the option server_idle_suicide_seconds should be easier to understand.
2013-10-23 12:33:27 -07:00
Strahinja Val Markovic
262d8aad03 New ycmd watchdog kills server when idle too long
Defaults are kill server after 12 hours of inactivity; the reason why it's 12
hours and not less is because we don't want to kill the server when the user
just left his machine (and Vim) on during the night.
2013-10-23 12:21:33 -07:00
Strahinja Val Markovic
ce96a47098 Printing server PID in YcmDebugInfo 2013-10-22 10:53:31 -07:00
Strahinja Val Markovic
6d9969fa9c Surfacing ycmd server PID to user scripts
To get the PID, call function youcompleteme#ServerPid().
2013-10-22 10:51:37 -07:00
Strahinja Val Markovic
5070835d01 Ensuring server cleanup on OS signals
atexit won't run registered functions for SIGTERM which we send to the server.
This prevents clean shutdown.

Also making sure that the server logfiles are deleted as well.
2013-10-17 12:21:59 -07:00
Strahinja Val Markovic
5b37a2e36d Don't print traceback when no detailed diagnostic
We should only print the message.
2013-10-16 14:37:42 -07:00
Strahinja Val Markovic
18002e17df Better handling of crashed ycmd; restart command
Previously the YCM Vim client would go bonkers when ycmd crashed. Now the user
can continue using Vim just without YCM functionality.

Also added a :YcmRestartServer command to let the user restart ycmd if it
crashed. With a little luck, this will be rarely necessary.
2013-10-15 15:27:54 -07:00
Strahinja Val Markovic
436017bd4d Now using new ycm_client_support shared lib
This means we can now load just ycm_client_support (which is a much smaller
library) into Vim and ycm_core into ycmd. Since ycm_client_support never depends
on libclang.so, we never have to load that into Vim which makes things much,
much easier.
2013-10-15 14:15:04 -07:00
Strahinja Val Markovic
016434e846 Deleting some dead code 2013-10-14 20:46:42 -07:00
Strahinja Val Markovic
98f549aeae More robust way of picking an unused local port
Fixes #584.
2013-10-14 20:38:45 -07:00
Strahinja Val Markovic
bc607724f0 Ensuring ident completion works always
A bug turned it off when omni completion was available.

Fixes #583.
2013-10-14 13:29:28 -07:00
Strahinja Val Markovic
3ae10395ea Preventing Vim thread block on file save
Syntastic would run SyntasticCheck on file save, which would unconditionally
call _latest_file_parse_request.Response() and thus block until the request
returned from the server. We don't want that, so we throw in an explicit check
for the request being ready.
2013-10-11 19:09:21 -07:00
Strahinja Val Markovic
db45e243dd Getting path to python exe on Windows correctly
Fixes #581.
2013-10-11 11:11:02 -07:00