MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.72k stars 254 forks source link

Question: Need help with configuration #952

Open AlphabetsAlphabets opened 10 months ago

AlphabetsAlphabets commented 10 months ago

Hi, sorry, I have no idea where else to ask a question so I'll paste it here. I use meson for my projects and I saw in the docs that I need to change the init options for compilationDatabaseDirectory and so I did it like this.

      lspconfig.ccls.setup {
        init_options = {
          compilationDatabaseDirectory = "build"
        }
      }

However, this does not work. I also tried

compilationDatabaseDirectory = "build/compile_commands.json",

This also does not work. This is my project structure.

.
├── build
│  ├── .ccls-cache
│  ├── .gitignore
│  ├── .hgignore
│  ├── .ninja_deps
│  ├── .ninja_log
│  ├── anything
│  ├── anything.p
│  ├── build.ninja
│  ├── compile_commands.json
│  ├── meson-info
│  ├── meson-logs
│  └── meson-private
├── main.c
└── meson.build