osyo-manga / vim-snowdrop

libclang in Vim
21 stars 1 forks source link

filter() argument must be a list or a dictionary #3

Open ghost opened 10 years ago

ghost commented 10 years ago

Hello, I recently installed neocomplete with vim-marching, so I try to configure the plugins that you use in you video presentation.

However, when I try to execute :SnowdropEchoIncludes or another function like that (note that :SnowdropEchoClangVersion works fine), I get a lot of errors of the form :

Error detected while treating function snowdrop#current_includes..snowdrop#context#current..snowdrop#current_command_option..snowdrop#command_option#bufnr..snowdrop#command_option#to_include_option :

Is it related to my vimrc ? I wrote the same include paths for neocomplete and it works fine:

let g:snowdrop#include_paths = {"cpp" : "/usr/include/c++/4.8/,/usr/include/x86_64-linux-gnu/c++/4.8/"}

(The original writing in your .txt launchs an error for me, but this writing works for neocomplete, so I assume it has nothing to do with the errors)

osyo-manga commented 10 years ago

Please setting

let g:snowdrop#include_paths = {"cpp" : ["/usr/include/c++/4.8/", "/usr/include/x86_64-linux-gnu/c++/4.8/"]}

or

let g:snowdrop#include_paths = {"cpp" : split("/usr/include/c++/4.8/,/usr/include/x86_64-linux-gnu/c++/4.8/", ",")}
ghost commented 10 years ago

Thanks, that fixed this problem (I need to learn VimL) but the plugin only works in some cases : If I do it on "test" or std::string the result is fine, even for de GoToDeclaration, but if I do this : std::string t; And I try to show the type of t, I get the following error :

I don't know if it has anything to do with the libclang path, but I don't see how I could have got it wrong : let g:snowdrop#libclang_directory = "/usr/lib/llvm-3.4/lib/"

osyo-manga commented 10 years ago

hmm... Please run :SnowdropVerify.

ghost commented 10 years ago

Output of the command :

Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) [Success] +python [Success] load [Success] includes [Success] diagnostics [Success] typeof [Success] code_complete

ghost commented 9 years ago

I have encounter the same issue. I copied the clang module from /usr/lib/python2.7/dist-packages/clang, and that worked fine. cp -r /usr/lib/python2.7/dist-packages/clang vim-snowdrop/snowdrop/python/snowdrop/