Code Monkey home page Code Monkey logo

cppycm's Introduction

C++YouCompleteMe

This is a Sublime Text 3 plugin aims at providing C/C++ IDE features such as semantic code completion, error highligting, goto definition and more. YCMD is used as the backend server.

ONLY TESTED ON UBUNTU

Features

  • Semantic code completion
    • Provide semantic completion proposals on ., -> and ::, done
    • Variable type indicator, not yet
  • Error highligting
    • Show error hints in code, done
    • Show errors in panel, done
    • Jump to corresponding error in source when clicking problems panel, not yet. It seems ST3 wouldn't call on_selection_modified for output panel, so this feature can't be implemented. Maybe a detour will apply.
  • Goto definition, done

demo

Installation

Set up YCMD

YCMD is partially written in C/C++, so you must compile YCMD on your platform yourself or get a pre-compiled version. Then you need to set ycmd_path and python_path in settings.

In your ycmd_path directory, following files are necessary:

ycmd/
third_party/
libclang.so
ycm_client_support.so
ycm_core.so

Windows x64 Install Guild provides an approach for Windows users to get compiled ycmd.

Ubuntu amd64 users can find compiled ycmd here. https://github.com/glymehrvrd/CppYCM/tree/compiled-ycmd.

Set Sublime Config

To enable prompt on ., -> and ::, you need to add the following configure to your sublime setting. Or create a file named C++.sublime-settings in Packages/User with following as its content.

"auto_complete_triggers":
[
    {
        "characters": ".:>",
        "selector": "source.c++ - string - comment - constant.numeric"
    }
]

Make your own .ycm_extra_conf.py

Ycmd uses .ycm_extra_conf.py to get compilation flags and other information. See c-family-semantic-completion-engine-usage for details. C++YouCompleteMe will try to load .ycm_extra_conf.py from the directory holding the opened file and all directories above it. If .ycm_extra_conf.py is not found, all functions will NOT work.

License

Copyright 2015 Glyme Water. Licensed under the MIT License.

cppycm's People

Contributors

cnt0 avatar glymehrvrd avatar riazanovskiy 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.