maralla / completor.vim

Async completion framework made ease.
MIT License
1.29k stars 63 forks source link

C++ placeholders are not corretly selected #184

Open Miszo97 opened 6 years ago

Miszo97 commented 6 years ago

While trying to jump to a placeholder it selects incorrect area so I can't full fill parameter correctly.

screen shot 2018-02-21 at 23 37 05

Vim: MacVim 8.0.1420 Version: ca0dd99 Vimrc: https://pastebin.com/4bPcD4v4 OS: macOS High Sierra 10.13.3

No additional _.clangcomplete file provided. Please let me know if you need further information.

maralla commented 6 years ago

Can you please comment out all plugins exclude completor to check whether the problem still exists?

Miszo97 commented 6 years ago

@maralla Unfortunately, after disabling other plugins the problem still appears.

bonycreepyindianpangolin-size_restricted

I noticed that the selections are as if moved exactly 7 times to the left in each case regardless of placeholder's length.

screen shot 2018-02-22 at 07 36 23

Furthermore, if I don't provide a name of a file from a terminal and just moved to the file by jumping <c-o>, the mapping for jumping to placeholders don't work.

maralla commented 6 years ago

The commit 58075b44b95d8c97a02ef8cc7e9af9a2f39c55db fixed the problem. Please update.

maralla commented 6 years ago

The mapping for jumping to placeholders is currently lazily loaded, so jumping only happens after the first completion and the <buffer> part should be removed.

BruceChen7 commented 6 years ago

After updating, still has the same problems as @Miszo97

Miszo97 commented 6 years ago

@BruceChen7 hm... for me this update worked. But I encountered others problems. Very often when I try list completion using dot like instance. It doesn't list anything although there is an appropriate macro #include<> or list bunch of a completions not related to class's functions.

maralla commented 6 years ago

You can add extra clang options to a file named .clang or .clang_complete as an argument config file located at project root or the parent directories. If the include files is not at the directory same as the file you are editing you should add the include path to the config file.

wasnio commented 5 years ago

I had the same problem. Disabling the other plugins the problem continues.

vim --version:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct 10 2018 07:45:33)
macOS version
Included patches: 1-450
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    -gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl              +vartabs
+clipboard         +jumplist          +persistent_undo   +vertsplit
+cmdline_compl     +keymap            +postscript        +virtualedit
+cmdline_hist      +lambda            +printer           +visual
+cmdline_info      +langmap           +profile           +visualextra
+comments          +libcall           -python            +viminfo
+conceal           +linebreak         +python3           +vreplace
+cryptv            +lispindent        +quickfix          +wildignore
+cscope            +listcmds          +reltime           +wildmenu
+cursorbind        +localmap          +rightleft         +windows
+cursorshape       +lua               +ruby              +writebackup
+dialog_con        +menu              +scrollbind        -X11
+diff              +mksession         +signs             -xfontset
+digraphs          +modify_fname      +smartindent       -xim
-dnd               +mouse             +startuptime       -xpm
-ebcdic            -mouseshape        +statusline        -xsmp
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_clipboard
+eval              -mouse_gpm         +syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -framework AppKit  -L/usr/local/opt/lua/lib -llua5.3 -mmacosx-version-min=10.13 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation  -lruby.2.5.1 -lobjc
amsitlab commented 5 years ago

I had the same problem.