Commit Graph

122 Commits

Author SHA1 Message Date
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
Strahinja Val Markovic
0535d0ec9a :YcmDiags exits when compilation fails
Previously we'd tell the user "No warnings or errors detected", which is wrong.
2013-03-17 18:52:42 -07:00
Strahinja Val Markovic
56b2f70a1a using "silent!" on maps we create with <unique> 2013-03-17 13:09:55 -07:00
Strahinja Val Markovic
c391bdcc62 Reducing RAM consumption by deleting unused caches
When the user deletes a buffer, we can delete the clang caches for that file.
Fixes #184.
2013-03-16 10:41:47 -07:00
Florian Walch
a2595d6f7e Option to close preview after leaving insert mode
Added the `g:ycm_autoclose_preview_window_after_insertion` option
(similar to `g:ycm_autoclose_preview_window_after_completion`).
If set, the preview window is automatically closed when the user leaves
insert mode.
2013-03-15 20:40:48 +01:00
Strahinja Val Markovic
005175d3f3 Filetype whitelist option added.
Also renaming the filetype blacklist option for the sake of symmetry.
Fixes #178.
2013-03-09 20:32:31 -08:00
Strahinja Val Markovic
c394cb557e 'empty' over 'strlen' for empty string check (duh) 2013-03-09 19:31:00 -08:00
Strahinja Val Markovic
82bd32aa16 Fixing YCM breakage
VimScript is not Python so "!some_string" does not return false when some_string
is not empty (it _does_ return true when some_string _is_ empty). I of course
know this, but my fingers like to forget it from time to time.
2013-03-09 09:47:35 -08:00
Strahinja Val Markovic
81444e207c Don't run when there's no filetype set.
Implements the smaller part of issue #178.
2013-03-08 22:55:14 -08:00
Strahinja Val Markovic
d2db03b021 Better error message when unable to get diags
Fixes #72.
2013-03-01 18:37:10 -08:00
Johann Klähn
3d305f9c74 Implement completer-specific commands
This provides a framework for completer-writers to create
completer-specific commands. I have in mind to use this for the clang
completer to force reloading of a flags module via `:YcmCompleter reload`.
2013-02-28 11:32:07 +01:00
Strahinja Val Markovic
0abb3ca61c Clarifying the "ycm_core too old" error message 2013-02-20 10:14:29 -08:00
Strahinja Val Markovic
3f1b5c9283 Option to complete inside comments and strings.
Fixes issue #105.
2013-02-16 12:56:21 -08:00