Giter Club home page Giter Club logo

clang-complete's Introduction

clang-complete

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

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'

Alternatively, you can also put the files in ~/.vim/

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

See doc/clang_complete.txt for help and license.

clang-complete's People

Contributors

andrew-dunn avatar arnaud-de-grandmaison avatar bmihai avatar bogado avatar daedric avatar dtzwill avatar exclipy avatar fraxbe avatar gokcehan avatar jimenezrick avatar karelzak avatar keith avatar kevincox avatar leszekswirski avatar mkc188 avatar modk avatar myint avatar nico avatar opntr avatar pcc avatar rasendubi avatar salty-horse avatar silex avatar taketwo avatar tobiasgrosser avatar tokoro10g avatar wilywampa avatar xaizek avatar xavierd avatar xdegaye avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

clang-complete's Issues

TypeError: while completing

I don't know how to title this issue.....

#include "Python.h"

int main(int argc, char *argv[])
{
    PyObject_Print(PyFloat_FromDouble(E), stdout, 0);
    PyFl  // completion error at here. what I wanna complete is PyFloat_FromDouble.
                 // and it does complete a function name

        // But if I try to complete after the left parenthese, it even doesn't complete the function at all.
        PyObject_Print(PyFl // here
        // So maybe here comes two issues :-(
    return 0;
}

The relative code:

  if base != "":
    # results = [x for x in results
        # if getAbbr(x.string).startswith(base.encode('utf-8'))]
    tmp = []
    for x in results:
      blah = getAbbr(x.string)
      print(blah, type(blah), base, type(base), file=sys.stderr)
      if blah.decode().startswith(base):
        tmp.append(x)
    results = tmp

And the :message

b'sizeof' <class 'bytes'> PyFl <class 'str'>
Error detected while processing function ClangComplete:
line   22:
b'__PRETTY_FUNCTION__' <class 'bytes'> PyFl <class 'str'>
Error detected while processing function ClangComplete:
line   22:
b'__FUNCTION__' <class 'bytes'> PyFl <class 'str'>
Error detected while processing function ClangComplete:
line   22:
b'__func__' <class 'bytes'> PyFl <class 'str'>
Error detected while processing function ClangComplete:
line   22:
 <class 'str'> PyFl <class 'str'>
Error detected while processing function ClangComplete:
line   22:
Traceback (most recent call last):
Error detected while processing function ClangComplete:
line   22:
  File "<string>", line 1, in <module>
Error detected while processing function ClangComplete:
line   22:
  File "/Users/CC/.vim/bundle/clang-complete/plugin/libclang.py", line 526, in getCurrentCompletions
Error detected while processing function ClangComplete:
line   22:
    if blah.decode().startswith(base):
Error detected while processing function ClangComplete:
line   22:
AttributeError: 'str' object has no attribute 'decode'
Error detected while processing function ClangComplete:
line   23:
Traceback (most recent call last):
Error detected while processing function ClangComplete:
line   23:
  File "<string>", line 1, in <module>
Error detected while processing function ClangComplete:
line   23:
NameError: name 'completions' is not defined
Error detected while processing function ClangComplete:
line   24:
Traceback (most recent call last):
Error detected while processing function ClangComplete:
line   24:
  File "<string>", line 1, in <module>
Error detected while processing function ClangComplete:
line   24:
NameError: name 'timer' is not defined
Error detected while processing function ClangComplete:
-- More --

Note that all the getAbbr(x.string) is <class 'bytes'> except the last element ' ' (a space char) which is <class 'str'>
I'm not familiar with clang-complete and didn't step into the repo.
May this message helpful.

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.