Giter Club home page Giter Club logo

clang-complete's Introduction

Clang-Complete

A clang plugin for Sublime Text 3 (MAC OSX / Linux / Windows), providing:

  • Auto complete
  • Syntax diagnostic
  • Goto definition

Using libclang (llvm 3.5.0).

Install the Plugin

From git repository

Note: To determine the path to Sublime Text 3 Packages directory, start Sublime Text 3, Choose menu Preferences -> Browse Packages

$ cd <sublime-text-3 Packages directory>  # see note above
$ git clone https://github.com/lvzixun/Clang-Complete.git
$ cd Clang-Complete
$ make [linux / windows]

On Ubuntu, $ make linux, On Mac OSX, run the default $ make.

Windows prerequisites
  1. install MINGW-W64 32 (only if you want to compile yourself - binary is included) e.g. from here
  2. install LLVM 3.6.1

From package control

  1. Install package control
  2. command+shift + p -> install package
  3. Search Clang-Complete -> install

Installation using Package Control is only supported on Mac.

Configuration

Global options can be set in <sublime-text-3 Packages directory>/clang-complete/cc.sublime-settings file. Header files can be included in the include_options section.

Alternatively, header files can also be included from the Sublime Text 3 <name>.sublime-project files by adding the cc_include_options subsection to the settings section in your <name>.sublime-project file:

"settings":
{
    "cc_include_options":
    [
        "-I/headfile_path1",
        "-I/headfile_path2",
        "-I/headfile_path3"
        // ...
    ]
     // ...
}

Example settings for Windows:

    "settings":
    {
        "cc_include_options":
        [
            "-isystem", "C:\\MinGW\\i686-w64-mingw32\\include",
            "-isystem", "C:\\MinGW\\i686-w64-mingw32\\include\\c++",
            "-isystem", "C:\\MinGW\\i686-w64-mingw32\\include\\c++\\tr1",
            "-isystem", "C:\\MinGW\\i686-w64-mingw32\\include\\c++\\i686-w64-mingw32",
            "-isystem", "C:\\LLVM\\lib\\clang\\3.6.1\\include",
            "-DBOOST_USE_WINDOWS_H"
        ]
    }

if "cc_include_options" exists in your project settings, it will merge to the "include_options" defined in cc.sublime-settings.

Preview

Donate

Paypal

alipay支付宝账号: [email protected]

TODO LIST

feature status
support mac osx done
support linux done
support window done
support sublimetext 2 X

clang-complete's People

Contributors

lvzixun avatar gkalab avatar asevich avatar varqox avatar tillt avatar cuiwc 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.