Commit Graph

210 Commits

Author SHA1 Message Date
micbou
05256d6719
Define connect timeout
Rely on connect timeout instead of checking if the server is alive.
2017-01-24 22:43:40 +01:00
micbou
c67c581d81
Always use dot operator to concatenate strings
Vim automatically adds a space between strings when concatenating them
without the dot operator. This is not obvious so we always use the dot
operator.
Minor coding style changes when writing statements on multiple lines to
be more consistent.
2017-01-01 13:57:03 +01:00
micbou
c394895c4e
Fix large file message appearing twice
Use PostVimMessage to avoid "Press ENTER or type command to continue"
message.
2016-12-31 09:53:12 +01:00
micbou
1511ee542f
Do not use BufReadPre autocommand
This autocommand has a bug that causes the cursor to move to the first
line of the current buffer when using the pedit command.
2016-12-12 21:16:06 +01:00
micbou
b93c1fd47c
Add client logfile 2016-11-19 18:47:43 +01:00
Boris Staletic
57f64dca7b Fromating and function rename 2016-11-10 21:24:09 +01:00
Boris Staletic
30def5d246 Don't set omnifunc when not allowed 2016-11-09 16:20:23 +01:00
micbou
2fabac5a67
Fix BufferUnload event notification
Send the request as the unloaded buffer instead of the current buffer
for the BufferUnload event notification. This fixes the issue where
the filetype of the current buffer is not the same as the unloaded
buffer one, making the ycmd server uses the wrong completer when
handling the request.
2016-10-08 16:43:50 +02:00
Francisco Lopes
a3ee4a5bfc Remove unused variable 2016-09-17 17:05:50 -03:00
Francisco Lopes
1b72bc2fbf Use native TextChangedI instead of an emulation.
Long and personal experience, when TextChangedI gets used, YCM seems
to perform better, diagnostics will trigger much less frequently at
inappropriate occasions, even less with whitespace agnostic triggers,
if I recall correctly...
2016-09-16 17:41:39 -03:00
micbou
981a07ded7
Handle keyboard interruption from Vim 2016-09-13 00:53:31 +02:00
micbou
aca0f21a3d
Trigger BufferVisit event only when buffer has changed
When selecting candidates during completion, Vim jumps to the preview
window (if enabled) and jumps back to the actual buffer, triggering
twice the BufEnter autocommand event. This results in YCM sending
two BufferVisit and one FileReadyToParse event notifications to
ycmd, which is completely unnecessary since the current buffer
did not change. We improve this by only sending these events when the
entered buffer allowed to be completed has changed.
2016-09-07 11:21:41 +02:00
micbou
805911b56b Use SetQuickFixList for GoTo* subcommands
Open the quickfix window to full width at the bottom of the screen with
its height set to fit all entries. This behavior can be overridden by
using the YcmQuickFixOpened autocommand.
Add a new section for autocommands in the documentation.
Update GoTo and ReplaceChunks tests.
2016-06-13 00:25:12 +02:00
micbou
e52d252d08 Revert "Don't run the plugin when in diff mode"
This reverts commit a6d5979b08.
2016-04-09 12:09:10 +02:00
Val Markovic
eb8a24f23d Addressing review comments 2016-02-29 10:26:50 -08:00
Val Markovic
b04870c824 VimL support for py3 2016-02-28 13:54:49 -08:00
micbou
3cf6fa86f5 Rewrite SetUpPython function
Do not create YouCompleteMe object if setup failed. Use a try/except
block to prevent backtraces in Vim.
2016-02-24 17:56:31 +01:00
Val Markovic
f986bf19db Updating to latest ycmd 2016-02-22 09:50:15 -08:00
Davit Samvelyan
4d97437872 Moved parse request and diagnostics handling to python.
Moved File parse request handling and diagnostic extraction flow into
python to simplify flow and allow easier addition of new parse request
handlers such as semantic highlighter.
Refactored base_test to patch separate vimsupport functions instead of
the whole module, and interfering the test results afterwards.
Added new tests for diagnostic sign place/unplace and error/warning
count extraction API.
2016-02-21 14:47:54 +04:00
Andrea Cedraro
ad4091635e Add comment expaning why we defer setting the omnifunc 2015-12-31 00:12:38 +01:00
Andrea Cedraro
b4beed4939 Defer setting the omnifunc only the first time
Fix #1769
2015-12-30 14:41:38 +01:00
Ben Jackson
861546fac0 Display errors raised by OnFileReadyToParse in non-diagnostics filetypes 2015-12-20 17:27:17 +00:00
Kenny Kaye
bb8490e6c7 Properly namespace vim warning/error getters 2015-12-05 09:24:15 -08:00
Kenny Kaye
dafc36ba37 Expose functions to get error and warning counts 2015-12-04 14:45:11 -08:00
micbou
9ce4e31718 Do not capitalize :YcmToggleLogs argument
stdout and stderr names are rarely capitalized.
2015-11-11 14:15:01 +01:00
micbou
cbe3e04745 Add :YcmToggleLogs command 2015-11-08 18:43:52 +01:00
micbou
290a65219f Define Vim commands only if setup is successful 2015-10-12 15:27:30 +02:00
micbou
87854f0245 Move PathToPythonInterpreter function to YCM
Create a module for paths.
2015-10-09 18:53:24 +02:00
Spencer G. Jones
9f568be39a fixup! Add CompleteDone hook, with namespace insertion for C# 2015-08-31 10:51:23 -06:00
Spencer G. Jones
dd27184970 Add CompleteDone hook, with namespace insertion for C#
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.
2015-08-28 10:05:46 -06:00
micbou
037bd0f6f1 Fix trigger issues
Fix the following cases where the completion is not triggered for
the next typed character:
 - moving vertically in insert mode,
 - removing a character and entering insert mode.
2015-08-03 22:32:57 +02:00
Strahinja Val Markovic
5796f52797 Whitespace fixes 2015-07-02 14:32:27 -07:00
Strahinja Val Markovic
98d687a5e0 Updating to latest ycmd
Related to Valloric/ycmd#171
2015-07-01 17:52:51 -07:00
Andrea Cedraro
7bc05a37b5 Fix check condition for setting omnifunction 2015-06-18 14:08:06 +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
30036ca8e2 Defer setting the omnifunc.
When we enter a new buffer we need to know if the ycmd server has a
native completer for the current filetype, this means that when we start
vim we need to know if the server has a completer available for the
buffer which means that we have to wait for the server to be up and
running. To mitigate this defer the setting of the omnifunction closer
to its need which is when we enter insert mode; this should give room
for the ycmd server to start before we ask for anything or at least
should reduce the time waiting.

ref: #1529
2015-06-15 16:08:50 +02:00
Frankie Robertson
63a7aa9daf Remap <Nul> to <C-Space> regardless of gui_running since it is an unreliable way of detecting terminals in neovim 2015-06-03 14:33:56 +03:00
Andrea Cedraro
e28c709b99 Disable on large file
closes #1238
2014-12-05 10:32:52 +01:00
Spencer G. Jones
ac3a48de70 Unlike the other functions, youcompleteme#EnableCursorMovedAutocommands and youcompleteme#DisableCursorMovedAutocommands are not overwriting. This causes an error if the file is reloaded. 2014-10-14 11:11:33 -06:00
Strahinja Val Markovic
7cb41a20ac Moved some code around 2014-09-15 12:39:05 -07:00
Husak Kristijan
8e14914602 Remove commands for lock and unlock. 2014-09-15 12:37:18 -07:00
Husak Kristijan
abdf38a055 Change function names and make them public. 2014-09-15 12:37:17 -07:00
Husak Kristijan
2be6adda06 Add functionality for disabling and enabling Ycm autocompletion. 2014-09-15 12:37:17 -07:00
Strahinja Val Markovic
733de48efc Better handling of issues during python setup
Fixes #1151
2014-09-04 13:12:37 -07:00
vphilippon
5382ade94f Close Preview Window after insertion, fixed.
Remove s:searched_and_results_found. No more need for it.
2014-07-25 20:01:26 -04: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
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
4cf9cfcdff Updating to latest ycmd
Since ycmd doesn't need 'query', 'start_column' and 'line_value' params, we
don't send them anymore.
2014-05-27 14:30:22 -07:00
Strahinja Val Markovic
655523447c Now importing ycmd's third_party folders as well 2014-05-14 10:56:37 -07:00
Strahinja Val Markovic
a09527b380 More fixes for separate ycmd 2014-05-14 10:35:49 -07:00