Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    KTGH
    @sum01_gitlab

    Anyone have issues with CCLS timing out when using pre-compiled headers?
    I'm specifically using Cmake's target_precompile_headers with Coc-nvim (on neovim).

    The precompiled headers are correctly building, but any time I start browsing files, ccls times out instead of doing anything.
    It stops recommending fixes, showing errors, etc. It's like it's just off.

    But then I simply comment out the target_precompile_headers and re-build with cmake, and all of a sudden it's working as expected.

    I'm using the coc-settings.json recommended in the coc wiki, if it matters.

    kangyampeta srinivas
    @srinivask29_twitter
    Hi I am trying to build ccls on a debian box without any root permission and which does not have ncurses library builtin. I have manually built in the ncurses library. I have set the LD_LIBRARY_PATH, but build does not recognize libnucurses.so (6.1) from this directory. How do you manually provide the location of the ncurses library to ccls.
    Dan Čermák
    @dcermak
    ccls needs ncurses??
    not on my machine:
    ldd /usr/bin/ccls
            linux-vdso.so.1 (0x00007ffc86326000)
            libclang-cpp.so.10 => /usr/lib64/libclang-cpp.so.10 (0x00007fa9c35c9000)
            libLLVM.so.10 => /usr/lib64/libLLVM.so.10 (0x00007fa9be779000)
            libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa9be5a3000)
            libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa9be589000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa9be567000)
            libc.so.6 => /lib64/libc.so.6 (0x00007fa9be3a1000)
            /lib64/ld-linux-x86-64.so.2 (0x00007fa9c67e0000)
            libedit.so.0 => /usr/lib64/../lib64/libedit.so.0 (0x00007fa9be365000)
            libz.so.1 => /lib64/libz.so.1 (0x00007fa9be34b000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00007fa9be346000)
            libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007fa9be315000)
            libm.so.6 => /lib64/libm.so.6 (0x00007fa9be1cf000)
            libxml2.so.2 => /usr/lib64/../lib64/libxml2.so.2 (0x00007fa9be066000)
            liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007fa9be028000)
    kangyampeta srinivas
    @srinivask29_twitter
    /env_build/cmake/CMake/bin/cmake --build Release
    [ 2%] Linking CXX executable ccls
    /usr/bin/ld: cannot find -lncurses
    collect2: error: ld returned 1 exit status
    CMakeFiles/ccls.dir/build.make:733: recipe for target 'ccls' failed
    make[2]: [ccls] Error 1
    CMakeFiles/Makefile2:136: recipe for target 'CMakeFiles/ccls.dir/all' failed
    make[1]:
    [CMakeFiles/ccls.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: * [all] Error 2
    kangyas@rpcs02: ~/env_build/ccls (master) $
    Dan Čermák
    @dcermak
    oh
    ah, wait you're building the master branch?
    kangyampeta srinivas
    @srinivask29_twitter
    Should I build anything else? Which branch is recommended?
    George Xanthakis
    @innerout
    @MaskRay Some time ago I have been trying to build ccls on CentOS and you told me If I make it work to give you an update. So in order to make it work I built a newer gcc(9.1) and also built clang(10.0.0) and with some missing packages from the package manager the master branch ccls built successfully. So when I find some free time I am going to update the wiki on how to build ccls on Centos.
    kangyampeta srinivas
    @srinivask29_twitter
    Anything can be done to build ccls on debian without ncurses?
    nullpointer666
    @nullpointer666
    Hi, there
    I am having trouble configuring ccls with coc.nvim
    I use Arch Linux, and installed ccls using "pacman -S ccls"
    Followed these instructions and tried first example: https://github.com/MaskRay/ccls/wiki/coc.nvim
    {
      "diagnostic.infoSign": "--",
      "diagnostic.displayByAle": true,
      "typescript.showUnused": false,
      "javascript.showUnused": false,
      "languageserver": {
        "ccls": {
          "command": "ccls",
          "filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
          "rootPatterns": [".ccls-root", "compile_commands.json"],
          "initializationOptions": {
            "cache": {
              "directory": ".ccls-cache"
            },
            "client": {
              "snippetSupport": true
            },
            "completion": {
              "placeholder": true
            }
          }
        }
      }
    }
    Here is my :CocConfig
    nullpointer666
    @nullpointer666
    Am I doing everything correctly?
    After following these steps nothing seems to work
    theshank
    @the-shank
    I am facing the same issue as @nullpointer666
    :CocList services shows languageserver.ccls [init]. Should that [init] be [running]?
    @nullpointer666 what does your :CocList services show for ccls?
    Carlo Nucera
    @meditans

    hi, I'm experiencing problems in indexing, I get a lot of errors like:

    12:52:54 indexer1          indexer.cc:1340 E failed to index /path/nix/src/libutil/args.cc

    but, in the project root folder, I did make clean && bear make -j5, and I have a compile_commands.json. Could you point how I should debug this?

    @MaskRay ^
    Fangrui Song
    @MaskRay
    retrieve the clang command line and run it in the terminal https://github.com/MaskRay/ccls/wiki/Debugging
    Carlo Nucera
    @meditans
    sorry, I'm completely new on c++ tooling, this project is compiled with gcc, and I have a Makefile
    nullpointer666
    @nullpointer666
    @the-shank [init
    Carlo Nucera
    @meditans
    does that mean that I should build ccls in debug mode @MaskRay
    ?
    probably cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=gcc is enough? Let me try
    Fangrui Song
    @MaskRay
    building ccls in debug mode can allow you to attach a debugger to the ccls process
    -G 'Unix Makefiles' can be omitted.
    Simon Pintarelli
    @simonpintarelli
    I'm using ccls with emacs, it seems that if I open a file located in a git worktree the root directory is wrongly determined. It takes the path to main git checkout. Is ccls computing the root directory or is that done by lsp-mode?
    Fangrui Song
    @MaskRay
    @simonpintarelli The root directory is computed by lsp-mode. emacs-ccls sets an advice: (advice-add 'lsp--suggest-project-root :before-until #'ccls--suggest-project-root)
    Simon Pintarelli
    @simonpintarelli
    Thank you.
    clauniel
    @clauniel
    Hi there. I'm having a problem with ccls indexing of dependencies. I have generated compile commands for my project, including commands for header files, using cmake and compdb. I see all the header files of my project in my compile_commands file, as well as the header files I am using from other libraries that I depend on. I have added the include directions of these libraries in my .ccls located in my project root. Everything works inside files directly inside my project. If I go to the definition of a symbol located in a dependency header file, ccls creates a .ccls-cache in the include directory of my dependency. ccls is unable to give me completions and the ability to go-to-definition from within the external library header file, even though those symbols can be accessed from header files inside my project. I am assuming this is because there is no .ccls located in the external library directory that defines -I directives to find the appropriate header files. Is there any way to make ccls use my project .ccls for external libraries as well? Especially given that the external header file in question actually has all include directives and compile options defined in my project compile_commands.json
    arj-singh
    @arj-singh
    Hi everyone, I've enabled ccls semantic highlighting on emacs, but it only updates when I save and write to a file. Is there a way to make it highlight as I'm typing?
    jaza-syed
    @jaza-syed
    Hi, I’m having some trouble getting ccls working on a toy project in emacs. ccls reports being unable to find header files, but if I use lsp-find-definition on the includes, it goes to the files (for both local and system includes). Would be very grateful for any help, I have explained in more detail here: MaskRay/emacs-ccls#88.
    jaza-syed
    @jaza-syed
    turns out this is just an instance of MaskRay/ccls#622
    Christian Maniewski
    @chmanie
    I am using coc.nvim as well and for some reason it's not picking up .h files. Is there any way to debug ccls there to see an error message?
    Christian Maniewski
    @chmanie
    I put %h -x c++-header into the .ccls file
    Well, using two separate lines like suggested here works: https://github.com/MaskRay/ccls/wiki/Project-Setup#h--hpp
    sbond75
    @sbond75
    Hi, I'm using ccls and it doesn't find headers like iostream, cstdio, or cstdint. It says ccls: cannot open file '/usr/local/Cellar/llvm/10.0.0_3/lib/clang/10.0.0/include/iostream': No such file or directory even though I set (setq ccls-args '( "-init='{\"clang\":{\"extraArgs\":[\"-isystem\", \"/Library/Developer/CommandLineTools/usr/include/c++/v1\"]}}'")) as recommended on https://github.com/MaskRay/ccls/issues/191#issuecomment-453809905 . I'm using macOS Catalina with llvm installed via Homebrew.
    Ghost
    @ghost~5ef21ad4d73408ce4fe7b2e5
    @chmanie Did you managed to solve this problem? I have the same issue, ccls sees headers like iostream but it does not see headers from my project, it looks like it is related to fact that I have headers in hdr folder and source in src, when I move them out to one folder it works just fine. My .ccls config is similar to Example A but extended with header parsing, I have minimal example if needed
    Christian Maniewski
    @chmanie
    @k-brk I think it's a different problem
    The headers are found for me but they were parsed as c headers
    arbernat
    @arbernat
    Hi. I'm also trying to get emacs working; in this case, emacs on Mac, tramp mode, and remote on a Linux dev VM. When I open a remote file I see ccls starting, and it starts logging output (redirected to /tmp)
    10:15:37 stdin            pipeline.cc:552 V(2) receive RequestMessage: 2 initialize
    10:15:37 ccls           initialize.cc:274 I initialize in directory /u/drew/src/purity with uri file:///u/drew/src/purity
    10:15:37 ccls           initialize.cc:297 I initializationOptions: {"compilationDatabaseCommand":"","compilationDatabaseDirectory":"","cache":{"directory":".ccls-cache","format":"binary","hierarchicalPath":false,"retainInMemory":2},"capabilities":{"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[]},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"clang":{"excludeArgs":[],"extraArgs":[],"pathMappings":[],"resourceDir":""},"client":{"diagnosticsRelatedInformation":true,"hierarchicalDocumentSymbolSupport":true,"linkSupport":true,"snippetSupport":true},"codeLens":{"localVariables":true},"completion":{"caseSensitivity":2,"detailedLabel":true,"dropOldRequests":true,"duplicateOptional":true,"filterAndSort":true,"include":{"blacklist":[],"maxPathSize":30,"suffixWhitelist":[".h",".hpp",".hh",".inc"],"whitelist":[]},"maxNum":100,"placeholder":true},"diagnostics":{"blacklist":[],"onChange":1000,"onOpen":0,"onSave":0,"spellChecking":true,"whitelist":[]},"highlight":{"largeFileSize":2097152,"lsRanges":false,"blacklist":[],"whitelist":[]},"index":{"blacklist":[],"comments":2,"initialNoLinkage":false,"initialBlacklist":[],"initialWhitelist":[],"maxInitializerLines":5,"multiVersion":0,"multiVersionBlacklist":[],"multiVersionWhitelist":[],"name":{"suppressUnwrittenScope":false},"onChange":false,"parametersInDeclarations":true,"threads":0,"trackDependency":2,"whitelist":[]},"request":{"timeout":5000},"session":{"maxNum":10},"workspaceSymbol":{"caseSensitivity":1,"maxNum":1000,"sort":true},"xref":{"maxNum":2000}}
    10:15:37 ccls           initialize.cc:329 I use -resource-dir=/usr/local/clang/lib/clang/10.0.0
    10:15:37 ccls             pipeline.cc:817 V(2) respond to RequestMessage: 2
    A bunch of "load cache" messages, then the last one is
    10:15:46 ccls             pipeline.cc:474 I loaded project. Refresh semantic highlight for all working file.
    Then the process exits