Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Boris Staletic
    @bstaletic
    The libclang from releases.llvm.org does depend on libtinfo.
    klement
    @klement
    Well it did some downloads, but I also have clang-11 installed system-wide. Maybe it's preferred? Eitherway ... my issue is no longer an issue, just wanted to mention it in case anybody finds the info useful
    Boris Staletic
    @bstaletic
    YCM will copy the chosen libclang to ycmd/third_party/clang/lib/libclang.so.$VERSION, so run ldd on that.
    Alvin Sun
    @alvinsunyixiao
    I am cross compiling with ARM toolchains. My project generates a compile_commands.json, but YCM seems to append more system flags.
    Printing YouCompleteMe debug information...
    -- Resolve completions: Never
    -- Client logfile: /var/folders/1t/_30c0yp97x3dt95y6wyzj26c0000gn/T/ycm_1m00i734.log
    -- Server Python interpreter: /usr/local/opt/python@3.9/bin/python3.9
    -- Server Python version: 3.9.1
    -- Server has Clang support compiled in: True
    -- Clang version: clang version 11.0.0 (https://github.com/llvm/llvm-project.git 176249bd6732a8044d457092ed932768724a6f06)
    -- Extra configuration file found and loaded
    -- Extra configuration path: /Users/alvin/iRM_Embedded_2020/.ycm_extra_conf.py
    -- C-family completer debug information:
    --   Compilation database path: None
    --   Flags: ['/Users/alvin/Downloads/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++', '-x', 'c++', '-target', 'arm-none-eabi', '--driver-mode=g++', '-DARM_MATH_CM4', '-
    DEIGEN_DONT_VECTORIZE', '-DSTM32F427xx', '-DUSE_HAL_DRIVER', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Core/Inc', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Boar
    d_TypeA/FATFS/Target', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/FATFS/App', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/USB_DEVICE/App', '-I/Users/al
    vin/iRM_Embedded_2020/boards/DJI_Board_TypeA/USB_DEVICE/Target', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Drivers/STM32F4xx_HAL_Driver/Inc', '-I/Users/alvin/iRM_E
    mbedded_2020/boards/DJI_Board_TypeA/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Drivers/CMSIS/Include', '-I/Users/alvin/iRM
    _Embedded_2020/boards/DJI_Board_TypeA/Drivers/CMSIS/Device/ST/STM32F4xx/Include', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/DSP/Include', '-I/Users/alvin/iRM_Embed
    ded_2020/boards/DJI_Board_TypeA/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Middlewares/ST/STM32_USB_Device_L
    ibrary/Core/Inc', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Middlewares/Third_Party/FatFs/src', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Middleware
    s/Third_Party/FreeRTOS/Source/include', '-I/Users/alvin/iRM_Embedded_2020/boards/DJI_Board_TypeA/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS', '-I/Users/alvin/iRM_Embedded
    _2020/boards/DJI_Board_TypeA/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F', '-I/Users/alvin/iRM_Embedded_2020/shared/bsp', '-I/Users/alvin/iRM_Embedded_2020/shar
    ed/libraries', '-I/Users/alvin/iRM_Embedded_2020/shared/third_party', '-isystem', '/Users/alvin/iRM_Embedded_2020/shared/third_party/eigen-3.3.9', '-Wall', '-Werror', '-Wextra',
    '-fdiagnostics-color=always', '-fno-exceptions', '-Og', '-g', '-DDEBUG', '-mcpu=cortex-m4', '-mthumb', '-mthumb-interwork', '-mfpu=fpv4-sp-d16', '-mfloat-abi=hard', '-ffunction-s
    ections', '-fdata-sections', '-fmessage-length=0', '-std=gnu++17', '-resource-dir=/Users/alvin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/11.0.0', '-i
    system', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1', '-isystem', '/Applications/Xcode.app/Contents/Developer/Platforms/Ma
    cOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1', '-isystem', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local
    /include', '-isystem', '/usr/local/include', '-isystem', '/Users/alvin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/11.0.0/include', '-isystem', '/Appli
    cations/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '-isystem', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
    /SDKs/MacOSX.sdk/usr/include', '-iframework', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks', '-iframe
    work', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
    The compile commands does not include -resource-dir=xxx and everything after it. Is there a way to remove those flags?
    I tried printing the flags in my .ycm_extra_conf.py, it seems like the flags returned by Settings function does not include those system flags.
    Boris Staletic
    @bstaletic
    @alvinsunyixiao Switch to clangd and skip the extra conf.
    Johannes Wikner
    @sktt
    hey, how can tell YCM the path of my header files?
    Boris Staletic
    @bstaletic
    Do you have a compile_commands.json
    RoachZhao
    @roachsinai
    Hi, there. Does YcmCompleter GoToDefinition support open the file in current window?
    What I expected is:
    Ben Jackson
    @puremourning
    There’s an option that controls it.
    See the docs
    RoachZhao
    @roachsinai
    rightbelow YcmCompleter GoToDefinition // open in horizontal
    rightbelow vertical YcmCompleter GoToDefinition // open in vertical
    above is what I used now.

    There’s an option that controls it.

    Ok, thanks.

    Ben Jackson
    @puremourning
    I don’t think we use the mods. Maybe we should
    RoachZhao
    @roachsinai

    I don’t think we use the mods. Maybe we should

    Hi @puremourning if I set g:ycm_goto_buffer_commandto same-bufferuse rightbelow, etc will not work.

    image.png
    My current setting choseedit will run :YcmCompleter GoToDefinition
    split will run rightbelow YcmCompleter GoToDefinition
    vsplit will run rightbelow vertical YcmCompleter GoToDefinition
    wish there is a way to let edit open in current window, split in a horizontal window, and vsplit in a vertical window.
    sirius-black
    @series-black
    hi , ycm diagonation can't find qt header files
    Ben Jackson
    @puremourning
    Not sure if that’s a question or not x2
    sirius-black
    @series-black
    image.png
    image.png
    image.png
    image.png
    how can i make syntastic or ycm diagonation find the qt header files
    ?????
    Johannes Wikner
    @sktt
    @bstaletic not using compile_commands.json just entering a very basic c file with a few includes from ../include/ imported as e.g. #include <arg.h>
    thought it would be nice to just tell YCM about the include path. also about the c version
    RoachZhao
    @roachsinai

    Not sure if that’s a question or not x2

    Hi, @puremourning I've made a issue to explain my points.

    Ben Jackson
    @puremourning
    @series-black All you have to do is read the docs
    Johannes Wikner
    @sktt
    will try out Bear then
    Alvin Sun
    @alvinsunyixiao
    @bstaletic Thanks I will try that.
    Enrico Maria De Angelis
    @Aster89
    Hello there :)
    Boris Staletic
    @bstaletic
    Hi
    Enrico Maria De Angelis
    @Aster89
    Sometimes, after some hour of coding, in which I've certainly mashed TAB, I find out some file containing #include <bits/stdc++.h>, which means that some TAB-completion triggered that. Since I discover this after a long time coding, typically when qualifying the change, I don't know which completion trigger that. Any idea which could it be? Plus, shouldn't that header be avoided, in general?
    Boris Staletic
    @bstaletic
    Yes, the automatic include statement insertion isn't perfect. YCM, however, has no control over it. It's either on or off. There's a clangd switch for it.
    Enrico Maria De Angelis
    @Aster89
    I understand, thanks :)
    zkitty
    @suricata3838
    Hi, I failed to build ycmd because of "C++17 filesystem library missing" error.
    OS is MacOS Mojave 10.14.6.
    I followed full installation guide on YouCompleteMe wiki step by step.
    I installed the latest llvm through homebrew and passed that libclang to cmake.
    I'm not sure what should I do.
     2021-01-25 16:30:55 ⌚  MacBook-Pro-7 in ~/.vim/bundle/YouCompleteMe/ycm_build
    ± |detached:master~9 U:1 ?:1 ✗| → cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=$(brew --prefix llvm) . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
    -- Using libclang to provide semantic completion for C/C++/ObjC
    -- Using external libclang: /usr/local/Cellar/llvm/11.0.0_1/lib/libclang.dylib
    CMake Error at ycm/CMakeLists.txt:307 (message):
      Unknown compiler - C++17 filesystem library missing
    
    
    -- Configuring incomplete, errors occurred!
    See also "/Users/****/.vim/bundle/YouCompleteMe/ycm_build/CMakeFiles/CMakeOutput.log".
    Boris Staletic
    @bstaletic
    macOS 10.14 doesn't have std::filesystem. You'll have to check out an older commit of YCM.
    To compile latest YCM, you need to be able to compile this:
    #include <filesystem>
    
    int main(int argc, char** argv) {
        return std::filesystem::path(argv[1]).string().size();
    }
    zkitty
    @suricata3838
    ± |detached:master~9 U:1 ?:1 ✗| → g++ -o app -Wall test.cpp
    test.cpp:4:17: error: no member named 'filesystem' in namespace 'std'
        return std::filesystem::path(argv[1]).string().size();
               ~~~~~^
    1 error generated.
    Actually I checked out this commit.
    commit 4e480a317d4858db91631c14883c5927243d4893 (HEAD)
    Boris Staletic
    @bstaletic
    -std=c++17 flag is missing.
    zkitty
    @suricata3838
    Oh okay