GithubHelp home page GithubHelp logo

vim-clang's Introduction

vim-clang

Gitter

Use of clang to parse and complete C/C++ source files.

C source

Installation

  • Require executable clang installed.
  • Putting the content of plugin/ into ~/.vim/plugin works.
  • Using a plugin manager, like pathogen.vim, is recommended. Installation via pathogen is done by cd ~/.vim/bundle; git clone https://github.com/justmao945/vim-clang.git.

Why

I was a user of clang_complete and it's really a good job, but someday I found that I must write another plugin to overcome some drawbacks of it.

  1. User options can be set for different file types in vim-clang.

     let g:clang_c_options = '-std=gnu11'
     let g:clang_cpp_options = '-std=c++11 -stdlib=libc++'
    
  2. vim-clang is faster than clang_complete (not using libclang). vim-clang does not support libclang now, and I don't think it's a good idea to use cindex.py(python binding for clang) directly. If you use clang_complete with libclang and open many C/C++ source files, you'll find that VIM eats up hundreds of MB RAM...

    • vim-clang caches output of clang and reuses if the completion point is not changed and without errors.
    • vim-clang only runs clang once to get completions and diagnostics.
  3. vim-clang is more friendly than clang_complete.

    • vim-clang uses the preview window to show prototypes for C/C++ sources. Generally, C++ source has many overload functions and most of completions are very complex, which is not good to put this into OmniComplete popup menu.
    • vim-clang uses a split window to show the caret diagnostics from clang. clang_complete uses quickfix window to show diagnostics without caret, but that's not the best choice... Because the caret diagnostics of clang including many useful infomation.
  4. vim-clang supports relative include path in .clang configuration file.

     proj/
     |-- .clang
     |-- include/
         |-- main.h
     |-- src/
         |-- main.c
     |-- test/
         |-- main_test.c
     
     $ cat .clang
     -I.
    
  5. Better PCH support. vim-clang will find stdafx.h.pch automatically.

YouCompleteMe is more powerful than vim-clang, that has a well designed client-server architecture to deal the memory problem in clang_complete.

Features

Asynchronized mode [new]

  • Now vim-clang supports to call clang executable asynchronously that it won't block vim during the completion. This is very useful if your project is large and the machine is not very powerful to parse them in tens of milliseconds. In synchronized mode you'll find that's too 'slow' to wait the completion...

  • This mode is implemented by starting another vim process to notify the finish of the completion, so +clientserver option is required to compile the vim(generally added).

  • GVIM is required to use this mode, seems given --servername ??? to vim is not working.

  • Job control is used to run clang when in neovim, which is really very nice! Thank you syswow.

Compile commands [new]

  • Use cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 to generate compile_commands.json

  • To use the compile commands database in vim-clang, set the g:clang_compilation_database variable in your vimrc to your cmake build path.

      let g:clang_compilation_database = './build'
    

Neomake integration [new]

  • vim-clang now adds the compilation arguments parsed from .clang and .clang.ow to Neomake configuration variables. This means that the include search paths (-I) that are in the .clang files will be passed down to the clang and gcc makers from Neomake without overriding your configuration.
  • vim-clang will also set the directory from where the maker will run, which is the directory where the first .clang or .clang.ow is.

The variables that are affected are:

  • g:neomake_cpp_clang_maker
  • g:neomake_cpp_gcc_maker
  • g:neomake_c_clang_maker
  • g:neomake_c_gcc_maker

Options and Commands

:h clang.txt

OS requirement

Tested on

  • Ubuntu 14.04
  • Mac OS X 10.10
  • Windows 7

vim-clang's People

Contributors

adelarsq avatar aharisu avatar blyoa avatar c0r73x avatar crr0004 avatar gitter-badger avatar golem0xe avatar guyben13 avatar htfy96 avatar jreybert avatar justmao945 avatar kimonhoffmann avatar mapk0y avatar mattn avatar maxint avatar mckellygit avatar minijackson avatar mlen avatar odanado avatar shuber2 avatar sighingnow avatar syswow avatar thawk avatar umitkablan avatar uniqp avatar waldyrious avatar wookayin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-clang's Issues

neomake?

The last commit breaks vim-clang for me.

Vim(let):E117: Unknown function: neomake#makers#ft#cpp#clang

From what I understand this is some sort of neovim function? Did you drop vim support?

Plugin writes changes to the file on disk?

First time I do <c-x><c-o>, after one of the valid symbols (::,.,->), and then undo changes I've done using u in vim, I notice that the file has been wrote. In fact, I can do :e! and I see that the file on the disk has been wrote just after I've pressed <c-x><c-o>. Why does the plugin writes the file ? In my opinion, it shouldn't mess with writing my file on the disk if I don't want to.

OmniCompletion selection is broken

Hi I am new to your script and love using it and it works fine until a few days ago I updated.
Basically when I type :: I do get the completion popup however when I want to select using up/down, the vim functionality is broken and I have no way of saving and continue the work.

Would you help me look at this problem?

Failing to create temp file

Error detected while processing function 40_ClangCompleteInit..40_DiscoverIncludeDirs:
line 3:
E484: Can't open file /tmp/vpIUr0z/0

I think I had a run or two that didn't throw the error and worked like normal. But this is the typical error on startup.

How to setting it in .vimrc?

I have install it with 'vundle'.But I do not know how to setting it so that it can open diagnostics window and popup completions and open preview window?

Fails when used with vim-fugitive for :Gdiff command

Inside a git repo, starting with a file using vim, then :Gd, which should open two-column diff, but, instead, it fails with this msg:

Error detected while processing function <SNR>50_ClangCompleteInit:
line    8:
E472: Command failed

I am using commit 0e47495 . I thought #20 has taken care of that.

Add support for `kind` option in omnifunc

Hi, I implemented a basic pattern-matching method to determine the type of a candidate:

if match(l:proto, '\v\[.*\].+\(.*\).*') != -1
        let l:kind = 'f'
      elseif match(l:proto, '\v\[.*\].+')!=-1
        let l:kind = 'v'
      elseif match(l:proto, '\v.+') !=-1
        let l:kind = 't'
      else
        let l:kind = '?'
      endif
      call add(l:res, {
        \ 'word': l:word,
        \ 'kind' : l:kind,
        \ 'menu': l:proto,
        \ 'info': l:proto,
        \ 'dup' : 1 })

I know this could be far from perfect, but it seems to produce better results than expected when try it with std:: prefix.

Using LLVM-3.8.0-win64.exe with vim_clang

The binary distribution of llvm 3.8 is built with MS VC++ and it targets VC++ by default.
This is a problem for the llvm users from the past who used TDM or other MinGWw64 binary along with
vim_clang+clang. Without configuring this new setup will cause several errors. There is a workaround though.
I got it from google.
Google: configure clang 3.8 for mingw
LLVM 3.8.0 clang binary for Windows targets VC++
http://comments.gmane.org/gmane.comp.compilers.clang.devel/47991

And the answer is:

You can explicitly specify the target triple, like this:

clang -target i686-pc-windows-gnu (or x86_64-pc-windows-gnu)

-Nico

I use a global file for vim_clang, and the current (correct) configuration is:

%userprofile%.vim_clang_includes
-target x86_64-pc-windows-gnu
-IC:\xtralibs
-IC:\xtralibs\appu
-IC:\xtralibs\yxml11
-IC:\xtralibs\IUP\include
-IC:\xtralibs\LIBXLS1.0_X\LIBXLS1\include\libxls

I set up a plugin "vim_clang_setup.vim" with the following configuration:

let g:clang_dotfile = '$HOME/.vim_clang_includes'
let g:clang_format_auto = 0
" Style can be LLVM, Google, Chromium, Mozilla, WebKit
" let g:clang_format_style = 'LLVM'
let g:clang_include_sysheaders = 1
let g:clang_include_sysheaders_from_gcc = 1
let g:clang_cpp_options = '-std=gnu++11'
let g:clang_verbose_pmenu = 1

For the syntastic users:
I also have a plugin setup for syntastic "syntastic_setup.vim" with the following configuration:

:menu Plugin.Syntastic.auto\ syntax\ check\ on/off\ Toggle:-\ \ \ \ :\SyntasticToggleMode :::SyntasticToggleMode
:menu Plugin.Syntastic.Errors\ Window:-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\Errors :::Errors
:menu Plugin.Syntastic.Manully\ check\ errors\ now:-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\SyntasticCheck :::SyntasticCheck
:menu Plugin.Syntastic.Show\ info:-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\SyntasticInfo :::SyntasticInfo
:menu Plugin.Syntastic.Reset\ Syntastic:-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\SyntasticReset :::SyntasticReset

" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_c_checkers=['gcc', 'cppcheck', 'clang_check']
let g:syntastic_cpp_checkers=['gcc', 'cppcheck', 'clang_check']
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" A few option for C/C++ GCC
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
let g:syntastic_c_compiler_options = '-W -Wall -Wextra -pedantic -ansi -std=gnu99'
let g:syntastic_cpp_compiler_options = '-W -Wall -Wextra -pedantic -ansi -std=gnu++98 -std=gnu++11 -std=gnu++14'
let g:syntastic_aggregate_errors = 1
let g:syntastic_always_populate_loc_list = 1
" let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_enable_signs=1
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_remove_include_errors = 1
" first get the include dirs
" http://stackoverflow.com/questions/344317/where-does-gcc-look-for-c-and-c-header-files
" gcc -print-prog-name=cc1plus -v
" gcc -print-prog-name=cc1 -v
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
let g:syntastic_cpp_config_file = $HOME . '/.syntastic_cpp_config'
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
let g:syntastic_c_config_file = $HOME . '/.syntastic_c_config'
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
let g:syntastic_clang_check_config_file = $HOME . '/.syntastic_clang_check_config'
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" *** Ue the following line whenever you get into trouble with syntastic ***
" g:syntastic_c_errorformat='%m'
" let g:syntastic_debug = 1
" let g:syntastic_debug = 3
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
let g:syntastic_c_check_header = 1
let g:syntastic_cpp_check_header = 1

And the ".syntastic_clang_check_config" contains exactly:

%userprofile%.syntastic_clang_check_config
-W
-Wall
-Wextra
-pedantic
-target
x86_64-pc-windows-gnu
-IC:\xtralibs
-IC:\xtralibs\appu
-IC:\xtralibs\yxml11
-IC:\xtralibs
-IC:\xtralibs\IUP\include
-IC:\xtralibs\LIBXLS1.0_X\LIBXLS1\include\libxls

I intensionally wrote 'x86_64-pc-windows-gnu' at the next line, this is how syntastic is recognizing the
flag: -target x86_64-pc-windows-gnu, I checked it with let g:syntastic_debug = 1.

This is not an issue with vim_clang rather this is an information.
I hope this information will be helpful to those who were using llvm 3.7.1 with mingw and do not want to compile clang with mingw themselves.
Thanks.

Support parameter highlight as in jedi-vim

Jedi has this nice popup with the name of the current argument highlighted after opening parentheses.
jedi-vim

I think it'd be nice to have this feature, especially that clang already prints out the types. I'll try to implement this as soon as I find free time.

Auto fill include path from &path

Normally, we will setup project include path in vim's &path. vim-clang should import &path just like clang_complete. It will make life easer.

Undefined variable: g:clang_diagsopt

I just updated my plug-ins and I am getting this error on start up

Error detected while processing /Users/matt/dotfiles/.vim/bundle/vim-clang/plugin/clang.vim:
line 38:
E121: Undefined variable: g:clang_diagsopt
E15: Invalid expression: g:clang_diagsopt !~# '^[a-z]+(:[0-9])?$'

space cause fail

if there is a space in filename, complete will fail ...
seems in line 608 of clang.vim:

let l:src = expand('%:p:.')

sorry for my broken english ><

Can get complete when typing 'this.' inside class functions

I can't get any complete when I type this. inside a cpp class, but if I specify some prefix, the list pop out. Also if I create a new object of that class, I can get list.

Can you tell me know to trobule shot on this issue ? i remember clang-complete uses clang's complete option to make the list, how is your command? Maybe I can help if you can't reproduce it locally .

Annoying message complaint when changing buffer

When the plugin is active (even if diagnostics are disabled using let g:clang_diagsopt = '') and I try to change buffer using :buffer <number>, I get this message :

Error detected while processing function <SNR>110_DiagnosticsPreviewWindowClose..<SNR>110_DiagnosticsWindowC
lose:
line   15:
E121: Undefined variable: t:clang_diags_driver_bufnr

Since the variable may not have been set, I guess that a quick fix would be to change this line to :

  if !exists('t:clang_diags_bufnr') || !exists('t:clang_diags_driver_bufnr')

ClangSyntaxCheck when clang_diagsopt is disabled

i don't want diagnostics window to popup everytime vim-clang attempts a code completion, so i set

let g:clang_diagsopt=''

this gives me what i want

but the problem is looks like this setting will also keep you from using ClangSyntaxCheck when needed.

What i want is an option to disable the diagnostic window by default, but if i want to manually check syntax, the diagnostic window will popup.

is there any way around this?

Lost auto-completion in shell

After installed clang.vim, when use :sh switch to shell in vim. the command
auto-completion of shell was lost. the prompt of shell is only $, no any path info.

The version info. of my VIM is as followings.
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)
patch: 1-52
Modified by [email protected]
Compiled by buildd@

vim-clang not work with split window

When edit code with split window(same file), press <c-x><c-o> or press . to complete member in struct.
vim-clang will change the cursor window
vim-clang1

And this message will show in :message
change

Edit in the left window is ok, this issue only happy in the right window.
For vertical split view, this issue happens in the bottom window.

I also reproduce this issue in linux and osx.

Thanks

About PCH error

PCH file is gen succeed,but use this PCH is error

error: PCH file was compiled for the target CPU '' but the current translation unit is being compiled for target 'x86-64'

Feature Request: Function Parameter Complete and Parameter Hint

Sir,
This is one of the best vim plugin I have ever worked with, along with syntastic.
No doubt in it. It does a perfect completion even better that visual studio's
intellisense. It produces a nice completion even when I include headers
and not save the file.
Clang is wonderful so is vim_clang. No chance to ctags to survive today except
jump to definition, go to declaration etc., just because vim internally
does this via ctags. But for completion, ctags is totally useless today,
its just like word completion and nothing much.
I already got rid of ctags for completion, thanks to vim_clang.
Thanks to Mao.
Moreover I do not need python, lua, perl, ruby etc., to use vim_clang. Python
always has been a problem in my windows 7 machine since I use
other projects with 64-bit python that clashes with vim.
No python, no snake byte. Excellent work, carry on.
It even runs on my windows xp laptop with 32-bit clang.
On my Linux partition its just lightning fast.
Overall its better than any clang based completion since it runs almost
everywhere whereas others are a little bit tricky to set up and work with.
I had no luck using youcomplete me and clang_compelete though on my
Windows 7 partition and windows xp laptop,
so I did not test them even on linux.

vim_clang is wonderful, but I still need some feature
like function parameter completion and function parameter hint.

Feature 1 I need:
For example:
IupDialog(<Ihandle* child>);
printf(<const char * __restrict__ _Format>,<...>);
And pressing Ctrl+Cr or Ctrl+J will replace the '< to >' with your own writing.
Currently I'm doing this with code_complete plugin by Ming Bai
(http://www.vim.org/scripts/script.php?script_id=1764),
which also gives me a parameter hint at the vim command line area.

Feature 2 I need:
Moving the mouse pointer on some function/class/structure/enumerator/variable-name
echoes up a parameter hint like code::blocks IDE since I use another
plugin by the same author 'echofunc',
(http://www.vim.org/scripts/script.php?script_id=1735).
This feature can also be incorporated into vim_clang.

Vim already replaces IDEs like MS Visual studio (People just use the compiler,
not the IDE), code::blocks, Eclipse, Code Lite etc., for code editing.
For compilation we have BAT/SH files and several build tools like cmake, bakefile,
scons etc.
Even for debugging we have several tools like
UltraGDB GUI/gdb-command-line on Windows,
Nemiver/DDD/GDB-TUI/gdb-terminal on linux.

So please consider my request when you will get some spare time.

Disable auto syntax check

I tried to disable auto syntax check by adding

let g:clang_check_syntax_auto=0

to my .vimrc file, but it has no effect, the ClangDiagnostics window still popup on autocompletion.

Is there any other option to set?

can't find include files

it keeps saying fatal error, header file not found everytime I tried to do an autocompletion. however I have include the path in the .clang file(I tried both absolute path and relative path), and I printed out the clang command used for completion and all the paths are included with -I option. The headers and sources are in subfolders of include/ and src/ . Any suggestions on how to make this work? thanks

Autofill include files

This might be a feature request;
though I would like to autocomplete things like

include "path/to/a/headerfile.h"

Is there a way of doing this, and autofilling files as long as they match with what it finds at disk?

Work with neocomplete

Another plugin set completefunc! Disabled neocomplete.

How to work with neocomplete?

How Can add "index cache"?

Each time when I run "complete", it will pause a few seconds

我用中文再说一遍吧,我英文太烂了,说不清楚
打开一个cpp文件,class1-> 会停顿几秒钟,然后第二次运行 class1-> 就会很快,但把文件关闭再打开,运行class1-> 还是会停顿几秒

非常感谢你写出这么好的插件

Error in DeleteAfterReadTmps

Here's the error message:

Error detected while processing function ClangComplete..<SNR>45_ClangExecute..<SNR>45_DeleteAfterReadTmps:
line    8:
E484: Can't open file /var/folders/...

The file doesn't exists. Looks like it might be the last file in the list (the filename is always 6).

I'm using the plugin on a Mac.

Help with windows

Hi ! I havem't managed to make it worki with windows . In my linux os everything is ok .
Same .vimrc I have set debug 3 and i can see that is loading all include files plus what exists in the llvm/include folder plus the path includes from VS 2013.No errors
In my .clang file i used various escape configuration. I want ot use the microsoft sdk for windows programming.
I use -I "C:\Program FIles (x86)\Micorsoft SDKs\Windows\7.1A" .I used double slashes forward slashes etc.The cland is prebuild for vs2013 .Might be this.VIm is compiled by myself ,
THanks in advance

work with neocomplete

在Windows 8.1下装了vim-clang和neocomplete,出现一个小问题。
输入std::, 就会自动补齐成std::std. 但当vim-clang运行完成,有cache之后,重新输入std::, 补齐就正常了。 😕

设置如下:

" disable auto completion for vim-clang
let g:clang_auto = 0
" default 'longest' can not work with neocomplete
let g:clang_c_completeopt = 'menuone'
let g:clang_cpp_completeopt = 'menuone'
let g:clang_debug = 5 
let g:clang_exec = 'clang.exe'
let g:clang_c_options = '-std=gnu11'
let g:clang_cpp_options = '-std=c++11 -stdlib=libc++'
if !exists('g:neocomplete#force_omni_input_patterns')
        let g:neocomplete#force_omni_input_patterns = {}
endif
" for c and c++
let g:neocomplete#force_omni_input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)\w*'
let g:neocomplete#force_omni_input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*'

missing function prototype preview

call pathogen#infect() " use pathogen
set backspace=indent,eol,start
let delimitMate_expand_cr=1
let g:clang_auto = 1
let g:clang_vim_exec = 'nvim'
let g:clang_cpp_options = '-std=c++11 -stdlib=libc++'
let g:clang_cpp_completeopt = 'longest,menuone,preview'
colorscheme molokai
" AUTOCOMPLETION
filetype plugin on
set cot+=menuone " Show preview of function prototype
syntax enable
set formatoptions+=r
set formatoptions+=o
set formatoptions+=c
" Tabs
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
filetype indent on
" set smartindent
set autoindent

" UI
set number
set cursorline
set wildmenu
" set lazyredraw
set showmatch
set showmode
set nowrap
set hlsearch
set incsearch
set ignorecase

set backup
set backupdir=/.vim-tmp,/.tmp,/tmp,/var/tmp,/tmp
set backupskip=/tmp/,/private/tmp/
set directory=
/.vim-tmp,/.tmp,/tmp,/var/tmp,/tmp
set writebackup

map :!clang++ -std=c++11 -stdlib=libc++ -lc++abi -Wall % && ./a.out
map :w %

nnoremap
nnoremap
nnoremap
nnoremap

i don't seem to have the function prototype window anymore, is there something that i'm missing?

Support specific parameters in g:clang_format_style

Improve the ClangFormat function to support specific paramters in "g:clang_format_style". Here is a example style configuration for this proposal:

{BasedOnStyle: Google, IndentWidth: 4, TabWidth: 4, Standard: Cpp11}

But this configuration isn't supported now !

Cannot run clang properly when there is a space in clang path under Windows 7 x64

Hi:

I'm using neovim-qt under WIndows 7 x64

When I invoke vim-clang auto completion I get this error:
clang.exe: error: no such file or directory: 'Files\LLVM\bin\..\lib\clang\4.0.0\include"'
I installed LLVM under C:\Program Files\LLVM\ , I think the space in "Program Files" is the cause.

If I put LLVM under C:\ then it works fine.

I can run neomake with clang, I also tried to compile a program with command line directly and there was no issue, so I believe the clang itself is installed correctly.

Completion is filled up unwantedly

The plugin version: 0.2.2 (current devel)

When typing a dot after some token, the omni-completion popup is opened automatically,
but the first candidate in the completion is also automatically filled up.

For example, when typing std::, std::__1 is typed automatically just after the last ':' is pressed.

This is not a wanted behavior, and different from the animated demonstration (on README).

E16: Invalid range: 3wincmd w

I'm using vim-clang with deoplete in neovim. Occasionally pressing . in <entity>. will cause the following Error:

   Error detected while processing function ICComplete..ClangComplete..<SNR>95_ClangComplete..<SNR>95_DiagosticsWindowOpen..<SNR>95_DiagosticsWindowClose:
   line 18:
   E16: Invalid range: 3wincmd w 

optimized_output

Issue when quitting

Hello,

I have an issue when I want to quit vim. Saving is no problem, but when I do a simple ":q" then the following error appears, after which I can't really quit except by ":q!" which is annoying:

>  1 #include <stdio.h>
>  2
>  3 struct test{
>  4   int value;
>  5   char value2;
>  6 }test;
>  7
>  8 int main( int argc, char* argv[] )
>  9 {
> 10   test.value;
> 11   test.value2;
> 12 }
>~
~
~
>test.cpp  [01] /ws/ydemuyte-gpk/mytests                                                                                                                          >7D <12, 1>
>test.cpp:10:8: warning: expression result unused [-Wunused-value]
>  test.value;
>  ~~~~ ^~~~~
>test.cpp:11:8: warning: expression result unused [-Wunused-value]
>  test.value2;
>  ~~~~ ^~~~~~
>2 warnings generated. | 1/6 | 16%
>E315: ml_get: invalid lnum: 2
>E315: ml_get: invalid lnum: 3
>Press ENTER or type command to continue

Clang version: clang version 3.1 (branches/release_31 246765)
Vim version: VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 12 2012 13:35:10)

can't remove clang warning

I am using clang 3.0 version.

For some reasons, clang does not like my stdio.h header file. Each time I want to complete something, I get this warning in the ClangDiagnostics buffer

/usr/include/stdio.h:80:20: error: redefinition of typedef 'va_list' is invalid in C                                      
typedef _G_va_list va_list;                                                                                               
                   ^                                                                                                      

I tried to add some options to through g:clang_c_options like "-w", but this warning still appears.

However, completion works fine!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.