Commit Graph

134 Commits

Author SHA1 Message Date
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
Strahinja Val Markovic
f4615c00c0 Separate options for completion in string/comment
We want to turn on completion in strings by default, but not for completion in
comments.
2013-04-24 23:15:13 -07:00
Strahinja Val Markovic
7500a94cda Use OnBufferVisit in ultisnips completer
This is instead of OnFileReadyToParse which is called every time the users stops
typing.
2013-04-24 13:31:28 -07:00
Strahinja Val Markovic
3258f324dd Merge branch 'JazzCore-general_completers'
Conflicts:
	python/ycm.py
2013-04-22 22:37:32 -07:00
Strahinja Val Markovic
14b2220f01 Supporting YcmCorePreload logic
Now the user has the option of writing custom logic before ycm_core.so is
loaded. This can be used to dynamically change the location of where ycm_core.so
is loaded by prepending paths to sys.path.

Very, very few people will need this feature, but I'm one of them so there.
2013-04-22 10:31:16 -07:00
Stanislav Golovanov
48cda3bb8f Add general completers support 2013-04-21 01:28:37 +04:00
Strahinja Val Markovic
6d0c736d04 Making sure that <C-Space> works in console Vim
Fixes #256.
2013-04-19 18:33:48 -07:00
Strahinja Val Markovic
89d93bc85c Fix traceback on <C-Space> semantic invoke
This was caused by yesterday's refactoring. I forgot to update one call site.

Fixes #242
2013-04-10 18:47:07 -07:00
Strahinja Val Markovic
77fbd80c89 Refactoring out some vim.eval calls
s:completion_start_column should not be evaled in Python code. That was a
stopgap measure that ended up lasting far longer than intended.
2013-04-09 19:32:48 -07:00
Strahinja Val Markovic
e4fc9a1136 Forcing the critical 'B' flag in cpoptions
Fixes #223.
2013-04-04 17:49:10 -07:00
Strahinja Val Markovic
bc4e7fb850 Option to disable YCM-Syntastic integration
Fixes #210.
2013-03-25 19:48:07 -07:00
Strahinja Val Markovic
cea707fc13 Fixing errors throw in "[Command Line]" window
Fixes #202.
2013-03-23 14:11:48 -07:00
Strahinja Val Markovic
f0ead1823a Clarifying an error message 2013-03-17 18:54:57 -07:00