bbchung / clighter8 Goto Github PK
View Code? Open in Web Editor NEWVIM C++ semantic syntax highlight plugin
License: GNU General Public License v3.0
VIM C++ semantic syntax highlight plugin
License: GNU General Public License v3.0
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?
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
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
How to know if I have correct version for libcalng and compatible python binding?
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
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.
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
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
I'm user for SpaceVim, when I use vim to write C headers, the plugins highlight the macro command,but when i writing the C++ headers, macro command not highlight,why?
There is downstream issues:
https://github.com/SpaceVim/SpaceVim/issues/2059
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.
When opening a C++ file I get the error "No such highlight group name clighter8CallExpr".
Could be solved by adding "hi default link clighter8CallExpr Type" to syntax/clighter8.vim.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.