Commit Graph

597 Commits

Author SHA1 Message Date
Ben Jackson
fa32819d4f Pass cwd to completer for filename completions 2015-08-26 23:41:40 +01:00
Ben Jackson
258951ece4 If errors are returned in addition to completion suggestions, print them 2015-08-17 01:13:20 +01:00
Ben Jackson
98c4d712b4 YouCompleteMe client support for FixIt subcommands 2015-08-05 22:09:07 +01:00
micbou
0fd842a29e Set stdin to PIPE on Windows only when necessary
Executing the check_core_version.py script with SafePopen and stdin to
PIPE raises an error in Vim on Windows. Since the stdin option is only
useful when starting the ycmd server, it is only set in this case.
2015-07-02 20:47:13 +02:00
Strahinja Val Markovic
8505544d23 Deleting obsolete code 2015-07-02 08:38:27 -07:00
Strahinja Val Markovic
9de61988ac Fix bad formatting for YcmCompleter message
Fixes #1522
2015-06-30 14:24:05 -07:00
Strahinja Val Markovic
ecb4252322 Minor formatting fixes 2015-06-30 13:52:47 -07:00
micbou
69eee2097f Redraw the screen before displaying a message
This avoids the infamous "Press ENTER or type command to continue"
prompt when editing a new C-family file.
2015-06-20 05:57:01 +02:00
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
a70bf21d29 Updating to latest ycmd
This required changing the HMAC calculation logic.
2015-04-17 15:01:29 -07:00
Sidney San Martín
0e9324d012 Fix spurious warning about missing newline at EOF
C requires a newline at the end of any file, and clang may warn if it's
missing. Vim always saves one to disk, and we should mimic this.
2015-04-15 00:38:05 -07:00
Andrea Cedraro
3c63d22c59 Add new-or-existing-tab as ycm_goto_buffer_command method
resolves #1398
2015-03-26 12:10:46 +01:00
Ben Jackon
2215bcdeb5 Support completer commands that return text …
This is required to allow the ycmd GetType and GetParent subcommands to echo
their reults in vim. The apporach is to display any text returned from a
subcommand in the 'message' property assuming that the command is not a known
'GoTo' command.
2015-03-19 13:31:24 +00:00
Strahinja Val Markovic
74668373f8 Updating to latest ycmd 2015-03-06 17:07:58 -08:00
Strahinja Val Markovic
4436d515d3 Updating to latest ycmd 2015-01-30 10:21:35 -08:00
Strahinja Val Markovic
ba6e1408fd Updating to latest ycmd 2015-01-22 10:14:28 -08:00
Strahinja Val Markovic
2fafab88c4 Ignoring the new "already being parsed" message
This exception comes from ycmd and is not something the user can do
anything about, so let's rather not show it.
2014-12-10 13:46:10 -08:00
Strahinja Val Markovic
def392d24c Fix Vim E885: not possible to change sign
Clang will sometimes give a diagnostic for line 0, and Vim borks on
placing signs for line 0.
2014-10-29 10:16:38 -07:00
Strahinja Val Markovic
fe24f02005 Minor refactoring 2014-10-29 10:02:41 -07:00
Strahinja Val Markovic
ecd2041d9b Updating to latest ycmd
Also required an ABI version bump (some internal names were changed).
2014-10-13 15:14:56 -07:00
Strahinja Val Markovic
33b5b1eb02 Minor refactoring & stylistic changes. 2014-09-19 12:30:15 -07:00
Stanislav Seletskiy
3fcc63127f
Fix handling of signs placed by other plugins
It appears to address numerous amount of issues, including: #812, #801, #887.

Proposed solution uses dummy sign which is placed before updating
diagnostic signs and unplaced afterwards, which eliminates any
flickering. Also, it not just unplace all, it unplaces only that marks
that are changed, so performance should not be an issue in case of many
diagnostic messages.

It's common solution that can be found in some vim plugins that manage
signatures.

Signed-off-by: Stanislav Seletskiy <s.seletskiy@gmail.com>
2014-09-19 03:38:10 +07: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
feca403431 Now extracting PHP functions.
Needed special support because of 'contained' syntax arg.

Fixes #1143
Related #1058
2014-09-02 10:53:38 -07:00
Strahinja Val Markovic
15d305ab11 'Function' syntax group now correctly configured 2014-09-02 10:34:26 -07:00
Strahinja Val Markovic
2a704bc668 Custom identifier support now done.
This commit is the YCM-client part of the support. The ycmd support is
already done.

We now need per-language identifier regexes in ycmd (see
identifier_utils.py). There's some for HTML, CSS and the generic regex
that was used for everything until now.  Pull requests welcome for other
languages.

Fixes #86.
2014-08-28 11:39:10 -07:00
Strahinja Val Markovic
57b1ae129c Added a unicode test for OverlapLength() 2014-08-28 11:39:10 -07:00
Strahinja Val Markovic
c032cf30c0 Removing default server_location. 2014-08-22 11:25:58 -07: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
Strahinja Val Markovic
f1ebf51fcb Fix traceback on quote in filename
Fixes #1109
2014-07-31 10:30:03 -07:00
Val Markovic
fd324cbcbb Merge pull request #1070 from evansb/master
Fix unicode-character filename bug.
2014-07-21 15:31:45 -07:00
Evan Sebastian
d18d515b29 Fix unicode-character filename bug.
Issued here https://github.com/Valloric/YouCompleteMe/issues/1069
To reproduce:
1. Create any file with unicode character on its filename, e.g `Ω.c`
2. Open the file and start adding codes until >5 lines (i.e ycm start compiling)
3. YCM will crash due to unicode encoding error. See issue referenced above for complete log.
2014-07-07 22:52:17 +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
6cd929c829 Further support for diag line_num < 1
Fixes #1028
2014-06-09 10:18:03 -07:00
Strahinja Val Markovic
afbc7869a7 Fix off-by-one error with location list diags 2014-06-09 10:04:07 -07:00
Strahinja Val Markovic
0cdb588207 Updating to latest ycmd
Diagnostic & completion 'kind' changed in the REST API.
2014-06-03 14:49:53 -07:00
Strahinja Val Markovic
e9a318fc7c Update to latest ycmd
Upstream completions API changed.
2014-06-02 15:15:45 -07:00
Strahinja Val Markovic
748afecc4a Handle libclang diags for line_num 0
Fixes #978
2014-05-29 13:25:43 -07:00
Strahinja Val Markovic
09d4723fcc Updating to latest ycmd
Top-level 'filetypes' property not needed in request data anymore.
2014-05-29 10:42:46 -07:00
Strahinja Val Markovic
666cf3859a Better detection of shortmess 'c' availability
Also noting that the annoying messages during completion go away with Vim
7.3.314.

Related to #642.
2014-05-28 15:48:49 -07:00
Strahinja Val Markovic
8615e408b4 Updating to latest ycmd 2014-05-28 11:24:33 -07:00
Strahinja Val Markovic
5d647fec99 Removing erroneous whitespace 2014-05-28 10:20:54 -07:00
Strahinja Val Markovic
6fa49582ed Fix missing param in OmniCompletionRequest 2014-05-28 00:05:50 -07:00