GithubHelp home page GithubHelp logo

tiancheng-luo / clang_complete Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xavierd/clang_complete

0.0 1.0 0.0 732 KB

Vim plugin that use clang for completing C/C++ code.

Home Page: http://www.vim.org/scripts/script.php?script_id=3302

Makefile 0.27% Python 88.58% Vim Script 11.15%

clang_complete's Introduction

This plugin uses clang for accurately completing C and C++ code.

Installation

You need Vim 7.3 or higher, compiled with python support and ideally, with the conceal feature.

Not using any plugin management tools

  • Just put the files in ~/.vim/

Using plugin managers, runtime path managers or packs of Vim8

  • Follow regular procedure outlined in corresponding documentation

Using vimball (not in nvim)

  • To build and install in one step, type: $ make install

  • To build and install in two steps, type:

$ make
$ vim clang_complete.vmb -c 'so %' -c 'q'

Minimum Configuration

  • Set the clang_library_path to the directory containing file named libclang.{dll,so,dylib} (for Windows, Unix variants and OS X respectively) or the file itself, example:
 " path to directory where library can be found
 let g:clang_library_path='/usr/lib/llvm-3.8/lib'
 " or path directly to the library file
 let g:clang_library_path='/usr/lib64/libclang.so.3.8'
  • Compiler options can be configured in a .clang_complete file in each project root. Example of .clang_complete file:
-DDEBUG
-include ../config.h
-I../common
-I/usr/include/c++/4.5.3/
-I/usr/include/c++/4.5.3/x86_64-slackware-linux/

Usage

The plugin provides list of matches, after that you pick completion from a generic completion menu where Ctrl+N, Ctrl+P and alike work and wrap around ends of list.

License

See doc/clang_complete.txt for help and license.

Troubleshooting

The first step is to check values of 'omnifunc' and 'completefunc' options in a C++ buffer where completion doesn't work (the value should be ClangComplete). This can be done with the following command: :set omnifunc? completefunc?

Output of :messages command after startup could also show something useful in case there were problems with plugin initialization.

If everything is fine, next step might be to load only clang_complete plugin and see if anything changes.

clang_complete's People

Contributors

andrew-dunn avatar arnaud-de-grandmaison avatar bdebyl avatar bogado avatar branoh avatar brianmwaters avatar brunodefraine avatar calincru avatar cryptomilk avatar dave-h avatar exclipy avatar expipiplus1 avatar fat-zer avatar fraxbe avatar graywolf avatar jimenezrick avatar kevincox avatar leszekswirski avatar mkc188 avatar mlen avatar rasendubi avatar silex avatar simbuerg avatar suy avatar tobiasgrosser avatar tony avatar wilywampa avatar xaizek avatar xavierd avatar zsaberlv0 avatar

Watchers

 avatar

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.