Johann Klähn
e9cce29761
Ask before loading .ycm_extra_conf.py files
...
To prevent the execution of malicious code the new default is
to ask the user before a `.ycm_extra_conf.py` file is loaded.
This can be disabled using the option `g:ycm_confirm_extra_conf`.
This commit introduces a helper class `FlagsModules` that keeps track of
and caches the currently loaded modules. To introduce further criteria
for a module look at `FlagsModules.ShouldLoad`.
Also `:YcmDebugInfo` now lists the file that was used to determine
the current set of flags.
`Flags.ModuleForFile` could be used in a user-facing command that
opens the `.ycm_extra_conf.py` corresponding to the current file.
A second command could then force a reloding of this module via
`Flags.ReloadModule`.
2013-02-26 11:16:26 +01:00
Johann Klähn
4b3e0a1895
Add code to ask user for confirmation in vimsupport
2013-02-25 10:50:44 +01:00
Johann Klähn
70a2a722fe
Add GetBoolValue helper in vimsupport
2013-02-25 10:50:39 +01:00
Strahinja Val Markovic
98ff82ece5
Removing falsy items from omnifunc returned items
...
Depending on the omnifunc the user has set, it could return empty strings etc in
the list of items.
Fixes #146 , fixes #147
2013-02-23 09:55:13 -08:00
Strahinja Val Markovic
c1700c7d19
Handle omnifunc returning dict with 'words'
2013-02-23 09:35:07 -08:00
Strahinja Val Markovic
101d949a88
Splitting echo text on \n and echoing lines
2013-02-21 10:50:38 -08:00
Strahinja Val Markovic
e60928d721
Updating error message on missing ycm_extra_conf
2013-02-20 13:16:18 -08:00
bear
66289d7522
let g:ycm_global_ycm_extra_conf can use "~"
2013-02-18 15:10:13 +08:00
Val Markovic
9e3aa21a77
Merge pull request #119 from olajep/let-local-conf-override-global
...
Let local YCM config file override global config file
2013-02-17 13:07:38 -08:00
Ola Jeppsson
3d1a86c382
Let local YCM config file override global config file
...
Currently, when VIM opens a source file, YCM always defaults to
'g:global_ycm_extra_conf_file' if it exists.
This commit changes YCM's behaviour so that it first tries to find the config
file in the source file's folder (or any of its parents folder), before
falling back to 'g:global_ycm_extra_conf_file'.
2013-02-17 19:06:48 +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
7833cc1cf1
More doc updates for Completer API
2013-02-16 13:33:19 -08:00
Strahinja Val Markovic
1cd6f4d05e
Some extra docs for the Completer API
2013-02-16 13:26:56 -08:00
Stephen Sugden
7006033d3e
typo fix
2013-02-13 21:18:51 -08:00
Strahinja Val Markovic
4000da089d
Only triggering omni_completer when omnifunc set
2013-02-13 10:27:40 -08:00
Strahinja Val Markovic
ad8345aa35
Now checking ycm_core version for compatibility
2013-02-12 20:54:27 -08:00
Strahinja Val Markovic
21dac46ecc
Docs for the Completer API
2013-02-12 20:01:22 -08:00
Strahinja Val Markovic
452f7d1fec
Better triggering of semantic completion
...
Now there's a nice user-configurable setting for when YCM should trigger
semantic completion. This is very useful for the new omni_completer that uses
data coming from Vim's omnicomplete system.
2013-02-11 21:46:06 -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
b0c0a12df8
Removing unused file
2013-02-10 20:03:56 -08:00
Strahinja Val Markovic
6be3cd37ed
Making sure filename exists before using it
2013-02-06 18:46:57 -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
a1c89f5108
Fix rare traceback on <leader>d. Fixes #43
2013-02-05 20:12:43 -08:00
Strahinja Val Markovic
ace95db4f0
Emit warning about missing extra_conf file once
...
Otherwise we spam the user, which is annoying. Fixes #41 .
2013-02-05 19:03:38 -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
8452914046
Adding a command to force recompilation and diags
2013-01-30 14:46:58 -08:00
Strahinja Val Markovic
79f834f97e
Now possible to specify a global ycm_extra_conf
2013-01-30 13:23:57 -08:00
Strahinja Val Markovic
424736e395
Making sure that 'flags' is a list
2013-01-28 12:56:45 -08:00
Strahinja Val Markovic
d3874ebb65
Code style fix
2013-01-28 10:05:13 -08:00
Strahinja Val Markovic
7e929b7831
clang_completer debug info now shows file flags
2013-01-28 10:00:15 -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
6579a1d05d
Trivial refactoring
2013-01-24 17:14:10 -08:00
Strahinja Val Markovic
19637cadda
Renaming ycm_clang_options to ycm_extra_conf
2013-01-24 09:59:21 -08:00
Strahinja Val Markovic
90fe31f98e
Async querying of CompilationDatabase supported
2013-01-23 17:23:51 -08:00
Strahinja Val Markovic
970b2fb56c
Kiling a memory leak... I hate C interfaces
2013-01-22 17:29:05 -08:00
Strahinja Val Markovic
6ba2dd8caa
Printing an error when no ycm_clang_options.py file
2013-01-22 17:13:14 -08:00
Strahinja Val Markovic
482de517ba
Better support for CompilationDatabase
...
We now use the compilation working directory for a file that is specified in the
CompilationDatabase. We don't actually change the working directory of the
process, even temporarily (that would be annoying to users); we munge the flags
coming from the database so that all the relative paths in them are resolved to
absolute ones.
2013-01-22 16:30:49 -08:00
Strahinja Val Markovic
00db8fd8b1
compilation_database.json now fully supported
2013-01-19 18:53:30 -08:00
Strahinja Val Markovic
f9a516704b
Now explicitly adding the clang includes to flags
2013-01-17 17:08:28 -08:00
Strahinja Val Markovic
0922864eda
Moving clang includes to clang_includes folder
2013-01-17 17:08:11 -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
fa21622655
Updating local clang includes to 3.2
...
We have to have these beneath the folder where ycm_core.so is placed so that we
get fast completions. If these files are not here, then clang fails to
precompile a file preamble and completions are slow.
2013-01-13 12:49:49 -08:00
Strahinja Val Markovic
c9adb9e86e
Comment update in vimsupport.py
2012-09-24 19:20:33 -07:00
Strahinja Val Markovic
04991d874d
Moving a comment closer to the related code
2012-09-05 21:49:51 -07: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