Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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
    ± |detached:master~9 U:1 ?:1 ✗| → g++ -o app -Wall -std=c++17 test.cpp
    test.cpp:4:29: error: 'path' is unavailable: introduced in macOS 10.15
        return std::filesystem::path(argv[1]).string().size();
                                ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly
          marked unavailable here
    class _LIBCPP_TYPE_VIS path {
                           ^
    test.cpp:4:12: error: 'path' is unavailable: introduced in macOS 10.15
        return std::filesystem::path(argv[1]).string().size();
               ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path' has been explicitly
          marked unavailable here
      path(const _Source& __src, format = format::auto_format) {
      ^
    test.cpp:4:12: error: '~path' is unavailable: introduced in macOS 10.15
        return std::filesystem::path(argv[1]).string().size();
               ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly
          marked unavailable here
      ~path() = default;
      ^
    test.cpp:4:43: error: 'string' is unavailable: introduced in macOS 10.15
        return std::filesystem::path(argv[1]).string().size();
                                              ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:999:41: note: 'string' has been explicitly
          marked unavailable here
      _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
                                            ^
    4 errors generated.
    It's the same error when I got compiling ycmd.
    Boris Staletic
    @bstaletic

    Right. Like I said, macOS 10.14 doesn't have <filesystem> enabled.

    Actually I checked out this commit.
    commit 4e480a317d4858db91631c14883c5927243d4893 (HEAD)

    Did you do git submodule update --init --recursive after that?

    zkitty
    @suricata3838
    Maybe. I'll retry it.
    Boris Staletic
    @bstaletic
    I'm pretty sure you didn't. The point is that you have to avoid ycm-core/ycmd@ece414c in /path/to/YCM/third_party/ycmd. That's the thing that depends on C++17.
    zkitty
    @suricata3838
    Ah I see...
    As you said I didn't it, python3 install.py --all looks working right now!
    Boris Staletic
    @bstaletic
    Great!
    zkitty
    @suricata3838
    I really appreciate your so fast and kind helping.
    Boris Staletic
    @bstaletic
    You're welcome.
    Brian Orwe
    @Borwe
    Is it possible to have an intermediate applcation that acts as an interface on a port to stdio of an LSP server that doesn't offer the use of port?
    Just curious about this LSP world
    Boris Staletic
    @bstaletic
    I'm not sure what you mean, but g:ycm_language_server is pretty flexible.
    https://github.com/ycm-core/ycmd/#lsp-based-completers
    Brian Orwe
    @Borwe

    I'm not sure what you mean, but g:ycm_language_server is pretty flexible.
    https://github.com/ycm-core/ycmd/#lsp-based-completers

    For example there is this server, vala-language-server, and I wanna use it via port number rather than stdio (which is what it only supports)

    Boris Staletic
    @bstaletic
    That works just fine! You just need to state that in g:ycm_language_server.
    Brian Orwe
    @Borwe
    reason for wanting port over stdio, is because the server is kinda hard to install on local system, but would be good for docker installation, and then access it from the container.
    Boris Staletic
    @bstaletic
    let g:ycm_language_server = [ { 'name': 'vala', 'port': '123', 'filetypes': [ 'whatever' ] } ] " Use 'port': '*' to let YCM pick a random, free port
    See the examples for godot and someserver in the link above.
    Also, if you find that it works, you should open a PR on https://github.com/ycm-core/lsp-examples
    Brian Orwe
    @Borwe
    okay, cool