Commit Graph

146 Commits

Author SHA1 Message Date
Strahinja Val Markovic
6c3a48be7a Typing after <c-space> in g:ycm_auto_trigger works
We'd show the user the menu, but then we'd hide it as soon as the user tried to
type to filter the candidates.

Fixes #704
2013-12-03 12:55:05 -08:00
Strahinja Val Markovic
aeb2c5c227 Adding the g:ycm_auto_trigger option
Toggling this option off turns off the identifier completer and the semantic
triggers.

Fixes #597
2013-12-02 16:37:59 -08:00
Strahinja Val Markovic
06b5411fb3 Revert "Add possibility to disable identifier completion engine"
This reverts commit 44d5747d23.

Conflicts:
	README.md
2013-11-17 14:44:43 -08:00
Jan Vcelak
44d5747d23 Add possibility to disable identifier completion engine
Setting negative value of 'g:ycm_min_num_of_chars_for_completion'
disables identifier completion.
2013-11-17 23:05:49 +01:00
Strahinja Val Markovic
3ffae48a35 Always ignoring 'qf' buffers
Fixes #643.
2013-11-16 10:31:34 -08:00
Strahinja Val Markovic
38f571db1f C-family filetypes now Syntastic passive mode
This is needed so that Syntastic doesn't call :SyntasticCheck (and thus YCM
code) on file save unnecessarily. We call :SyntasticCheck ourselves often
enough.
2013-10-29 13:00:36 -07:00
Strahinja Val Markovic
f46bc7335e Setting Syntastic option to work around a vim bug
See https://github.com/scrooloose/syntastic/issues/834 for details.
2013-10-29 11:33:08 -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
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
5000d2e4ae NativeFiletypeCompletionAvailable now a local call
It used to block on the server to get the data. Now it doesn't anymore. This
speeds up Vim startup.
2013-10-07 16:10:48 -07:00
Strahinja Val Markovic
c7be1f1b47 Omni completion works again 2013-10-07 15:47:48 -07:00
Strahinja Val Markovic
ff7fa74fc9 <c-space> works again (forces semantic completion) 2013-10-07 13:09:34 -07:00
Strahinja Val Markovic
a9d7105e1b YCM now working on new buffers with ft set
We used to demand a name be set for the buffer.

Fixes #568.
2013-10-07 11:03:30 -07:00
Strahinja Val Markovic
8bc888d711 Vim now loads most defaults from the json file 2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
534f6f57d4 Fix issue with slow cursor moving in Python
This happened when moving the cursor in normal mode. The problem was that we
were calling SyntasticCheck on every cursor move because YCM would think that
the FileReadyToParse event processing returned diagnostics... but YCM only
integrates with Syntastic for C-family files.

Fixed by only triggering SyntasticCheck in C-family files.
2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
c43327d176 YcmShowDetailedDiagnostic works again 2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
159a8ecdfa YcmDiags and ForceCompilation work again 2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
c274b7d4f8 Fixing the diagnostic-related race conditions
Now, every FileReadyToParse event returns diagnostics, if any. This is instead
of the previous system where the diagnostics were being fetched in a different
request (this caused race conditions).
2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
b9bb788a2a Diagnostics work again... somewhat.
There appear to be timing issues for the diag requests. Somehow, we're sending
out-of-date diagnostics and then not updating the UI when things change.

That needs to be fixed.
2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
9d0a6c96d7 Event and completion request are now async
This results in a much snappier Vim.
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
5dd6782970 Vim doesn't execute extra conf preload
This is executed inside the server now, as it should be.
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
446d02f66e Subcommand name completion works again 2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
fe0c0a1607 GoTo commands work again 2013-10-07 11:03:27 -07:00
Strahinja Val Markovic
4c6a69b432 The UltiSnips completer works again 2013-10-07 11:03:27 -07:00
Strahinja Val Markovic
1730660555 A (barely) working version of ycmd + client
Still a lot of work to do.
2013-10-07 11:03:26 -07:00
Strahinja Val Markovic
02b88dccf1 extra conf store now vim-free 2013-10-07 11:03:26 -07:00
Strahinja Val Markovic
29bb90a6b4 Decoupling completers from Vim; still WIP & broken
Note to self: squash this commit before merging into master.
2013-10-07 11:03:25 -07:00
Strahinja Val Markovic
bd374a7096 Completer access now through CompletionRequest
This will make it easier to put Completers in the server.
2013-10-07 11:03:25 -07:00
Strahinja Val Markovic
a26243092f Now more explicit about accessing user options
We don't inspect the Vim process anymore when we want an option; we parse the
options on startup and then use that data structure.
2013-10-07 11:03:25 -07:00
Strahinja Val Markovic
496fe8f7a3 Reordering some YCM init logic 2013-10-07 11:03:25 -07:00
Strahinja Val Markovic
9d34fad24f Now parsing file on every normal mode cursor move
This is still fast & efficient because if we detect that the buffer hasn't been
changed (by examining b:changedtick), the parse doesn't proceed.

In effect, we now make sure we parse the file after every change to the buffer
as soon as that change happens. This means that compilation error feedback will
now be much, MUCH quicker.
2013-08-16 14:49:00 -07:00
Val Markovic
bce44ef0fc Merge pull request #510 from svermeulen/CursorHoldError
Bug fix, was triggering an error in the command line edit window (ie. th...
2013-08-15 14:30:51 -07:00
svermeulen
ea819684d8 Bug fix, was triggering an error in the command line edit window (ie. the window you get by hitting c-f in command line) after not moving the cursor for a few seconds (ie. when CursorHold event is fired) 2013-08-15 17:19:17 -03:00
Strahinja Val Markovic
96d4874fe0 Ensuring b:ycm_changedtick always exists
Fixes #503 (I hope).
2013-08-13 10:03:34 -07:00
Strahinja Val Markovic
d35b39a20c Now parsing file on insert mode leave as well
We used to do it on buffer enter and cursor hold. Doing it on insert leave too
produces much quicker compilation error feedback when editing C-family code
because the user doesn't have to wait for the next cursor hold event.
2013-08-12 20:11:41 -07:00
Strahinja Val Markovic
60c9908d25 Ensure g:ycm_changedtick is always set.
Fixes #493.
2013-08-07 16:54:14 -07:00
Strahinja Val Markovic
360a70b1b3 Deleting some dead code 2013-08-05 13:36:11 -07:00
Strahinja Val Markovic
4db6fb8d7f Revert to old way of tracking insert mode change
b:changedtick is incremented by the feedkeys() call which screws us up and
there doesn't seem to be a way around it that's worth the hassle.
2013-08-03 18:42:16 -07:00
Strahinja Val Markovic
fc3a303ace Only parsing file if changes detected
Previously we would do it on every CursorHold, buffer changed or not.

Fixes #485.
2013-08-03 15:48:03 -07:00
Strahinja Val Markovic
edae6fd0a2 Using b:changedtick for change detection
For now, doing it just for detecting whether a change was made on move in insert
mode.

Using b:changedtick instead of our homebrew way of detecting the changed should
be both faster and more robust.
2013-08-03 15:05:25 -07:00
Strahinja Val Markovic
451acc0073 Adding OnVimLeave support to Completer class 2013-07-07 11:00:45 -07:00
Strahinja Val Markovic
16b6f877c6 Don't call SyntasticCheck if not syntastic checker
If the user forced YCM to not register itself as the Syntastic checker, we
should not be calling SyntasticCheck since that would slow down everything.

Fixes #416
2013-07-01 10:46:49 -07:00
Strahinja Val Markovic
e740bac1f6 Better completion in the middle of a word
For instance (`|` represents the cursor):
  1. Buffer state: `foo.|bar`
  2. A completion candidate of `zoobar` is shown and the user selects it.
  3. Buffer state: `foo.zoobar|bar` instead of `foo.zoo|bar` which is what the
  user wanted.

This commit resolves that issue.

It could be argued that the user actually wants the final buffer state to be
`foo.zoobar|` (the cursor at the end), but that would be much more difficult
to implement and is probably not worth doing.

Fixes #374.
2013-06-09 19:00:49 -07:00
Strahinja Val Markovic
381b86d595 Fixing python tests broken in rename 2013-05-19 20:06:14 -07:00
Strahinja Val Markovic
faa225fdc4 Moving everything under pytho/ycm 2013-05-19 19:44:42 -07:00
Strahinja Val Markovic
4b039e2102 Using BufUnload instead of BufDelete
Seems to be more robust. This should help with memory consumption when using the
clang_completer. See issue #184.
2013-05-11 13:49:48 -07:00
Strahinja Val Markovic
2b23245422 Minor refactoring & style cleanup 2013-05-09 20:28:04 -07:00
Stanislav Golovanov
0edec9c95a Add subcommand completion for YcmCompleter command 2013-05-09 21:55:55 +04:00
Stanislav Golovanov
c2024edbaa Add GoTo features for python
This adds a Go To Definition and Go To Declaration features for
python.
2013-05-04 03:11:10 +04:00