Commit Graph

40 Commits

Author SHA1 Message Date
Strahinja Val Markovic
b5ffac655b code style fixes 2013-05-29 22:23:19 -07:00
Strahinja Val Markovic
454a961318 The identifier completer now reads tags files
See the docs for details. Fixes #135.
2013-05-26 13:33:40 -07:00
Strahinja Val Markovic
747c2a8b6d Xcode needs special testdata folder handling 2013-05-26 11:59:27 -07:00
Strahinja Val Markovic
7f676f85ae Code style fixes 2013-05-05 09:47:56 -07:00
Strahinja Val Markovic
387102a99f Fix ranking bug with ALL_CAPS variables
GetWordBoundaryChars would return "allcaps" for "ALL_CAPS" instead of "ac". This
would manifest as ranking (for instance) "STDIN_FILENO" ahead of "stdin" for
query "std", which is terrible.

This bug has been present in YCM for many months, but no one noticed the issue.

Fixes #272.
2013-04-28 13:21:13 -07:00
Strahinja Val Markovic
67e4495273 Stopgap for unicode chars in filename strings
Such filenames still can't be matched against, but at least we won't throw an
exception when it happens.

Fixes #279, relevant to #278
2013-04-27 10:54:28 -07:00
Strahinja Val Markovic
1676a3b2a4 Style fixes for C++ 2013-04-01 19:09:37 -07: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
Pi-Hsun Shih
83f8d65775 properly test the patch in IdentifierUtils::RemoveIdentifierFreeText 2013-03-21 13:53:54 +08:00
Pi-Hsun Shih
2d11be9162 Add test for IdentifierUtils::RemoveIdentifierFreeText 2013-03-15 10:52:13 +08:00
Strahinja Val Markovic
a6e83bfe76 Smart-case sensitive filtering
Fixes #120
2013-03-01 22:18:43 -08:00
Strahinja Val Markovic
fd2fd60f7c Identifier collection now smarter about strings
Previously, a string like 'foo\'bar\'zoo' would make the collection process
think that "bar" is not inside a string because it wouldn't recognize that the
quotes are escaped. Now it does.

Fixes #143.
2013-02-21 22:14:31 -08:00
Strahinja Val Markovic
f01a3480f5 Making sure that clang_completer tests included 2013-02-16 12:25:29 -08:00
Strahinja Val Markovic
fc1009913e Updating to latest gmock & gtest 2013-02-02 21:47:41 -08:00
Strahinja Val Markovic
1641bc9683 Formatting more code with astyle 2013-01-19 20:17:12 -08:00
Strahinja Val Markovic
cc53a46f54 ClangCompleter tests not built when no libclang
When the user doesn't want semantic completion with clang, then tests that test
those features are not included in the test binary.
2013-01-13 17:33:35 -08:00
Strahinja Val Markovic
a6b4b7fd27 LetterHash -> LetterNodeListMap 2012-09-06 12:56:08 -07:00
Strahinja Val Markovic
fc3bc60fae Moving the Result.h include out of Candidate.h 2012-09-06 11:37:22 -07:00
Strahinja Val Markovic
bb6244e090 Handling clang parse errors instead of segfaulting 2012-08-13 20:51:04 -07:00
Strahinja Val Markovic
f88c9feb4f Refactored the clang completer; many bugs fixed
This change should fix the random hangs and segfaults when using the clang
completer. Also, assertion errors printed to the console on vim exit should go
away too, same thing with segfaults on vim exit. These "on exit" errors were
caused by not cleanly shutting down the background threads; both the identifier
completer and the clang one now join the threads on destruction. This results in
a clean shutdown.

The new clang completer architecture now uses only one clang thread (again)
instead of a completion and parsing thread. Since the parsing task needs to wait
on the completion task if it was started first (and vice-versa) there's no point
to using two threads. The desired "simplicity" of using two threads for these
two tasks actually created needless complexity (and bugs). Sigh. Such is life.

A TranslationUnit abstraction was also created and this in turn also reduces the
complexity of the clang completer.

The clang completer now also has some (very) basic tests.
2012-08-11 19:37:08 -07:00
Strahinja Val Markovic
04c01c2ad0 Removing some commented-out code 2012-08-11 19:06:46 -07:00
Strahinja Val Markovic
3c65c84c7b Renaming 'indexer' to the more accurate 'ycm_core' 2012-08-04 18:59:22 -07:00
Strahinja Val Markovic
4765fd88fe Removing some unused code + fix for crash
The crash was caused by clang_disposeString/getCString not checking whether the
given CXString has NULL data members. Fixed with a workaround.
2012-08-01 22:09:31 -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
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
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
e56080ea56 Using libc++ with clang from now on
This also applies a patch to gtest that resolves an issue with building gtest
with libc++. The patch was taken from here:

https://groups.google.com/d/topic/googletestframework/F1B9LArL9_U/discussion
2012-07-19 21:15:25 -07:00
Strahinja Val Markovic
a04c3322cc No results for empty query (IdentifierCompleter) 2012-07-15 19:44:35 -07:00
Strahinja Val Markovic
545792c055 Renaming Completer to IdentifierCompleter 2012-07-10 23:13:12 -07:00
Strahinja Val Markovic
1df2a5d360 Using cmake_cxx_flags instead of add_definitions 2012-07-09 13:58:56 -07:00
Strahinja Val Markovic
30c9637992 Using the vector indexing suite from Boost.Python
This removes the need for a special overload for AddCandidatesToDatabase. Also,
the GetFuture function now provides a more sensible API with the list being
returned instead of accepted as an out parameter.
2012-07-08 15:34:44 -07:00
Strahinja Val Markovic
8da18e0319 Removing more llvm cruft files 2012-07-05 20:58:10 -07:00
Strahinja Val Markovic
ac1f40b9af Renaming our gtest targets to gtest_ycm
llvm also has a copy of gtest in its source tree. This causes cmake to bork
since it sees several different targets with the same name (gtest and
gtest_main). So we have to rename our versions of gtest and gtest_main to
something else... We're just appending _ycm now.

This will cause pain when we want to update gtest in the future from upstream,
but I don't see a better way of handling this.
2012-07-05 17:59:32 -07:00
Strahinja Val Markovic
570267bbe0 Fixing cmake conf so that we can use all warnings
This includes using a workaround for a CMake bug.
2012-07-04 21:24:16 -07:00
Strahinja Val Markovic
ee2bfe8952 Fix for query capital chars in wb ratio condition 2012-06-24 18:13:35 -07:00
Strahinja Val Markovic
d18b89bceb Fixed another bug in the word boundary condition
The problem was that should have been using a longest common subsequence
algorithm for the "number of word boundary character matches" calculation. Our
old approach would fail for the following case:

Query: "caafoo"

Candidate1 : "acaaCaaFooGxx"
Candidate2 : "aCaafoog"

Candidate1 needs to win. This is now also a test case.
2012-06-24 17:58:20 -07:00
Strahinja Val Markovic
9b875ca7f3 New sorting rule: char match index sum
The point is that we want to prefer candidates that have the query characters
"earlier" in their text, e.g. "xxabcxxx" over "xxxxxabc" for "abc" query.
2012-06-24 15:35:00 -07:00
Strahinja Val Markovic
adb31abef2 Fixing a bug with word-boundary ratio calculation 2012-06-24 15:11:58 -07:00
Strahinja Val Markovic
0c0ecc24c4 Using custom collection of Boost libs 2012-05-09 21:45:30 -07:00