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