Commit Graph

68 Commits

Author SHA1 Message Date
Stanislav Golovanov
48cda3bb8f Add general completers support 2013-04-21 01:28:37 +04:00
Strahinja Val Markovic
1f094e50d0 GoToDefinition/Declaration commands for C-family
These are accessible through the :YcmCompleter command. The docs have more
information.
2013-03-31 20:38:29 -07:00
Strahinja Val Markovic
9845d81fb0 More style fixes 2013-03-24 15:22:31 -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
Zeh Rizzatti
ac1e04fc14 Check for a native completer with multiple filetypes
GetFiletypeCompleter would always return a omnicompleter for the first
filetype in case there was no native completer, and the lookup would
stop.

This changes that behaviour to get all possible completers and tries to
find a native one among them. If no native completer is found, it
returns the omnicompleter for the first filetypes, as it used to.
2013-03-02 22:14:22 -04: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
e743076e14 Option to collect identifiers n comments/strings
Fixes #98.
2013-02-16 14:00:46 -08:00
Strahinja Val Markovic
ad8345aa35 Now checking ycm_core version for compatibility 2013-02-12 20:54:27 -08:00
Strahinja Val Markovic
786e6182ff Initial version of omnifunc-based omni_completer
Still a work in progress (needs better triggering and bug fixes)
2013-02-10 20:03:56 -08:00
Strahinja Val Markovic
6e27176ebd Shortening some function names
They could be shorter and still readable
2013-02-10 20:03:56 -08:00
Strahinja Val Markovic
6f10d7aad7 YcmDiags now doesn't hang when no flags available
Fixes #46
2013-02-05 21:22:50 -08:00
Strahinja Val Markovic
f0e98fa21f Reordering some imports 2013-02-04 23:12:22 -08:00
Strahinja Val Markovic
cc14981774 Renaming utils.py to ycm_utils.py 2013-02-04 15:33:18 -08:00
Strahinja Val Markovic
f671fe72b2 Adding our paths to sys.path start, not end
Otherwise things can conflict and we could end up loading the wrong module.
2013-01-31 17:32:39 -08:00
Strahinja Val Markovic
c67658bbce Supporting multiple filetypes set for current file
Vim allows setting the filetype string to something like "cpp.c", which means
that the file is both cpp and c (nonsense, but allowed). We need to support such
filetype strings.
2013-01-31 16:19:56 -08:00
Strahinja Val Markovic
a6a1e7c949 Clear error message on ycm_core ImportError 2013-01-26 17:29:18 -08:00
Strahinja Val Markovic
e8b60fd537 Adding the YcmDebugInfo command 2013-01-26 11:45:14 -08:00
Strahinja Val Markovic
5ac3d40691 No error when no clang support and cpp file opened
Previously, when the user opened a cpp/c/objc/objcpp file and clang support was
not compiled in, there would be an error message printed in vim.
2013-01-13 20:56:10 -08:00
Strahinja Val Markovic
0c17c49a66 Per-filetype turning off of filetype completion
So things like the ClangCompleter can be turned off fully and the user can rely
on identifier completion only.
2012-08-15 21:29:43 -07:00
Strahinja Val Markovic
daef17feb4 Support for showing extra info for diagstics
This was intended to show the full clang output for a given diagnostic,
including notes. But it appears that libclang does not provide this
functionality...
2012-08-15 19:39:03 -07:00
Strahinja Val Markovic
658e1393b4 Moved completer.py under completers 2012-08-06 20:14:21 -07:00
Strahinja Val Markovic
b62ec81d68 Completer plugins now have their own folder 2012-08-05 14:14:31 -07:00
Strahinja Val Markovic
d0f62d1205 Initial, rough version of completer separation
We are trying to build a nice plugin-oriented architechure for loading varios
completer objects.
2012-08-04 17:46:54 -07:00
Strahinja Val Markovic
f120c0ce1c Showing function args right next to name now
The completion text in the menu is different. We used to just show the func name
in the "main" part of the completion menu, now we show the full signature
without the return type (which is shown on the right)
2012-08-02 21:37:21 -07:00
Strahinja Val Markovic
3a820f1fb4 The clang options file now ends in .py 2012-08-01 20:22:03 -07:00
Strahinja Val Markovic
eab70838f0 New system for specifying clang flags
Now the .ycm_clang_options file is a python script that needs to implement our
API. This enables the user to do arbitrary things when computing flags.
2012-08-01 19:34:20 -07:00
Strahinja Val Markovic
06d653c60d Adding the cursor identifier on InsertLeave
This should help catch cases where the user jumps to an identifier and then
edits it in place; we want to add that new ident to the db ASAP because the user
may want to have it completed soon.

Still, we're not perfect. If the user just deletes chars with 'x' or 'd' in Vim
and therefore never even enters insert mode we are obviously not going to pick
up that identifier until the next full file sweep.
2012-07-31 19:01:22 -07:00
Strahinja Val Markovic
2726349975 Not parsing empty files anymore
Also, not sending non-clang supported files as unsaved buffers when a completion
is requested.
2012-07-31 15:30:50 -07:00
Strahinja Val Markovic
11e42b49f0 Smarter updating of clang diagnostics display 2012-07-30 19:42:41 -07:00
Strahinja Val Markovic
333b71f8d5 Triggering syntastic error display more often 2012-07-29 22:13:42 -07:00
Strahinja Val Markovic
958a008462 Adding diagnostic extraction support
Next step is to add support to Syntastic so that it uses this new functionality
2012-07-28 15:27:30 -07:00
Strahinja Val Markovic
bfafad4f50 Using python's abc module for the Completer class 2012-07-28 12:24:25 -07:00
Strahinja Val Markovic
76715bd94c Posting vim message when no clang candidates 2012-07-28 12:06:59 -07:00
Strahinja Val Markovic
ae618c5566 Clang parse now again called on cursor hold 2012-07-28 12:06:38 -07:00
Strahinja Val Markovic
019b84e18b Omnifunc for clang types + mapping to invoke it
This omnifunc basically calls our ClangComplete engine.
2012-07-28 11:19:26 -07:00
Strahinja Val Markovic
3cc4cf8e10 Async clang parsing of the current file 2012-07-26 21:44:17 -07:00
Strahinja Val Markovic
13f87c5a62 Buffer identifiers are now extracted async 2012-07-24 20:09:09 -07:00
Strahinja Val Markovic
b120d6a5ba Now extracting identifiers in C++ code 2012-07-23 20:17:59 -07:00
Strahinja Val Markovic
ad32584a10 Now reparsing clang files on buffer enter
This creates an auto PCH that speeds up code completion.
2012-07-23 18:45:00 -07:00
Strahinja Val Markovic
cfede619f2 Added flag to turn off clang completion if desired 2012-07-23 11:15:25 -07:00
Strahinja Val Markovic
cdb8dfc86b Loading .ycm_clang_options files now
These files can contain flags that are passed to clang.
2012-07-22 15:19:28 -07:00
Strahinja Val Markovic
6f0dc0b21d Explicitly calling OnBufferVisit for first file 2012-07-21 15:33:59 -07:00
Strahinja Val Markovic
b53ea06d5f Using 'dup':1 to save expensive dup eliminition
Since we are never going to return duplicate candidates to Vim we might as well
save some performance by forcing Vim to not search for duplicates
2012-07-21 12:17:29 -07:00
Strahinja Val Markovic
7bf18c7c5c Improving IdentifierCompleter performance
We limit the number of candidates returned to Vim to 20 and also make sure that
we are not returning any duplicate candidates. This provides a noticeable
improvement in latency.
2012-07-21 12:06:18 -07:00
Strahinja Val Markovic
ad859ee002 Using the pyeval func introduced in vim 7.3.584
This makes the whole plugin much faster since we now don't need to serialize and
deserialize the return values from python funcs before we can use them in Vim.
Oh God I've been waiting for something like this for so long... using this also
forces us to demand vim 7.3.584 or higher.
2012-07-21 10:10:19 -07:00
Strahinja Val Markovic
44b671c2c0 ClangCompleter now returs extra data
This data is used to show more information about the completions in the
completion menu.
2012-07-19 21:17:39 -07:00
Strahinja Val Markovic
c9e1706fa1 ClangCompleter now async and caches Clang data
First off, we don't block the GUI thread anymore for ClangCompleter (that was
always temporary). Secondly, now ClangCompleter will cache the data coming from
clang so that query-based filtering of members is fast.
2012-07-15 20:49:56 -07:00
Strahinja Val Markovic
52d8a1236b If query empty, Results sorted lexicographically
This change was also the root cause of the crash bug I spent two days tracking
down. The problem was that the new bool member was not added to the custom copy
ctor... since we don't really need a custom copy ctor for Result, we're going
with the compiler-provided one.
2012-07-15 19:40:24 -07:00
Strahinja Val Markovic
ca861d9f0c Creating a new Completer Python base class
Common logic for the IdentifierCompleter and ClangCompleter (from the python
plugin) is now in the base class.
2012-07-15 18:11:26 -07:00
Strahinja Val Markovic
27e1400558 ClangComplete now sorts completions based on query 2012-07-11 22:41:32 -07:00