Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jan Christoph Uhde
    @ObiWahn
    http://ycm-core.github.io/YouCompleteMe/ -- add some donation link
    Boris Staletic
    @bstaletic
    Nope. At that point YCM becomes work and not a passion project.
    Jan Christoph Uhde
    @ObiWahn
    no - i would not have the expectation that you have to do anything because i gave something at some random point
    but ok :) there are other projects like weechat that deserve donations:)
    this is really super helpful - thanks for doing it!
    By the way how do you debug into the so?
    can you attach gdb / rr somehow?
    do you attach to the python instance?
    Boris Staletic
    @bstaletic
    If I have a stack trace that points at the ycm_core.so it's pretty simple:
    • gdb python
    • r opens the python interactive shell
    • import ycm_core
    • <C-c> brings back gdb
    • Set break points and anything else inside the ycm_core
    • ycm_core.SomeFunction(<args>)
    • Wait until you hit a break point. After this it's just a C++ code in gdb.
    Jan Christoph Uhde
    @ObiWahn
    Do you know about rr?
    Boris Staletic
    @bstaletic
    Is it related to the record feature?
    Jan Christoph Uhde
    @ObiWahn
    yes
    Boris Staletic
    @bstaletic
    Then I know about it, but I haven't used it yet.
    Jan Christoph Uhde
    @ObiWahn
    It is super awesome! You can replay the execution and can do reverse-next etc
    Going backwards in time saves super much time. That is really cool. especially if you need to work with other peoples code.
    or you have network communication and want to inspect both sides
    https://rr-project.org/ if you have some time try it!
    Boris Staletic
    @bstaletic
    commands is very nice as well. "Oh I hit a break point! Where's that list of commands I should execute now?"
    Jan Christoph Uhde
    @ObiWahn
    nice!
    i was using scripts
    ok good night
    Boris Staletic
    @bstaletic
    Good night.
    dpknesek
    @dpknesek
    how do I install YCM machine wide (rather than just for me as a user) ?
    Jan Christoph Uhde
    @ObiWahn
    I think you just need to install it to a global plugin directory. Try :h rtp in vim.
    Igor Ostapenko
    @ihoro
    Hello. Usually YCM works for me seamlessly and I even forget that I have it, it just works :) But sometimes I do not get completion for a word mentioned on the next line. I usually get it completed by built-in vim Ctrl-N completion. In my case it's a JavaScript file where I have a comment line with <word> and while I'm editing another line what depicts a function call and I'm adding a string parameter and I want to get that <word> completed inside a single quoted string. I guess JS LSP behind the scenes cannot help me with that, and when I do <Esc> out of YCM completion and trigger Ctrl-N completion then vim helps me. Is it possible to combine LSP and usual word-matching-in-vim-buffers completions, so that I do not need to fallback to built-in vim Ctrl-N? I hope I covered my case correctly.
    but sometimes it looks like it's already combined, probably, I experience a bug
    Boris Staletic
    @bstaletic

    Hi. I'm glad you like YCM.

    First, javascript completer doesn't use LSP. It uses tern or TSServer. Combining the generic [ID] completer with the semantic one would defeat the purpose of the generic completer. The generic completer is very* fast and usually good enough. The ranking algorithm doesn't consider word proximity when sorting. That has been requested before, but it is really not obvious how or even easy to implement.

    I can't say I've had the need to reach for <C-n> often, but I often get YCM out of the way to do <C-x><C-l>. The best you can do is figure out some clever mapping to help you get YCM's completion out of the way for these cases.

    The problem is also evident in a C project that uses string.h, since most of functions start with str and have no underscores or capital letters. This completely defeats the cleverness of the ranking algorithm, so I end up typing scm to get quickly to strcmp for example. Yes, this results in better ranking for these corner cases, but also introduces some mental overhead until you figure out that the best you can do is scm for strcmp.

    * I'm secretly working on a patch that will speed up the generic completer a lot, at the expense of memory, so I'll need to measure a ton of stuff.
    Igor Ostapenko
    @ihoro
    Thanks for your attention. "mapping" here means what YCM function is invoked?
    Boris Staletic
    @bstaletic
    I'm specifically thinking of vim's imap. To get YCM out of the way, you need <C-y>, then to enter ctrl-x submode, you need <C-x>. Completely untested, but maybe something like imap <your key sequence> <C-y><C-n> can work.
    Or something with an expression mapping and feedkeys().
    Igor Ostapenko
    @ihoro
    aha, ok
    thanks
    Boris Staletic
    @bstaletic
    You're welcome. If you figure out how to write that mapping, I'd be interested to see what you came up with.
    Jan Christoph Uhde
    @ObiWahn
    nnnyt
    @nnnyt
    Hello, I have a question after installing java. After I install java for my Mac and set the /env/profile, every time I open my vim, it shows
    Vim: Caught deadly signal SEGV
    
    Error detected while processing function <SNR>76_PollServerReady[7]..<SNR>76_Pyeval:Vim: Finished.
    
    line    4:
    Exception MemoryError: MemoryError() in <module 'threading' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.pyc'> ignored
    Segmentation fault: 11
    Boris Staletic
    @bstaletic
    After installing java? Does that mean YCM worked before java?
    nnnyt
    @nnnyt
    yes
    Boris Staletic
    @bstaletic
    What's the output of :version?
    nnnyt
    @nnnyt
    The version of vim? VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 19 2019 19:08:44)
    Boris Staletic
    @bstaletic
    No, the entire output of :version.
    nnnyt
    @nnnyt
    VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 19 2019 19:08:44)
    Included patches: 1-503, 505-680, 682-1283, 1365
    Compiled by root@apple.com
    Normal version without 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      -terminal
    +builtin_terms   +fork()          +multi_lang      +terminfo
    +byte_offset     -gettext         -mzscheme        +termresponse
    +channel         -hangul_input    +netbeans_intg   +textobjects
    +cindent         +iconv           +num64           +timers
    -clientserver    +insert_expand   +packages        +title
    -clipboard       +job             +path_extra      -toolbar
    +cmdline_compl   +jumplist        -perl            +user_commands
    +cmdline_hist    -keymap          +persistent_undo +vertsplit
    +cmdline_info    +lambda          +postscript      +virtualedit
    +comments        -langmap         +printer         +visual
    -conceal         +libcall         -profile         +visualextra
    +cryptv          +linebreak       +python/dyn      +viminfo
    +cscope          +lispindent      -python3         +vreplace
    +cursorbind      +listcmds        +quickfix        +wildignore
    +cursorshape     +localmap        +reltime         +wildmenu
    +dialog_con      -lua             -rightleft       +windows
    +diff            +menu            +ruby/dyn        +writebackup
    +digraphs        +mksession       +scrollbind      -X11
    -dnd             +modify_fname    +signs           -xfontset
    -ebcdic          +mouse           +smartindent     -xim
    -emacs_tags      -mouseshape      +startuptime     -xpm
    +eval            -mouse_dec       +statusline      -xsmp
    +ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
    +extra_search    -mouse_jsbterm   +syntax          -xterm_save
    -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"
           defaults file: "$VIMRUNTIME/defaults.vim"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORT
    IFY_SOURCE -D_FORTIFY_SOURCE=1
    Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework
    Cocoa
    Boris Staletic
    @bstaletic
    That looks like the default system vim. Is that right?
    nnnyt
    @nnnyt
    yes
    Boris Staletic
    @bstaletic
    That's the problem. That thing has a broken python implementation. That's why our README says that you need macvim.
    nnnyt
    @nnnyt
    But before I installed java today, it worked well...ok, I will use macvim
    Thank you
    Boris Staletic
    @bstaletic
    It's not completely broken, just enough to occasionally hit a MemoryError and bring down vim. UltiSnips is affected too.
    nnnyt
    @nnnyt
    Ok I see. Thank you so much!
    Boris Staletic
    @bstaletic
    You're welcome.