Giter Club home page Giter Club logo

clighter8's People

Contributors

bbchung avatar le-migou avatar petersohn avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clighter8's Issues

[clighter8] failed to init client

Environment:
Fedora 25
LLVM-Clang 3.8.0 (I know you recommends 3.9 but we only have 3.8 on F25 at this moment)
GNU Global
Vim 8 (with +job and +channel)

I can't find anything interesting in logs:

2016-12-08 16:38:35,305 - INFO - server start at 127.0.0.1:8787
2016-12-08 16:38:35,334 - INFO - accept a vim client
2016-12-08 16:38:35,334 - INFO - config libclang path
2016-12-08 16:38:35,346 - INFO - a client has left(0 clients remains)
2016-12-08 16:38:35,346 - INFO - going to exit if there is no new client comes in 10 seconds
2016-12-08 16:38:45,347 - INFO - server shutdown

Any ideas?

feature request: find compile code database smarter

I don't think this is a good idea to bother the author of this plugin, but I think it is useful to let it search compile_command.json on a current working directory or in any directory above it in the hierarchy (recursively).

Just like ycm do so, it is more convenient to use. Such as:

$ pwd
/Users/hello/Project/hel1/regex
$ vim hello.cc
# compile_command.json will be found on /Users/hello/Project/hel1 
# instead of /Users/hello/Project/hel1/regex

Clighter won't start

When I manually call StartClighter8 it returns "failed to init libclang"

Vim version 2334 compiled with python, but without python 3.
let g:cligher8_libclang_path set to libclang-3.5 or libclang-3.8

Engine won't start

How to know if I have correct version for libcalng and compatible python binding?

Error: No such highlight group name clighter8Expr

Similarly to #5, the link for clighter8Expr is missing. Adding the link in syntax.vim fixes the issue for me.

Error detected while processing function <lambda>332[1]..<SNR>118_on_get_hlt[10]<SNR>118_highlight:
line   17:
E28: No such highlight group name: clighter8Expr

Compile commands not recognized if the file name is not the last argument

If there are any arguments after the file name in the compile commands, clighter8 fails to recognize the file. The result of :ClShowCompileInfo is v:null, and highlighting does not work. This happens for any compile commands, and rearranging the flags helps. However, if the compile commands file is generated by a build system which does not put the filename at the end, then it is very difficult to work around.

Autostart does not work

Hello,

When I open vim clighter does not automaticly start, after manually starting Clighter8 with the StartClighter8 command everything behaves like normal.

Tested with configs

let g:clighter_autostart = 1

and
let g:clighter8_autostart = 1

Plugin does not work, no useful error message

I installed the plugin, and set the libclang path (I have both 3.8 and 3.9 installed, but the problem persists with any of these). After starting vim, I get no error message, but the result of :ClShowCompileInfo is the following: v:null, and nothing is highlighted. The log contains the following:

2017-01-04 14:03:10,333 - INFO - server start at 127.0.0.1:8787
2017-01-04 14:03:10,366 - INFO - accept a vim client
2017-01-04 14:03:10,366 - INFO - config libclang path

After restarting vim (but leaving the clighter server running), the following warning appears in the log:

2017-01-04 14:05:53,448 - INFO - accept a vim client
2017-01-04 14:05:53,449 - WARNING - library file must be set before before using any other functionalities in libclang.

The functionality is the same, though. I get the v:null and no highlighting.

I have Clang bindings installed for both the Python 2 and 3.

% pip2 show clang
Name: clang
Version: 3.8
Summary: libclang python bindings
Home-page: https://github.com/llvm-mirror/clang/bindings/python
Author: Loic Jaquemet
Author-email: [email protected]
License: License :: OSI Approved :: University of Illinois/NCSA Open Source License
Location: /usr/local/lib/python2.7/dist-packages
Requires:
% pip3 show clang
Name: clang
Version: 3.8
Summary: libclang python bindings
Home-page: https://github.com/llvm-mirror/clang/bindings/python
Author: Loic Jaquemet
Author-email: [email protected]
License: License :: OSI Approved :: University of Illinois/NCSA Open Source License
Location: /usr/local/lib/python3.5/dist-packages
Requires:

My vim has also both Python2 and Python3 support, as well as everything mentioned by clighter8:

% vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 02 2017 06:40:50)
Included patches: 1-134
Modified by pi-rho
Compiled by buildd@lcy01-12
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
+balloon_eval    +folding         +mouse_xterm     +termguicolors
+browse          -footer          +multi_byte      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     +gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
+clientserver    +insert_expand   +packages        +toolbar
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl            +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      +python3/dyn     +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con_gui  +lua/dyn         +rightleft       +writebackup
+diff            +menu            +ruby/dyn        +X11
+digraphs        +mksession       +scrollbind      -xfontset
+dnd             +modify_fname    +signs           +xim
-ebcdic          +mouse           +smartindent     +xpm
+emacs_tags      +mouseshape      +startuptime     +xsmp_interact
+eval            +mouse_dec       +statusline      +xterm_clipboard
+ex_extra        +mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax
+farsi           +mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/-I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time  -Wall -Wextra -g -O2 -fPIE -Wformat -Werror=format-security -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,nodlopen -Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,--as-needed -o vim  -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux   -lacl -lattr -lgpm -ldl   -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -lperl -ldl -lm -lpthread -lcrypt

Header file heuristics are dumb

Header files are normally not present in the compilation database. It seems to me that if there is a .cpp file with the same name as the header, then Clighter8 uses the compilation arguments for that file. However, if there is no source corresponding to a header, then no arguments are inferred. It would be better if some other heuristic could be used, for example if there is another source in the same directory, then use the arguments for that.

macOS start clighter8 fail

 let g:clighter8_libclang_path='/Library/Developer/CommandLineTools/usr/lib/libclang.dylib'

2017-12-27 21:41:48,810 - INFO - server start at 127.0.0.1:8787
2017-12-27 21:41:48,852 - INFO - accept a vim client
2017-12-27 21:41:48,854 - INFO - config libclang path
2017-12-27 21:41:48,859 - ERROR - dlsym(0x7fa592e5f760, clang_EnumDecl_isScoped): symbol not found. Please ensure that your python bindings are compatible with your libclang.so version.
2017-12-27 21:41:48,860 - INFO - a client has left(0 clients remains)
2017-12-27 21:41:48,860 - INFO - going to exit if there is no new client comes in 10 seconds
2017-12-27 21:41:58,865 - INFO - server shutdown

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.