Giter Club home page Giter Club logo

code-gnu-global's Introduction

README

C++ Intellisense

Please go to https://github.com/austin-----/code-gnu-global for source code, bug tracking, and feature request

Functionality

Provide Intellisense for C/C++ with the help of the GNU Global tool in Visual Studio Code.

Usage

  1. Make sure you have the latest GNU Global (>= 6.5) tool installed and added to PATH. If you do not have GNU Global available in PATH, then please add codegnuglobal.executable to your settings.js (Preference - User Settings) and set its value to the absolute path and binary of global or global.exe.

    E.g.: (GNU Global on Windows, inside a MSYS2 installation)

    {
        "codegnuglobal.executable": "C:\\msys64\\usr\\bin\\global.exe"
    }

    Please note that Debian and its derivates (Ubuntu, Mint, ...) are shipping an outdated version of GNU global (v5.7), which is throwing the error "--encode-path unrecognized". (Thanks @badaix for the tip)

  2. In the workspace folder of your C/C++ project, run 'gtags'. This will generate the GTAGS, GRTAGS, and GPATH files. If you made changes to your code, run 'gtags' again to renew the tag files.

    Upon saving your source code, the extension would try to automatically update the tags by running 'global -u'. You can turn this off by setting codegnuglobal.autoupdate to false in your settings.js (Preference - User Settings).

  3. Install 'C++ Intellisense' in VS Code and then you can enjoy Intellisense for this project in VS Code.

  4. If you are using Windows with a non-CP437 code page, or Linux/OSX with non-UTF8 encoding, please add 'codegnuglobal.encoding' to your settings.json (Preference - User Settings) and set its value to the custom encoding you are using (Please look at https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings for supported encodings).

    E.g.: (CP936 for Simplified Chinese on Windows)

    {
        "codegnuglobal.encoding": 'cp936'
    }

Demo

  • Go to definition

Go to definition

  • Auto completion

Auto completion

  • Find references

Find references

  • List symbols

List symbols

Limitations

Since GNU Global is a tagging system, it does not do any AST parsing to understand class members and etc.

For more information

Enjoy!

code-gnu-global's People

Contributors

artoria2e5 avatar austin----- avatar csholmq avatar jbenden avatar knocte 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.